r/Simulated • • 7h ago

Interactive Working on a fully simulated ecosystem game, what do you think?

Enable HLS to view with audio, or disable this notification

246 Upvotes

r/Simulated • • 1h ago

Research Simulation A spinning black hole you can orbit in your browser: real-time ray tracing, spin 0 → 0.998, then Interstellar's color grade

Enable HLS to view with audio, or disable this notification

• Upvotes

Try it: https://kerr-black-hole-roan.vercel.app

Real-time general-relativistic ray tracing. The disk brightens on the side moving toward you, reddens near the hole, and the stars behind it bend into an Einstein ring. Drag to orbit, scroll to zoom.

Built with Claude Code (Opus 5.5). Code: https://github.com/SkyWalkerPS/kerr-black-hole


r/Simulated • • 5h ago

Interactive Real-time 3D starling murmuration, simulated and rendered inside a terminal (C99, no dependencies)

Enable HLS to view with audio, or disable this notification

16 Upvotes

I'm the creator of Cbirds, a bird flock simulator that runs in the terminal, written in C99 with no dependencies and inspired by Craig Reynolds' Boids algorithm. This is its 3D mode, running in Ghostty on macOS.

How the 3D flock works: each bird only listens to its nearest neighbours, seven by default as real starlings do, instead of everyone within a radius. On top of Reynolds' three rules (alignment, cohesion, separation) there is a pull toward a roost that keeps the flock in view, and a slow drift in the air over the roost. The bands, the splits and the folds in the video all come out of those rules. The camera goes once round the flock every two minutes, and nearer birds are drawn bigger and brighter.

Everything is simulated and drawn on the CPU and sent to the terminal as images through the Kitty graphics protocol. The panel in the corner shows what a frame costs: in this clip about 15 ms to simulate, draw and send, about 54 KB to the terminal, at 59 fps. The sliders tune the simulation while it runs.

I started the 2D version in September 2025, mostly out of curiosity, after seeing antirez's C64 terminal emulator (https://github.com/antirez/c64-kitty) and a lecture by Pier Luca Lanzi on multi agent systems at Politecnico di Milano. I did get quite a bit of help from coding agents along the way. One useful thing I ended up building was a custom GIF encoder, so the agents could visually inspect the simulation and check whether their changes worked.

It also has hawks that chase the flock, multiple flocks that merge or avoid each other, text piped in that takes flight (`cat file.txt | cbirds`), Braille rendering for any terminal, and birds that fly between terminal windows.

Source: https://github.com/clainstone/cbirds
Command: `cbirds --render kitty --3d --color prism`
Install: `brew install clainstone/tap/cbirds` (also MacPorts, apt and Nix)