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.
Wednesday, March 11, 2020
Subscribe to:
Post Comments (Atom)
Coding
I'm not sure where I heard this, and it wasn't worded this way, but it helps to think about coding this way. Basically, any progra...
-
Some Android applications use space on your Google Drive to store data. You can't see this data by browsing drive the normal way. You ...
-
I recently migrated a site from Magento 1 to Magento 2. The product image thumbnails work differently in Magento 2. In Magento 2 they use ...
-
Here is another small JS project that I built quite a few years ago. It was basically just an exploration of the canvas tag, which was some...
No comments:
Post a Comment