Always nice to see all those projects going on. Now, my turn!
It has been quite some time since my last
"publication" around here. Today I'm showing the sequel: instead of a simulation of mice and scorpions it's about ants and termites in a toric world.
Here are a few screenshots (click to zoom):
The first one is without debug information. If you look closely you can see the anthills with their ants soldier (in red) and ant workers (in black) that follow the pheromones to bring back food to its anthill, but also the termites that will kill the ants.
The next two images shows more debug information, such as the "HP" (red), anthill id (pink), the amount of food transported (black), the field of "view" (blue) for pheromones (green) and the direction of each animal.
And here is a short gif showing everything in action:
One of the most challenging part of the project was the implementation of the ant AI and how they move. It was the first time I used
std::piecewise_linear_distribution and I hope it was the last time!
Next semester, SFML will again be used for the C++ introductory course in Life Science School at EPFL. But this time we will use SFGUI to be able to customise in live the simulation settings (time speed, animals' speed, and many many more). We will also have some (very basic) population graphs. I hope the students will have as much fun as I did while coding those projects!