Open hhyyrylainen opened 2 years ago
Could we just compute the growth path when saving an organism from the editor? Or is the order of growth not deterministic.
That would be possible as well but all species need to have the growth path computed and it needs to be made sure that cells that were partially grown when entering the editor can continue growing properly.
Ok looking into this a little more it looks like the best solution is probably to just keep track for each cell of where the last organelle was grown to and start the spiral from there. If we compute a growth path for every species on exiting the editor I worry the extra time before getting back to gameplay might be annoying if there are many large species around.
Here is a bonus from me (the largest cells which I had ever created in Freebuild mode):
Turns out that the membrane generation for huge cells took up a lot of time, so with https://github.com/Revolutionary-Games/Thrive/pull/4251 done this should be less of an issue. But still the logic for finding a place to put a duplicated organelle does still get very expensive computationally in truly huge cells.
I'll write that there is now endosymbiosis soon in the game which will create extraneous organelles, which also need positions calculated for them. So the approach of pre-calculating a growth pattern is not possible.
probably caused by the approach of starting at 0,0 coordinates and spiraling outwards until an empty spot is found. That probably starts running quite long when the cell is very large in radius.
I think we have two choices to fix this: