Programming plants
The plants are created beforehand using a plant generator application. It allows the user to set the plants parameters and reactions to a variety of factors.
At run time each plant species (identified by a unique ID) is passed, via the plant manager singleton, its squares parameters. The plant species returns a texture ID based on its programmed ‘state’ during the render call.
During the Update call it takes some action (dies, grows, reproduces) based on its codes and the terrain parameters.