Wednesday, March 11, 2020

Life Game

Previously I posted about a game (really a simulation) that I made several years ago.  I called it the Fish Game.  A few years later I made another very similar simulation that I called "Life Game".

It is similar, but quite a bit more complex, and I think somewhat better written code.  In this version there are three life forms; fish, bugs, and plants.  The fish eat the bugs.  The bugs eat the plants.  The plants gain energy each frame as if they are getting energy from the sun.  Each life form has a fairly large set of properties.  These are copied to the individual life forms as they are created.

When the simulation is running you can modify these properties for the entire species, or the individuals.  In this simulation the offspring are created near the coordinates of the parents.  This creates a nice affect where the plants appear to slowly spread across the game area.

The code is also setup so that it would be easy to add other life forms.  I didn't build that into the simulation.  I think it would be easy to do though, and I may create an updated version at some point.  I'm think of converting the whole thing into a phone app, but we'll see if that happens.

No comments:

Post a Comment

Python Particle Simulation Update

 I don't have much to update about, other than the fact that the simulation still makes sense.  I haven't run into any problems that...