A developer ported the classic Simulated Evolution simulation to PICO-8 in Lua, solving memory, scrolling, and numeric constraints along the way.
Key Takeaways
PICO-8’s spritesheet used as a packed 19x13 grid of 8x8 tiles to represent a 150x100 world map without a separate 15,000-element array.
PICO-8 uses 32-bit fixed-point numbers (16 fractional bits), not plain 16-bit integers; dividing values by 2 sidestepped the signed range limit.
Lua’s hashtable-based arrays made safe mid-iteration mutation impractical; BORN/DIED staging tables replace the C array-swap pattern.
CAMERA() and CLIP() handle scrolling and world-border rendering cleanly; bugs render as sprites, leaving the spritesheet bitmap free for plankton tracking.
MENUITEM() drives a Garden of Eden toggle and simulation reset from the pause menu; Python generated the 247-tile hex map data.