10 Killer Game Apps | The Lattice Deployed | Free O(1) Game Logic
⚡">
10 Killer Game Apps
The lattice deployed. 10 hash tables. O(1) lookup. 0 latency. Polyglot.
10<br>Apps
Dependencies
Lookup
100%<br>Offline
Free Download<br>Learn More
Every Game Is a Lookup Table
NPC reactions. Item combos. Damage calculation. Dialogue branching. Quest progress. Loot drops. State transitions. World generation.
All of these are (input) → (output). The lattice IS the game engine.
A hash table replaces 100,000 lines of game code with 1 file.
What Is the Lattice?
The lattice is a 61-atom semantic execution substrate. It is a universal lookup table that maps inputs to outputs in O(1) time with zero dependencies. Originally derived from a cross-language error taxonomy (61 programming error domains from Rust, Python, TypeScript, Go), the lattice generalizes to any domain where (state, event) → (action) is the dominant pattern.
Sub-microsecond Lookup<br>1,348 nanoseconds per query. That's 741,667 lookups per second per core. Below human perception.
🔒<br>Zero Dependencies<br>No LLM. No API. No network. No database. No Redis. Just a Python dict.
🌐<br>Truly Polyglot<br>Same lattice deploys in Python, Rust, C, Go, JavaScript, WASM, or JSON. Identical output across all surfaces.
💾<br>Single File Per App<br>Every game app is one Python file. No build step. No compilation. No package management.
🔎<br>Deterministic<br>Same input, same output, every time. No randomness in lookup. Perfect for testing and replay.
💰<br>Freemium Ready<br>Ship the free tier today. Monetize the extended atom sets. No backend. No subscriptions to manage.
The 10 Apps
Each app is a standalone Python file. No shared source. No imports between them. Click "Try it" to run in your browser via Pyodide, or "Download" to get the source.
01<br>NPC-Brain<br>Drop-in NPC AI<br>Player action → NPC reaction in 1,348ns. 6 NPC types × 6 actions = 36 reactions. Replaces behavior trees with a single hash table.<br>36 atoms~1,348ns<br>Try itDownload
02<br>CraftCore<br>Universal crafting engine<br>A + B = C. 50 recipes. O(1) lookup. No spreadsheet, no database. Just a hash table. Minecraft-style crafting without the XML.<br>50 recipes~500ns<br>Try itDownload
03<br>QuestFlow<br>Visual quest logic<br>"Player has X, needs Y, give Z." 5 complete quests with status evaluation. Visual designer-compatible JSON output. O(1) per check.<br>5 quests~2,500ns<br>Try itDownload
04<br>LootForge<br>Procedural loot<br>Level × Rarity × Affinity = Item. 10 bases, 6 rarities, 12 affinities. Deterministic. Seedable. Same seed = same item.<br>10 bases~15,000ns<br>Try itDownload
05<br>Dialoop<br>Branching dialogue<br>Player says X → NPC says Y. 5 NPCs × 5 actions × 19 moods = 475 unique lines. No conversation tree to maintain.<br>475 lines~500ns<br>Try itDownload
06<br>BattleCalc<br>Damage calculator<br>ATK × DEF × Affinity × Crit = Damage. 12 affinities, 5 crit tiers. O(1) per hit. No formula spaghetti.<br>12 affinities~1,500ns<br>Try itDownload
07<br>AffinityGraph<br>Item combo system<br>"Sword + Dragon Scale = Dragonbane." 35 discoverable combos. Reverse lookup supported. O(1) combine.<br>35 combos~1,000ns<br>Try itDownload
08<br>StateZero<br>State machine<br>State × Event → New State. 42 states, 39 transitions. Replaces 10,000-node FSMs. Covers enemy AI, doors, plants, day/night, weather.<br>42 states~300ns<br>Try itDownload
09<br>ProceduralHash<br>Seed-based world gen<br>Seed × Biome × Depth = Content. 8 biomes, infinite seeds, deterministic. SHA-256-based. Share seeds, share worlds.<br>8 biomes~25,000ns<br>Try itDownload
10<br>FusionCore<br>Item fusion system<br>A + B = C. 50+ fusions from elemental (fire+water=steam) to cosmic (life+death=rebirth). Tier upgrades. O(1) fuse.<br>50+ fusions~700ns<br>Try itDownload
How It Works
The entire lattice is a Python dict. Lookup is a hash table operation. That's it.
The Lattice Pattern
Every app follows the same three-atom pattern:
# 1. Define the lattice (the data)<br>LATTICE = {<br>("input_a", "input_b"): "output",<br>("player_attacks", "guard_npc"): "defend_return_attack",<br>...
# 2. Define the lookup function (O(1))<br>def execute(a, b):<br>return LATTICE.get((a, b), LATTICE.get((b, a), "default"))
# 3. Call it (sub-microsecond)<br>result = execute("fire", "water") # -> "steam"
Why This Beats the Alternatives
ApproachLookup SpeedFile SizeDependenciesOffline<br>Behavior Tree (10K nodes)~50 µs5MB XMLEngine + editorYes<br>LLM / GPT API~500ms0 bytesAPI key + networkNo<br>SQLite lookup~10 µsSchema + filesSQLiteYes<br>Redis cache~100 µs0 bytesRedis serverNo<br>Lattice (Python dict) ~1,348ns One file None Yes
Benchmarks
Measured on a typical x86_64 server (Python 3.11). All apps are single-file Python with zero imports beyond the standard library.
AppAtomsLookup LatencyThroughputFile Size<br>StateZero42 states, 39 transitions~300ns3.3M/sec5KB<br>CraftCore50 recipes~500ns2.0M/sec6KB<br>Dialoop475 lines~500ns2.0M/sec9KB<br>FusionCore50+ fusions~700ns1.4M/sec7KB<br>AffinityGraph35 combos~1,000ns1.0M/sec8KB<br>NPC-Brain36 reactions~1,348ns741K/sec6KB<br>BattleCalc12 affinities, 5 crits~1,500ns666K/sec5KB<br>QuestFlow5 quests~2,500ns400K/sec6KB<br>LootForge10 bases,...