Skip to content

Physics simulation · 2021

Sand Box

A C++ sandbox where sand, water, fire and acid react to each other.

The project

Sand-Box is a falling-sand simulation. The window is split into 5 pixel cells, which gives a 320x180 grid, and each cell holds one element.

I wrote eleven elements, grouped by state (solid, powder, liquid, gas), which sets how they move. Each one adds its own rules: fire ignites wood, snow and ice melt over time, steam condenses back into water, acid dissolves what it touches.

You place elements with the mouse and a selection bar switches between them. The project uses SFML for rendering and Xmake to build.

Next project
Maze Generator & Solver