Update: Astral Realms Artificial Life Simulator

 

This is just a quick update regarding my progress on Astral Realms. I have almost completed what I am calling the "Artificial Life" Simulator. This essentially creates and maintains the world's environmental objects.


The system is relatively simple at the moment, but will be expanded on in the future.

The system models several different types of soil, minimum and maximum rainfall and temperature for many different "zones" in the game. It then creates a year with a random or user-defined number of months and length of day, and decides on the minimum and maximum temperatures and rainfall levels for the year, and interpolates those values with a randomising factor for each month. This means the rainfall and temperature will gradually increase and decrease from season to season in a realistic fashion, instead of just choosing a random value for that month.

Values have extensive randomisation, with support for "freak" or highly unlikely occurences, such as heat waves, storms, blizzards, droughts, etc, where the rainfall and temperature values are completely unexpected.

Objects can only survive in certain climates, and will slowly die if the climate they are in exceeds their tolerance limits. This allows a sudden, severe frost, or a heatwave to kill off certain plants and trees, for example.

Objects support multiple state changes. They can change from month to month, (allowing for seasonal changes) day to night, (allowing modelling of certain flowers that only flower during the day, for example), and each object also has a life cycle.

This life cycle allows the object to grow from a seed, for example, into a seedling, then a tree, before it finally dies. During some states, the object may be "germinating". At the moment, only two kinds of germination are supported: Wind and Scattering.

When the Wind is used to germinate an object, a gust with a given direction and strength picks up the seeds from an object or objects and scatters them in the direction of the wind, where the seeds fall and may grow into new seeds, given the soil and environmental conditions.


Scattering in similiar, but has a shorter range. With this system, the objects seeds are shot over a small area adjacent to the plant, and grow in clumps around it, allowing it to slowly "creep" across the landscape, assuming the environmental conditions are favourable.

 

This system is proving to be incredibly complex to design and debug, especially since it it for a multiplayer game and all of the code needs to be optimised to allow for many concurrent data requests from the SQL database. So far, however, I am hapy with it. It seems to work quite well.

At the moment, new objects are added directly to the database, but in future, of course, a gui or some kind of intelligent system would be used to parse art files into the database automatically.

The next step is some more debugging, and then I will begin work on the system which will allow the user to modify the environment, by cutting down or planting trees, growing plants, clearing areas of land, refining raw materials for building, etc.

You must be a member of this blog to see the comments. Log in now!