Skip to content

Memel06/mythcrawl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mythcrawl

The AI writes the myth. You survive the crawl.

A dungeon crawler that runs entirely on your machine. A local AI invents every room, monster, item, NPC, and quest in real-time.

Every playthrough is different. None of it is scripted.

[ The Hollow Sanctum ]

Pale light filters through cracks in the vaulted ceiling above. The stone
floor is etched with faded runes, and the air carries the faint smell of
incense long since burned away. A collapsed pillar blocks half the room.

Items here: Rusted Shortsword, Minor Healing Draught
You see: Lara the Wanderer
A hostile Shadow Wraith blocks your path!

--- Combat (Turn 1) ---
You:           [####################] 60/60 HP
Shadow Wraith: [####################] 45/45 HP
Commands: attack, defend, flee, use <item>

> attack
You attack the Shadow Wraith for 14 damage! CRITICAL HIT!
The Shadow Wraith uses Frost Nova! You are slowed for 2 turns.

The AI invented the Hollow Sanctum, the Shadow Wraith, and Frost Nova. The engine calculated 14 damage, rolled the crit, and applied the slow.

What happens when you play

You explore an AI-generated world room by room. Each room has its own atmosphere, enemies, items, and NPCs — all invented on the fly by a small language model running on your hardware.

Walk into a room with a monster, and combat starts. Real combat — with damage formulas, crit rolls, status effects, and seeded RNG. The AI authored the monster's abilities ("every 3 turns, cast frost bolt"). The engine decides if and when they fire.

Talk to NPCs. Trade with merchants. Pick up quests. Search rooms for hidden loot. Or just type whatever you want:

> try to intimidate the wraith
The shadows around you deepen as you raise your voice in defiance.
The Shadow Wraith recoils — you deal 6 psychic damage!

That 6 damage is real. It came from a formula. The wraith's HP dropped. If it dies from this, it's dead. And the action started from your imagination!

There are no quicksaves. Sleep on the ground and you'll heal a little — but you might wake up to a monster. Carry a tent for safe rest. Find an encampment to actually save your progress.

Requirements

  • Node.js 22+
  • ~2 GB free disk for the model file
  • GPU recommended — Metal (Mac), CUDA (Linux/Windows). CPU works, just slower.

Setup

git clone https://github.com/anthropics/mythcrawl.git
cd mythcrawl
npm install

Get a model

Drop any instruction-tuned GGUF model into models/. The game auto-detects the first .gguf file it finds. Any model that fits your RAM/VRAM works.

What I use: Gemma 4 E2B IT Q4_K_M (~3 GB) — small, fast, and surprisingly creative for its size.

Any other GGUF model works too — Llama, Mistral, Phi, Qwen, whatever you have lying around. Instruction-tuned models produce better results.

Build llama.cpp from source (Gemma 4 only)

node-llama-cpp doesn't ship with Gemma 4 support yet — it bundles llama.cpp b8390, but Gemma 4 needs b8637+:

npx --no node-llama-cpp source download --release latest

Compiles llama.cpp with your GPU support. Takes a few minutes. Only needed once.

Using a non-Gemma 4 model? Skip this — the bundled binary works fine.

Requires cmake: macOS has it via Xcode CLI Tools (xcode-select --install). Linux: apt install cmake. Windows: cmake.org.

Play

npm start

Pick a language (English or Italian). Enter your name. Start exploring.

Commands

look / l Describe the current room
north south east west up down Move (or n s e w)
search Search for hidden loot
map ASCII mini-map
inspect <target> Examine something closely
take / drop / use / equip / unequip Item management
inventory / i View inventory
attack / defend / flee Combat actions
talk <name> Talk to an NPC
buy / sell Trade with merchants
quests Quest log
rest / sleep Rest (tent or encampment for full effect)
stats Character sheet
help / ? All commands

Or prefix any free-form action with try — e.g. try to intimidate the wraith — and the AI will interpret it while the engine resolves the outcome.

Saves

Games save to ~/.mythcrawl/saves/ as JSON — the complete world state, every room, item, NPC, quest, and ability the AI has generated. Loading restores the world exactly as it was.

License

MIT