Topic: Making wild animals reproducible
Solstice_s_Return
Topic Opener |
Posted at:
2020-02-22, 21:34 UTC+1.0
+1 I think it would be nice thing to have it as described above even after considering the arguments posted after Nordfriese's suggestions. It adds to the game world and is a nice detail to discover as was the natural tree growth cycle for me when I recognized it the first time and I still think it is very nice. This thing won't have such a high impact to gameplay even if it makes critter population grow or shrink. I still think it would be the most great if the effect can be slowly visible if a player maintains big enough forest/chops most of all trees down as usually happens, but If not, even then it would be a nice detail to discover and adds to the game that way.
Top
Quote
|
king_of_nowhere
|
Posted at:
2020-02-22, 22:53 UTC+1.0
i worry that this would make it too hard for an herbivore population to recover when reduced in number. it makes reproduction much more difficult. in ecosystems, reproductive rate of existing members is not impacted too much by depleting population. I would therefore remove the need for another animal to reproduce and just have herbivores spawn spontaneously. also, to avoid predators going extinct and then prey going wild, i'd add a clause that the animal won't spawn if there is another similar one nearby. so, i'd make the condition like that prey: "every 10 minutes spawn with a 25% probability unless there is another similar animal within 5 corners" predator: "if comes in contact with prey, kill prey with 50% chance. if it killes 2 prey in less than 10 minutes, 25% chance of spawn. if it does not eat for 30 minutes, 25% chance of death. 50% chance of death every other 10 minutes until it eats again".
Top
Quote
|
JanO
|
Posted at:
2020-02-23, 08:40 UTC+1.0
Would it make sense (to the game, not for realism) to not have static probabilities here but instead calculate them based on the number of individuals of the involved species in the area around? Like this:
At least we need something to prevent herbivores which stay a while on one field together to start into mass-reproduction
Top
Quote
|
|
Nordfriese |
Posted at:
2020-02-23, 11:15 UTC+1.0
+1
Top
Quote
|
hessenfarmer
|
Posted at:
2020-02-24, 12:51 UTC+1.0
I am still not convinced whether this would not produce a very high CPU load. As far as I know we still officially support Netbooks (from a resolution point of view and therefore from a processor load as well).
Top
Quote
|
|
Nordfriese |
Posted at:
2020-02-24, 13:55 UTC+1.0
No. It would be enough that every critter checks this autonomously whenever it enters a node and goes into idle mode.
Top
Quote
|
hessenfarmer
|
Posted at:
2020-02-24, 14:41 UTC+1.0
Hm, from the discussion I was not aware that this should only happen in idle mode.
Top
Quote
|
|
Nordfriese |
Posted at:
2020-02-24, 14:57 UTC+1.0
The current behaviour of all animals is that they pick a destination within a radius of 2 fields, go there, idle for a random time between 1000 and 3000 milliseconds, then pick the next destination and so on. This is defined in Implementing reproduction, carnivory, herbivory, and animal death would all go into this function, where their effect on CPU load is negligible. Querying the map for bobs and immovables on a certain field or within a modest radius is a very CPU-efficient task that is done all the time by workers/buildings with work areas.
Edited:
2020-02-24, 14:58 UTC+1.0
Top
Quote
|
hessenfarmer
|
Posted at:
2020-02-24, 16:03 UTC+1.0
Maybe this would be doable. However currently I beleive the critter does not know where he is, so while moving he would need in every step if there is another critter on its current field so we would need to implement this in in the Bob's program to move around.
Difference is that this is only called once or twice in a working program of around 50 to 100 seconds. Furthermore in large maps critters might get very numerous until a hunter arrives. We have maps where already a lot of critters are placed from map designers. So this may get bigger then you think, but we could try this and do some measurements. Still we need to implement size of critter to make this work properly. Alternatively we could define the critters to be hunted by carnivores.
Top
Quote
|
|
Nordfriese |
Posted at:
2020-02-24, 16:18 UTC+1.0
Yes he does: And he has simple access to all other bobs on his field with this standard iteration loop:
And such checks are very efficient, C++ is really fast.
I think this would be best. Critters would get an array of names of critters they can eat in the init.lua. An empty array would indicate herbivores (who eat fields), no value given means no interactions at all (like ducks). EDIT: How about I just make a branch with this (expected effort: <<1h) and then we can test it
Edited:
2020-02-24, 16:26 UTC+1.0
Top
Quote
|



