Real Bug Evolution


Evolving bugs that can evolve to build new nests, gather armies, smarter behavior, evolve into higher tiers. The most important - the bugs are HIGHLY ANNOYING.

Content
2 hours ago
2.0
0
Combat Enemies

Changelog

Version: 0.1.5
Date: 2026-10-01
  Changes:
    - BUILD (opcode 67) now takes a value: even builds a nest as before, odd builds a worm of the bug's tier in the cell north of it on a 3-tile grid (skipped if taken), eating the food a bug of that tier needs (small worms 100). The bug survives; worms have no genome, but their kills feed the lineage that built them.
    - A player who dies of anything else (a train, their own explosives, ...) still feeds the lineage of the nearest nest.
    - Only two settings are left: bugs per nest and bugs moving at once. The rest are fixed at their old defaults.
Version: 0.1.4
Date: 2026-09-26
  Changes:
    - SLEEP (opcode 74) is now METAB: it sets the bug's own instruction budget per think (never 0) instead of freezing it for a seconds. It still thinks every second, just working through its program slower or faster. Fixes nests slowly filling with bugs that had gone fully dormant.
    - Old saves keep working: a bug from before this version simply has a normal (fast) metabolism.
    - Bugs start dying of old age after 10 minutes (setting): they lose 16 health per second instead of dying at once, so higher tiers live longer.
    - Every lineage eats 1 food per second; a lineage with neither nests nor bugs left goes extinct.
Version: 0.1.3
Date: 2026-09-26
  Changes:
    - FOOD pushes a and e with food = a x 2^e (a < 256, exact below 256); POLL is an 8-bit float (exact below 16, saturating at about 500 000). Both replace square roots.
    - GSIZE (opcode 51) replaces NALLY: the size of the bug's group (1 alone).
    - SMOG and BLD's "no building near" are cached per chunk for 30 s.
    - A sense or finder runs once per think (repeats give the same result), GROUP once per think, and AISET takes effect when the think ends.
    - At most one nest is built per 10 ticks world-wide.
    - GOTO goes to the centre of the focus's chunk with low-priority pathfinding; MOVE (opcode 75) goes exactly to the focus.
    - SLEEP (opcode 74): the bug alone leaves its group, stands still and does not think for a seconds.
    - DONE (opcode 76): result of the last command (running, succeeded, failed or refused; + fought).
    - Bugs of a nest with no pollution in its chunk run 16 instructions per think (setting).
    - At most 1000 bugs move on their own command at once (setting); further moves are refused.
    - Old saves are not compatible.
  Optimizations:
    - BLD searches per bug only near enemy buildings, close by first; TUR uses the engine's military target search; ALLY searches close by first.
    - BUILD finds its mate through a nest grid instead of scanning every nest.
    - Settings and prototype data are cached; the bug's position and surface are read once per think.
    - Genes are compiled to Lua functions (VM about 2-4x faster); stored data does not recompile them.
    - Vanilla spawning is stopped by an impossible darkness instead of max_count_of_owned_units = 0, which is costly for the engine.
    - Debug window lists at most 100 lineages (by nests) and 100 bugs, without touching every bug entity.
    - Bugs, nests, groups and pools are arrays instead of named fields: bugs take about 60% less memory and saves are smaller.
  Bugfixes:
    - A bug the engine drops from its group thinks again; it stayed a silent member (a dropped leader hands the group on).
Version: 0.1.2
Date: 2026-09-25
  Changes:
    - A nest costs 100 food.
    - BUILD replaces nests it overlaps. Without food the lineage's oldest nest is removed instead (not its last one).
    - At most one nest is built per tick.
    - BUILD mixes genes half the time, always, with the nest nearest to a random point within 100 tiles (any distance). It no longer takes an operand.
    - Food is only eaten by building nests. Higher tiers only need their cost in the lineage pool.
  Features:
    - ARMOR (opcode 73, birth only): 10-100% resistance against one damage type (hidden unit variants); needs level x armor cost food in the pool and delays the next spawn as much.
    - Bug debug shortcut: counts of bugs, nests and lineages; expand a lineage, select a bug to highlight it and see its DNA.
Version: 0.1.1
Date: 2026-09-25
  Changes:
    - Nests spawn from script: the evolution-0 bug, only below the pop cap. Vanilla spawning is off.
    - The evolution factor and all enemy map settings except enemy-base frequency and size are ignored.
    - Existing biters and spitters are adopted by the nearest nest.
    - A unit group is one organism: only its leader thinks.
Version: 0.1.0
Date: 2026-09-25
  Info:
    - Initial version.