Traveller’s Solas is an interactive narrative demo, presented in the style of a classic text adventure game. It was developed in Twine as a solo project, for the purpose of prototyping a robust, data-driven framework for writing text adventure games.
As the sole developer, I was responsible for writing, designing, and programming the game. My goal was to build a proof-of-concept that could be re-used for other games without requiring additional programming. This was achieved with a combination of CSS, JavaScript, and TwineScript, which abstracted the technical features from the content of the game.
The two core features that I developed were the interaction system, and the game objects. The interaction system provides players with a list of actions in the sidebar, which can be selected by either clicking the action, or typing the corresponding key. This will act upon whichever object the player has selected, or prompt them to make a selection.
The game objects form the second half of this system, allowing the entire data of the game to be loaded from generic JavaScript objects, defined in their own Twine passages. This included game data such as rooms, items, special events, and character dialogue. The descriptions and interactions are shown on screen, with interactive objects becoming clickable links that the player can perform actions on.
For this system to work, I developed a handful of Twine widgets. For example, one widget was used when writing the descriptive text for an object, to automatically generate a clickable link with the name of the object being described. Another widget was designed to display the description of any given object, and was used to describe all objects inside a room or container. Additional widgets were created for features such as textboxes and UI elements.
I also created a custom “Draw” widget, which renders pixel art using colored ASCII blocks. The code for these widgets was generated externally with a console program which I developed in C# to convert each pixel of an image into the appropriate line of HTML and CSS.
Finally, there are also several JavaScript functions which enable special event handling. This was designed so that the developer may define how interactions with an object might change the state of the game, such as a key opening a locked door, or a character leaving the room. These functions can be called from any of the game objects, whether it be an interaction with an item, or a specific dialogue branch.