Built with Claude: SunaBox- Fluid Sandbox Game built in dedication to 2008's OE-CAKE that runs in your browser!
sunabox.dev — free, no account, opens in one click!
Some fun things to try:
- Paint sand and then hit it with lightning - it turns to molten glass and cools transparent!
- Drop "Orbies" (Orbeez) onto water and watch them swell and grow.
- Connect Mortars (fireworks) with a fuse and light the fuse for a personal fireworks show.
- Heat popcorn kernels until they burst into fluffy popcorn and steam!
- Wax behaves like a lava lamp: melts, rises, cools, sinks.
- Drop some metal into a pool of acid, and ignite the fumes!
- Play with gravity, emitters, collectors, vehicles, wheels, rigid bodies, elastics, PNG-as-material imports, fun visual styles, session recording and playback, and more!
SunaBox is a from-scratch rebuild of OE-CAKE, the popular 2008 physics toy that effectively fell off the radar. I've included a Classic mode that recreates the original interface, and it even supports the same .oec files people made fifteen years ago.
Drop any PNG in and it becomes matter. Light a fuse and watch it carry fire to your nitro-bomb!
A more feature-rich version of the game will be coming soon to Steam, if you'd like to wishlist and support this project.
Nitty-gritty about the project:
Some of SunaBox's features are only possible due to SunaEngine: an open source, cross-platform bit-deterministic WebGPU particle physics engine, also made with Fable 5: https://engine.sunabox.dev
This engine/game started out about a month ago as an idea for a data encoding format. I was experimenting with storing data in images and movies with Claude, and suddenly it struck me: "What if we could store data within the various reactions of a particle physics engine, like Powder Toy / OE-CAKE?"
It occurred to me that between the various kinds of materials and the way they interact with each other, a lot of information could be stored in a recorded physics sandbox gameplay session.
What I didn't know was that this was basically impossible with a typical physics sim, which usually relies on floating point math to calculate interactions between particles (long decimal numbers where the end is rounded off). This slight rounding error introduces chaos into floating point simulations; which makes most particle simulators impossible to encode data with!
There's another layer of chaos introduced in the way that different GPUs calculate physics interactions, with different GPUs delivering solutions in different orders.
SunaEngine solves this in a novel way by using integer-based, bit-deterministic physics, and accumulates the solutions in the correct order before rendering a frame- it's been tested to be consistent across NVIDIA(RTX 2070S), ARM (Steam Deck), Apple Silicon, iPhone, and Intel integrated graphics.
It sounds simple, but there's not much like it out there, and I've made it open source for everyone to build with.
And of course, it's not limited to 2D; SunaEngine can be used to build 3D games too.
This actually unlocks some **REALLY** cool potential applications
- Low latency, cross-platform, multiplayer physics: When all of the GPUs compute physics in the exact same way without variance, only player inputs need to be streamed over the network in order to have accurate, fast multiplayer physics games.
- Session capture, smooth rewind, and playback - session captures can be saved in very small file formats, replayed on anyone's machine, smoothly scrubbed through like a movie in forward and reverse, and will always render exactly the same, no matter which device you play it back on. (Unless you interact with the scene mid-playback, which is also possible)
- Research and world models: SunaEngine was built for SunaBox which is, essentially, a toy - but, it can be tuned to more closely resemble real-world physics. With realistic physics and bit-determinism - research simulations can be easily saved and reproduced for inclusion with whitepapers. Predictable, small formats for environments in which to train world models.
I'm happy to answer any questions about the engine, game, build process, etc.