Artificial evolution
This is a little entertainment project, evolution simulator. The code itself is far from best. Lazily written, a lot of code in headers, unconditional jumps at couple of places etc. I'll make it better in later versions!
-
SDL
-
Dear Im GUI
-
sdl + ImGUI Implementation from here https://github.com/Tyyppi77/imgui_sdl
-
Visual studio 2022 and all the tools needed to build C++ apps
- Set include directories for all libraries listed above. And paths for SDL dll-s.
- Place imgui_sdl.h, imgui_sdl.cpp and SDL2_ttf.dll at project root, or change #include paths in headers
- Enjoy!
Contains all info about simulation
Info about your PC
- Start/Stop button (Pause/unpause)
- food - ignore it
- skip - how many turns you calculate before you draw new frame (set to 0 if you want render on every frame)
- brush - brush size for mouse actions sich as remove
Info about selected bot, some useful buttons to mess with it
Rendering method.
- Bot natural color (just its color)
- Bot rations (carnivores red, herbivores green, grey if never ate)
- Energy (yellow = low energy, red = maximum energy)
- No render means you only compute without rendering, starts to simulate very fast
Whatever
Choose what to do with your mouse clicks
Some more windows
Using keyboard is more handy because interface becomes laggy during simulation
- "Space" - Start/Pause
- "Plus sign near numpad" - make 1 step
- "Backspace" - Spawn group of randoms
- "Numpad 1-4" - Select render method