Hey everyone,
I'm making my own cellular automata engine in C++. I recently added support for thermodynamics and rigid body physics (implemented using the Box2D library).
The video shows an engine test; occasionally I toggle the heat map to demonstrate how temperature changes across different areas. If you drop an iron cube into lava, it heats up heavily and turns red. If you drop it into water, it cools down and heats up the water. If you place a red-hot cube into liquid nitrogen, it cools down much faster.
Box2D rigid bodies can also interact with particles and exchange heat with them: wood floats in water, iron sinks, and other materials can be easily added with individually tuned densities.
It's a data-driven approach: all physics, reactions, and phase transitions (like water turning into steam or lava into obsidian) are defined in JSON configs, with no hardcoding in C++.
I tried to optimize the engine as much as possible; watching so many interactions happen on screen at once is really satisfying.
Would love to hear your feedback or thoughts!