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Ай бұрын
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Ай бұрын
@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Ай бұрын
That is good to know! Thanks :)
@DavidHenderson-ct1egАй бұрын
Am I missing something, you have x position and y position already in row and col variables from the for loops...?
@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Ай бұрын
I bet it's 4800 carort per field since they grow 4 in one spot, witch is source of your miscalculation
@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Ай бұрын
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Ай бұрын
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Ай бұрын
@@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Ай бұрын
Dont we all just need Companions every now and then? XD
@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Ай бұрын
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Ай бұрын
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Ай бұрын
@@josefuher6117 I see thank you for explaining ^^
@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Ай бұрын
@@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Ай бұрын
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.