//Text RPG Engine

Project created:
Post updated:
Cover Image for Text RPG Engine
javascriptes6interactive fictionnlp

GitHub link

Library Website / Docs

Tutorial article written for Clubhouse (Archival link)

NPM package link

text-rpg-engine is a JavaScript ES6 library that can be compiled and run without a server to create works of interactive fiction, or text adventures, with completely arbitrary player interactions. As in, experiences built with text-rpg-engine can contain player interactions of any kind, which allows for endless possibilities in terms of puzzles and crafting unique gameplay mechanics.

In this example shown in the photo, a unique puzzle in the room is having to turn over the statue to find the note on the bottom.

This engine was also used to create the game featured on the homepage of this site.

You can create games programmatically via the library's API, or you can define the data in a JSON file and have it be dynamically loaded by the library. A future feature would be to have a GUI editor that can easily create and add onto existing games.

Features

  • Games can be programmatically built with API or populated with data from a static JSON file
  • No server required to play games (JS files are bundled and transpiled with Browserify)
  • Player can move through rooms (rooms can have item requirements)
  • Inventory system
  • Environment and item interactions through prompts
  • Extreme flexibility; prompts can be anything and are stored in rooms, so prompts can have the same keyword triggers as long as they belong to different rooms

I am planning on creating an interactive fiction game with horror themes using this engine, to be submitted to IFComp in the next year.