I’ve been working on learning the Godot engine, and wanted to pick up a project that would allow me to get a basic understanding of the engine.
I played Sim Earth back in the day and that reminded me of the Daisy World scenario it had. I wanted to see if I could code that up in the Godot engine.
The premise of Daisy World is fairly simple. You have a world in which only 2 species of daisy exist, white daisies and black daisies. White daisies prefer warm temperatures, but have a cooling effect on the environment. Black daisies prefer colder temperatures but have a heating effect. Both daisies have the same ideal growth temperature. The further away the temperature moves from the ideal The more frequently the daisies will die. The temperature for the next tick of the world is adjusted based on the percentage of black and white daisies in the world. If there are more black daisies the temperature increases and if there are more white daisies the temperature decreases.
The mathematics behind the simulation is fairly simple, using linear functions for determining growth and death rates. The chance for a new tulip to grow on an empty plot of land is a fixed 10%, while the probability for the grown tulip to be black for white is linear between the temp range of 0c to 50c. At 0c all new tulips are black while at 50c all new tulips are white. The chance any given tulip will die is also linearly determined, based on how far the world temperature is from the ideal 25c. At 25c the chance rto die is 0% and is capped at a max of 50%.
I also added some buttons that would allow me to raise or lower the temperature of the world. The ideal temperature that I set for the world was 25°C if the temperature went above or below this, the growth of the daisies adjusts the temperature back to the ideal.
I used to upload my builds to itch.io, but figuring out the build system for Godot was not a priority at this time. The engine is set to create a web build, which is currently incompatible with using c# based scripts.
I also wanted to have some way to graph the state of the world’s parameters over time, will probably look into that next.