SebLague / Slime-Simulation

https://www.youtube.com/watch?v=X-iSQQgOd1A
GNU General Public License v3.0
1.39k stars 244 forks source link

Getting slime to do what I want #10

Open Overheal opened 2 years ago

Overheal commented 2 years ago

Ok so now that I have the code running...

I notice that for Settings, only D seems to affect the simulation - I could have 250k agents in A, B, C, and it wouldn't show anything, I could have 1 agent in A,B,C, and 250k in D, and it will run with full populations of each slime colony. Weird. Setting each ABCD to 1 species results in a purple slime colony.

What I'd really like to do though is have the slime colony treat the left side and right side of the screen as 'food.' Right now if you run the simulation, the colony just sprawls out over time into a mesh. I'd prefer to get the simulation to work so that the slime colony optimizes pathways between the left and right sides of the screen, all but ignoring the top and the bottom of the screen, where no food should be (it doesn't have to be moving food, it can treat the sides as goals). I'm hoping that will result in interesting meshes reflecting a tension of a sort between the left and right side of the screen, that's still recognizable as a lattice/mesh but with a clear L/R bias. How do I make this modification to the code?