3D Falling Sand Simulation - That might have gameplay of some sort in the future.
  • C 94.4%
  • C++ 5.2%
  • GLSL 0.2%
  • CMake 0.1%
Find a file
insberr 973eb5b611
All checks were successful
ci/crow/push/build Pipeline was successful
ci/crow/tag/build Pipeline was successful
maybe had the url wrong
2026-07-21 09:39:29 -07:00
.crow maybe had the url wrong 2026-07-21 09:39:29 -07:00
fonts Code clean up and GUI/text rendering and a scene system (#23) 2025-07-24 09:15:01 -07:00
include temp: remove glad submodule ? 2026-07-21 08:53:27 -07:00
shaders Sprites work! Added button sprite. (#24) 2025-07-24 15:25:00 -07:00
sprites Sprites work! Added button sprite. (#24) 2025-07-24 15:25:00 -07:00
src switch glew to glad because glad is better 2026-07-20 17:27:00 -07:00
.envrc Nix flake? In my code? Did I git gud now? 2026-02-09 14:42:31 -08:00
.gitignore first off, lets remove the .idea folder! 2026-07-18 02:04:22 -07:00
.gitmodules switch glew to glad because glad is better 2026-07-20 17:27:00 -07:00
CMakeLists.txt switch glew to glad because glad is better 2026-07-20 17:27:00 -07:00
flake.lock build flake and gitignore lol 2026-02-09 14:44:22 -08:00
flake.nix updated build instructions! 2026-07-20 09:04:55 -07:00
LICENSE add LICENSE 2026-07-21 08:27:05 -07:00
README.md updated build instructions! 2026-07-20 09:04:55 -07:00

Archea

Archea is a 3D Falling Sand Simulation I am developing because I am bored and love falling sand simulations. I also needed an excuse to learn graphics programming and to make a custom game engine. This project has been a bit of a challenge so far and has been through multiple rewrites. See Journey Of Archea

You can watch me work on this project live on Twitch.
You can watch the stream VODs on my YouTube.
If you don't feel like watching the streams (I don't blame you, they are long), you can watch my dev log videos instead

Development Setup

Clone the repository. Use --recurse-submodules when cloning to fetch submodules

git clone --recurse-submodules https://github.com/insberr/archea

If you forgot to clone with --recurse-submodules, you can fetch submodules by:

git submodule init
git submodule update

To build and run:

cd archea
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S ./ -B ./cmake-build-debug
cmake --build ./cmake-build-debug --target archea -j 30
./cmake-build-debug/archea

Notes About MacOS

Unless you can get OpenGL4.6 or later working on MacOS, you are out of luck. The shader code uses OpenGL4.6 features and the program will crash when you run it.

Wording

  1. Particle - Refers to a voxel which is simulated (i.e. sand, water)
  2. Voxel - The cubes you see in the world, duh

Journey Of Archea

Here is the journey I went through and some history LOL.

I started out trying to make a 2D falling sand simulation in Godot using C# with a friend. We made some progress but kept dealing with performance issues. We stopped working on it shortly after.

Later I started trying to make a 3D simulation in rust using the Bevy game library. I quickly learned two things:

  1. I needed to make my own engine specifically for the simulation.
  2. Rust wasn't working well for me. I needed to switch to a language I was more comfortable with.

So I decided to switch to c++ and start learning graphics programming. I started out by following a YouTube tutorial to learn directx11. (My learning_d3d11 repository).

I started making a 2d falling sand game in directx11 and quickly made it 3D because I am impatient.
Then decided my code was too messy.
I started looking for ways to render the particles and discovered ray marching. Ray marching seemed interesting so I started experimenting with it in shader toys.
I started learning opengl and messing with ray marching. Once I had a handle on that I came back here (to Archea) and started rewriting it in c++.
3 Days later I have a basic engine working, ray marching working, opengl working, ImGui set up, and a very basic simulation of particles.

I have been spending way too much time working on the shader. I really need to start working on the simulation itself.