16 karma · joined Jan 21, 2026 (10mo ago) · 21 submissions
comment 10mo ago · link · parent
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.
comment 10mo ago · link · parent
Lineages can change color if they diverge enough to be treated as a new distinct lineage, but that’s a separate case.
comment 10mo ago · link · parent
The actual simulation and arena rendering is all custom using the Canvas 2D API, no rendering libraries there.
comment 10mo ago · link · parent
comment 10mo ago · link · parent
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.
comment 10mo ago · link · parent
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
comment 10mo ago · link · parent
If you are interested you can read more on how I implemented brains here: https://soupof.life/concepts/life-organisms/cognition
comment 10mo ago · link · parent
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.
comment 10mo ago · link · parent
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.
comment 10mo ago · link · parent
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.
comment 10mo ago · link · parent
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.