I Programmed Artificial Companions

  Рет қаралды 956

Kedrigern

Kedrigern

Күн бұрын

Пікірлер: 21
@GrayGHay
@GrayGHay Ай бұрын
i really liked your video! dont know if it was already said but, youre not getting 10 times carrots / by have because when you get lucky and the companion is on the empty field side, this companion is stealing a place for a carrot that could get a companion half of the time.
@KedrigernGaming
@KedrigernGaming Ай бұрын
Yeah for sure :) I think I took that into account and the best case scenario it is half the field times 10. So Half are carrots and the other half is just companions.
@keejay98195
@keejay98195 Ай бұрын
@5:20 dictionaries in this game act sort of like global variables. so in your main function where you run you can define this dict and call it from anywhere
@KedrigernGaming
@KedrigernGaming Ай бұрын
That is good to know! Thanks :)
@DavidHenderson-ct1eg
@DavidHenderson-ct1eg Ай бұрын
Am I missing something, you have x position and y position already in row and col variables from the for loops...?
@KedrigernGaming
@KedrigernGaming Ай бұрын
I'm so dumb xD You are right!! That is the problem with copying code and not really realizing the things it does.
@josefuher6117
@josefuher6117 Ай бұрын
I bet it's 4800 carort per field since they grow 4 in one spot, witch is source of your miscalculation
@KedrigernGaming
@KedrigernGaming Ай бұрын
Oh wow, that would make so much sense! I mean...I feel dumb now cause there literally are 4 carrots in one spot... But I have always seen it as an esthetics choice xD
@Soken50
@Soken50 Ай бұрын
Not sure I understood everything you did but it seems to work, I think you'll have to generalize it to at least some other companion plants upon resetting for leaderboards though, Wood is in pretty high demand If I recall correctly.
@KedrigernGaming
@KedrigernGaming Ай бұрын
I was thinking about that too. But then also realized that by the time you unlock these companions you are probably set for wood. It"s hard to 'predict' these things since I don't remember the feeling from before I had millions of wood. But even just from the coding side of things generalizing would be the way to go!
@Soken50
@Soken50 Ай бұрын
@@KedrigernGaming I don't think so, if you have excess wood you're not spending your time optimally and could be getting polyculture sooner and speed the rest of the game with it ^^`
@gametec_live
@gametec_live Ай бұрын
Dont we all just need Companions every now and then? XD
@KedrigernGaming
@KedrigernGaming Ай бұрын
We do, they make us all grow...wow that's actually pretty deep. Who would have expected that from a game like this?
@martinniemannmortensen797
@martinniemannmortensen797 Ай бұрын
Wouldn't the issue of the companion spawning on the left be solved by the second passthrough? Also i'd be curious to see how the field would look after 25, 50 or 100 passes since unless i'm missing something about dictionaries or your code it seems like the dictionary could get filled up with all coordinates if it ran long enough. Obligatory not a programmer i could be missing a lot this game is my first time programming anything. ^^
@josefuher6117
@josefuher6117 Ай бұрын
well he is creating new empty dictionary so there are no companions stored inbetween two harvest, but it can be improved by plantig companions during harvest and then just clearing field without colection of these plants. but that wold require to erase companions already planted during planting or just accepting the loss of them.
@martinniemannmortensen797
@martinniemannmortensen797 Ай бұрын
@@josefuher6117 I see thank you for explaining ^^
@KedrigernGaming
@KedrigernGaming Ай бұрын
josef is right there. I'm making a new dictionary every time so it doesn't get polluted with outdated data. The reason I did not want to go 'left' is that to the left there might be a different companion already boosting a different patch of carrots OR just another carrot with its companion possibly already being planted somewhere. So the way I see it, this would make the algorithm more sophisticated, slower, and in the end maybe not even better (same carrot yield). But keep in mind I am a programmer...which means I might have missed something major and I could be completely wrong here. Thanks for the comment though! Always good to share your thoughts and even start a fun discussion. I hope your programming journey goes well!
@martinniemannmortensen797
@martinniemannmortensen797 Ай бұрын
@@KedrigernGaming I didn't realize a new dictionary got created every time but love learning stuff and the best way to do so is asking questions and if it can cause new thoughts or ideas to do so even better. Again thank you and Josef for responding in both a kind and informative manner ^^
@KedrigernGaming
@KedrigernGaming Ай бұрын
You are welcome :) Just want to point out that I truly believe (especially) in coding, dumb questions are the best ones. You learn a lot by asking them and the person who is supposed to know things often gets an idea based on the question or their own answer. Also re-reading my message...I don't think your question was dumb at all! Just saying, if you feel a question is dumb, don't ever be afraid to ask it.
Epic Coding Fail Drove me to Tears
20:33
Kedrigern
Рет қаралды 683
I Tried Making A Particle System
35:33
Acerola
Рет қаралды 226 М.
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 36 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 3,1 МЛН
The Strange Physics Principle That Shapes Reality
32:44
Veritasium
Рет қаралды 5 МЛН
How on Earth does ^.?$|^(..+?)\1+$ produce primes?
18:37
Stand-up Maths
Рет қаралды 377 М.
I Went INSANE From This Coding Challenge
23:20
Kedrigern
Рет қаралды 2,1 М.
How Mozilla lost the Internet (& what's next)
14:09
TechAltar
Рет қаралды 139 М.
Why Are Cooling Towers Shaped Like That?
19:48
Practical Engineering
Рет қаралды 2 МЛН
I Programmed a DRONE to Farm EVERYTHING
28:47
InterndotGif
Рет қаралды 59 М.
What if everyone pointed a laser at the moon?
5:37
xkcd's What If?
Рет қаралды 1,6 МЛН
I Exploited the Best Coding Technique
12:05
Kedrigern
Рет қаралды 3 М.
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН