text-engine 3: makes development more fun!


text-engine has been updated to version 3.0.

There are several new features, but the one I'm most excited about is the new command-replay save system. Game saves are now just a list of commands entered by the player, and loading a save instantly plays back every command. This makes developing games with text-engine way more fun! Iterating goes like this:

  1. Play your game until you encounter something you want to change, then save.
  2. Make the change.
  3. Load the save to see your change instantly.

Additionally, players can now save their game state to disk in a simple, readable (and editable!) text file to load back up at any time. This is also great for developers, because if someone encounters a bug in your game, they can send you their save file so you can reproduce it effortlessly.

In order to support this, text-engine now expects your disk to be a function returning an object rather than just an object. However, the old disk format is still supported, and happily, migration is a breeze.

Since the save system has changed, you should check the updated notes on the system and verify your game is compatible before upgrading to text-engine 3.

Here's a list of the major changes:

  • Switched to command-replay save system.
  • Added support for saving to/loading from files.
  • Added `getItem` function which searches player inventory and the current room.
  • Improved performance.
  • Adding handling for more variations of commands. Players can now type "characters" (vs. "char") to list characters in the room,  "inventory" (vs. "inv") to list items in inventory, and e.g. "go n" (vs. "go north" or "n") to move in a cardinal direction.
  • Modern CSS now responds to browser zoom level.

Files

text-engine-source.zip 2.7 MB
Jul 13, 2022

Get text-engine

Comments

Log in with itch.io to leave a comment.

How does this system work if my game includes random stuff? like encounters or stuff like that

(+1)

You will probably want to use the old system or write your own save/load if your game relies on non-deterministic randomization. Or you could update your randomization to be deterministic. Check out the section of the documentation titled "A word of caution regarding SAVE/LOAD."

(+1)

This is awesome! Just found out about your project! Working on some work related projects ad felt like making a text based game would be super cool way to have fun in my free time. Will download and explore your creation! Thanks for making this :)

Hey, that's great! Let me know if you have questions or if you make something you feel like sharing. Have fun!