/EvoC2D

Evolution simulator written in C and OpenGL

Primary LanguageC

EvoC2D

Evolution simulator written in C and OpenGL. More info and demos at https://joeycollins.github.io/EvoC2DSite/

Precompiled Release

An executable is in the /CompiledRelease/. Run this from within the directory.

Compiling EvoC2D

EvoC2D was written for Windows machines. Requires opengl32.lib. This is installed by default with Visual Studio C++ development.

Requires CMake. If compiling from CMake-Gui, set the source directory to the root of this repo and set the destination directory to the folder where you would like the project to be build. Click configure and then generate.

If compiling from the command-line there are many options, one such is as follows.

C:/EvoC2D> mkdir build
C:/EvoC2D> cmake -B "C:/EvoC2D/build/"
C:/EvoC2D> cd build
C:/EvoC2D/build> cmake --build .

All dependencies of the project will be downloaded and compiled during this process. As of now, there are three: GLFW, CGLM, and freetype.

Open the project in your build folder with visual studio, right click the solution, goto Properties>Common Properties>Startup Project>Single Startup Project and change the value from ALL_BUILD to evoc2d from the dropdown menu. Apply changes.

Once the external projects/dependencies have been built, I recommend preventing them from being rebuilt in your solution settings; Solution>Properties>Configuration Properties>Configuration>uncheck build option for glfwProj, freetypeProj, and cglmProj. Turning off build for these projects will speed up the build time of EvoC2D.

Run the program.

Controls

Left click on Creatures to view inspector window.

  • i - opens/closes inspector window
  • mousewheel - zoom
  • w,a,s,d - camera movement
  • space - reset camera
  • esc - quit