Skip to content

About

A turn-based dungeon crawler: torchlit pixel art, 267 monsters, 60 spells, all original content, in one self-contained web page.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Torchlight Dungeons

Torchlight Dungeons: an adventurer with a torch in a pixel-art dungeon, a goblin at the edge of the light

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.

Playing

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).

Working on it

  • ./build.sh joins src/ into index.html. Edit src/, then build.
  • node tests/torch.js checks the rules and data; node tests/balance.js (add -v for detail) fights every monster with every class at the level you would expect at its depth.
  • src/, by job:
    • Rules and data: rng.js random numbers; fov.js sight and light; turn.js the speed scheduler; gen.js levels, rock, doors and the town; data.js townsfolk and traps; bestiary.js the dungeon's monsters and combat numbers; items.js items, flavours and names; shops.js shops and prices; chars.js peoples, callings, stats and skills; spells.js magic; lore.js the world's lore in short; rings.js the rules of the rings of light; save.js the save format.
    • The tutorial: tutorial.js Sister Ilvane's steps for a first game, and the key hints.
    • The game: game.js the rules of play and the keys.
    • The look: sprites.js tiles, figures and icons, drawn by code; render.js the map, light, animation and debris; ui.js the HTML HUD, panel, dialogs and screens; head.html the page markup and styles.
    • Helpers: lib.js preferences, high scores, sound, resizing and the frame loop; audio-data.js the sounds (generated).
  • audio/torch-sfx.py makes the sounds and music (needs numpy and ffmpeg): it writes audio/torch/*.mp3 to listen to and src/audio-data.js for 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 from lore/art/ (web copies in lore/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.

Licence

MIT; see LICENSE.

About

A turn-based dungeon crawler: torchlit pixel art, 267 monsters, 60 spells, all original content, in one self-contained web page.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages