HNHacker News
TopNewBestAskShowJobs

geminigemino

16 karma · joined January 21, 2026

submissionscomments
geminigemino··on A simulation where life unfolds in real time
Thanks for the feedback. There are some O(n²) components (mate finding, pathogen spread, proximity), but they’re mitigated with zone-based spatial hashing and throttling, so it’s not naive all-vs-all.

One big recent win was actually on the rendering side: I was rebuilding complex morphology geometry every frame for large organisms. I’ve added caching for that, which significantly reduced spikes during population blooms.

At very high populations the sim tick itself becomes the bottleneck, even for mostly O(n) logic per organism. When populations crash (which they usually do ecologically), performance recovers.

Quad trees / more adaptive structures are on my radar, but I’m trying to balance complexity vs predictability for now.

geminigemino··on A simulation where life unfolds in real time
Lineage colors themselves should be stable. What you’re probably seeing is the transparent colored zone backgrounds, which visually tint organisms as they move through different niches. That’s intentional, to give quick visual feedback about which environment they’re in.

Lineages can change color if they diverge enough to be treated as a new distinct lineage, but that’s a separate case.

geminigemino··on A simulation where life unfolds in real time
That’s wild, thanks for the detailed explanation. Super cool mechanic
geminigemino··on A simulation where life unfolds in real time
Thanks, glad you liked it!
geminigemino··on A simulation where life unfolds in real time
If mine ever start chirping, I will pull the plug.
geminigemino··on A simulation where life unfolds in real time
Mostly pretty standard React stuff: React + Vite + TypeScript, Tailwind for styling, and shadcn/ui (on top of Radix) for most UI components. Charts are done with Recharts.

The actual simulation and arena rendering is all custom using the Canvas 2D API, no rendering libraries there.

geminigemino··on A simulation where life unfolds in real time
Thanks, glad you enjoyed it. Performance-wise, big blooms and ecological events can be surprisingly expensive even with optimizations, so you’ll see occasional spikes that usually settle again.

Not sure yet on open-sourcing. Appreciate the interest!

geminigemino··on A simulation where life unfolds in real time
Yeah, I definitely vibe coded parts of it, especially some of the graphs, but a lot of time went into the actual mechanics and how the systems interact. I also got a lot of pushback from my girlfriend (PhD in virology, teaches evolution), so she kept asking hard questions and forcing me to rethink things. And my kids do a check their worlds every morning, collect organisms and use the narrate feature to see what happened overnight, and their honest feedback helped a lot :D
geminigemino··on A simulation where life unfolds in real time
That’s really cool, nice work! I just tried it and was petting for a bit. What does observe do? It asked for camera permission and now I’m curious.
geminigemino··on A simulation where life unfolds in real time
Thanks for flagging. That error usually isn’t caused by the site itself, but by something intercepting HTTPS on the network side I think. Maybe something with VPN, netork or antivirus?
geminigemino··on A simulation where life unfolds in real time
Thanks! I get that and short version: it’s not a realistic genetic model, it’s a trait-inheritance system with evolutionary flavor.

Each organism just has a set of numeric traits (size, armor, spikes, tentacles, aggression, reproduction rate, etc). There are no genes, codons, chromosomes, or genetic sequences. When organisms reproduce, offspring traits are basically noisy, heritable copies of the parents, with per-trait heritability and mutation.

Structural traits (like size) are strongly inherited, behavioral traits are more plastic. Big size, armor, high reproduction, etc all come with metabolic and mobility tradeoffs and mutation rates can go up under stress.

So it’s a phenotype-level evolutionary model, not a molecular genetics simulator. The goal is to get interesting evolutionary dynamics and tradeoffs, not to simulate real DNA or genetic architectures.

You can zoom into (and capture a snapshot of) each organism by clicking it and see a lot of details on traits.

geminigemino··on A simulation where life unfolds in real time
Thanks, really appreciate that feedback.

Totally agree on hover help. Only a few parameters have it now, but adding tooltips across the board is on my list so it’s easier to explore while it runs.

You can also use the narrate function to make a bit more sense of it.

On long-term behavior: I’ve run hundreds of long sims, many over a million ticks, and there isn’t one stable end state, sometimes I end up with one lineage of giants but even they got taken over or go extinct. I usually see eras in size, traits, and cognition, with different dominant lineages over time. Sometimes big organisms appear quickly, sometimes it takes hours, and some worlds crash early.

I also agree a short narrative layer would help explain what’s going on. Some of the underlying assumptions are described here if you’re curious: https://soupof.life/concepts

geminigemino··on A simulation where life unfolds in real time
Yeah, that’s probably because the panel with organisms didn’t load. A refresh usually fixes it. If you’re still not seeing it, let me know which device/browser you’re on, that helps a lot for debugging.
geminigemino··on A simulation where life unfolds in real time
I love it and really impressive, thanks for sharing! Soup of Life organisms have a bit more simple brain visualisation :D soupof.life/card/1wt8olc1

If you are interested you can read more on how I implemented brains here: https://soupof.life/concepts/life-organisms/cognition

geminigemino··on A simulation where life unfolds in real time
Thanks! Morphology does affect both movement and metabolism, but by design it’s modeled as biological abstraction rather than full physics.

Traits like spikes, tentacles, lobes, adhesion, and size add drag/weight, so complex or armored bodies are slower and less agile. Bigger bodies and complex structures also have higher metabolic upkeep. It’s not true fluid dynamics or area/volume math, but it’s tuned to produce the same evolutionary tradeoffs.

So you get: big and complex = strong but slow and hungry. Small and simple = fast and cheap but fragile.

geminigemino··on A simulation where life unfolds in real time
Good catch, you actually found a bug. The predation (and dormancy) weights were being multiplied by scarcity/emotion modifiers, but in some early-return paths the original values were never restored. That meant the weights compounded every tick and could blow up exponentially into these absurd numbers.

That also explains the slowdown: once those values get extreme, a lot of the probability and normalization math gets very expensive.

It’s fixed now by restoring the original weights before every early return. Thanks for flagging it. That was a legit bug.

geminigemino··on A simulation where life unfolds in real time
Sure: https://www.reddit.com/r/InternetIsBeautiful/comments/1qfoej...
geminigemino··on A simulation where life unfolds in real time
Fair question. By real time I mean the simulation is continuously running and evolving while you’re watching it, not that it’s synced to real-world biological or physical time.
geminigemino··on A simulation where life unfolds in real time
Yes, some parts are inherently O(n²) (mate finding, crowd density, predator/prey proximity, pathogen spread). Ecology needs pairwise relationships.

To keep it sane, I don’t do naive all-vs-all. I use:

Zone-based spatial indexing so most checks only run against local neighbors (roughly n/16 instead of n). Temporal caching of indices so they’re not rebuilt every tick. Statistical sampling for crowd density at high population (estimate from a fixed-size sample instead of full scans).

So in practice it’s closer to O(n² / k), with k ≈ 16–50 depending on zone layout and population. You still see spikes during blooms, but it’s usually 10–30× faster than naive pairwise checks.

geminigemino··on A simulation where life unfolds in real time
If you’re interested in what’s happening under the hood (and what isn’t), I’ve documented the concepts and abstractions here:

https://soupof.life/concepts

It’s a living doc, but should answer quite some questions.

geminigemino··on A simulation where life unfolds in real time
FPS dips usually line up with big ecological events (population blooms, mass reproduction, lots of giant organisms, pathogen waves). The sim and rendering are decoupled, so you get (hopefully) brief spikes when a lot happens at once, then it settles again as populations crash/thin out. It’s normal behavior, not a runaway bug.

I’ve spent a lot of time optimizing hot paths and getting calculations down, but when the ecology goes a bit wild, you’ll still see temporary spikes. If you want to focus on stats only, you can switch to Simmer mode (no graphs) or turn off the arena, which reduces rendering work quite a bit.