A faithful TypeScript source port of the classic 1980 interactive fiction game by Infocom.
"You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here."
npm install -g zork-tszorkThat's it! You're now ready to explore the Great Underground Empire.
Zork I is a text adventure game where you explore an underground empire, solve puzzles, collect treasures, and try to survive encounters with various creatures. The game responds to natural language commands like:
go northor justnopen mailboxtake lampexamine swordattack troll with swordsave/restore
- Explore thoroughly - Look at everything, read everything
- Map your surroundings - The underground can be confusing
- Save often - Death lurks around many corners
- Be specific - If a command doesn't work, try rephrasing it
- Light is precious - Keep track of your light sources
| Command | Description |
|---|---|
look (or l) |
Describe your surroundings |
inventory (or i) |
List what you're carrying |
take <item> |
Pick up an item |
drop <item> |
Put down an item |
examine <item> |
Look closely at something |
open/close <item> |
Open or close containers/doors |
save |
Save your game |
restore |
Load a saved game |
quit |
Exit the game |
score |
Check your score |
- Node.js 25.0.3 or higher
This TypeScript version achieves 100% logic parity with the original Z-Machine implementation:
- All puzzles are solvable exactly as in the original
- All NPCs (troll, thief, cyclops) behave authentically
- All 350 points are achievable
- Save/restore functionality works seamlessly
The implementation has been verified through exhaustive testing against the original game.
If you prefer to run from source:
git clone https://github.com/zork-ts/zork-ts.git
cd zork-ts
npm install
npm run dev- Original Game: Marc Blank, Dave Lebling, Bruce Daniels, Tim Anderson (Infocom, 1980)
- TypeScript Port:
@jsredmond
MIT
See CONTRIBUTING.md for development setup and guidelines.