A turn-based dungeon crawl after Moria (Robert Koeneke, 1983), for the web. You carry a torch down into an endless dungeon below the town of Lanternhollow: everything is drawn in code-made pixel art, lit only by what your light, the lit rooms and glowing things reach. All of the game's content is original.
Play it at dungeon.hensap.id, and read the lore of its world at dungeon.hensap.id/lore.
- 8 peoples and 6 callings, rolled or point-bought stats, 8 skills, 40 character levels.
- About 200 kinds of item, with flavours to identify, special kinds and artifacts; 12 equipment slots shown on a paper-doll hero.
- 60 spells and prayers in two realms; a town with six shops, day and night.
- 267 kinds of monster in 50 families, 25 named uniques, and a final boss at 2,500 ft; monster recall.
- The rings of light: relight the dungeon's cold shrines to strengthen the cage around Morrowgloom, or carry their flames home to sell. The town feels it first; four endings, from finishing the cage to letting the world go dark.
- A great campfire in the middle of town at night, and a leather finish on the panels.
- A clock of days and hours: a day is 10,000 turns, about nine seconds each.
- Death is for good, unless you can pay to have your soul called back to the Eternal Lamp (dearer every time); resting is for the town only.
- A first game that teaches itself: Sister Ilvane walks a new delver through their first trip, step by step, and experienced players skip it with one key.
- The world's lore in the game: a Lore tab that fills as you reach each ring of the Lampway, meet the named, find artifacts and read lore books found below.
- Hunger, bleeding, stuns and hallucination; 16 hidden traps; secret, locked and stuck doors; rubble and veins of magma and quartz to dig, some with gold; a feeling for each level's danger.
- A character panel, item cards, a hotbar, a minimap. Play with the keyboard, the mouse or touch.
- Synthesised sound effects and music, saved games in three slots, and options for auto-pickup, colour-blind-safe status colours and larger text.
The plan, its phases and its ground rules are in TORCHLIGHT_PLAN.md. It started as a cartridge in the ASCII BaseCommander arcade and moved here; see HANDOFF.md.
Open index.html in a browser, or serve the folder (python3 -m http.server 8766). It needs nothing else.
| Key | Does |
|---|---|
| Arrow keys | Move; into a monster attacks it, into a door opens it. Two arrows together move diagonally (or the numpad, Home, End, PgUp, PgDn). Shift runs. |
| A, S, D, W | Attack the target (or shoot or throw), cast the readied spell, drink the best-fitting healing potion, grab (pick up, stairs, shop) |
| Q, E, R, F | Ready the next spell, eat, rest, refill your light |
| Tab, Space, 1 to 0 | Next target, wait a turn and search for hidden doors and traps, hotbar |
| T | Dig in a direction. Walking into rubble or a vein digs it; walking into a locked door or a known trap works at it. |
| I, C, B, J, K, M, P | Pack, Character, spell Book, Journal, Lore, Map; P shows or hides the panel |
| L, ?, Esc | Look, keys, menu |
Moria's own letter keys and the roguelike set are in the menu (Keys), as is Detail (smaller sprites, more map).
./build.shjoinssrc/intoindex.html. Editsrc/, then build.node tests/torch.jschecks the rules and data;node tests/balance.js(add-vfor detail) fights every monster with every class at the level you would expect at its depth.src/, by job:- Rules and data:
rng.jsrandom numbers;fov.jssight and light;turn.jsthe speed scheduler;gen.jslevels, rock, doors and the town;data.jstownsfolk and traps;bestiary.jsthe dungeon's monsters and combat numbers;items.jsitems, flavours and names;shops.jsshops and prices;chars.jspeoples, callings, stats and skills;spells.jsmagic;lore.jsthe world's lore in short;rings.jsthe rules of the rings of light;save.jsthe save format. - The tutorial:
tutorial.jsSister Ilvane's steps for a first game, and the key hints. - The game:
game.jsthe rules of play and the keys. - The look:
sprites.jstiles, figures and icons, drawn by code;render.jsthe map, light, animation and debris;ui.jsthe HTML HUD, panel, dialogs and screens;head.htmlthe page markup and styles. - Helpers:
lib.jspreferences, high scores, sound, resizing and the frame loop;audio-data.jsthe sounds (generated).
- Rules and data:
audio/torch-sfx.pymakes the sounds and music (needs numpy and ffmpeg): it writesaudio/torch/*.mp3to listen to andsrc/audio-data.jsfor the build. Run it, then./build.sh.cartridges/holds the cover art and its prompt.lore/holds the world's lore as Markdown;lore/build.js(run by./build.sh) turns it into the rulebook-style pages, with stat blocks from the game's data and the illustrations fromlore/art/(web copies inlore/art/web/).
Everything is saved in the browser's localStorage under torchlightDungeons.v1.: three character slots, keys,
panel, detail, sound, options, whether the tutorial was done, high scores with character dumps, and monster recall. Nothing is sent anywhere. The game saves itself
as you play; the menu exports a character to a file, and Characters imports one.
MIT; see LICENSE.
