Hi all,
Over the last couple of weeks, I have been building a small framework for creating text adventure games.
I was inspired, in part, by the Text101 game from the Complete Unity Developer course, childhood memories of Fighting Fantasy / Choose Your Own Adventure books, and of course the volume of awesome students taking this course who have made this game and wanted to expand on it.
They do say that the Devil finds work for idle hands…
I’d like to share what I have so far with you.
The Aim
What I set out to do was to demonstrate how you can, and arguably should, separate your story from your code and make the adventure game more extensible.
I had myself provided feedback on a number of student’s Text101 games and offered ideas for extending it, most of which included “separate the story from the code, perhaps use XML” but I’ve yet to see anyone attempt it, nor had I offered a step-up for anyone to try to.
What Does It Do
The framework at this time is fairly limited in its functionality but does provide the following features;
-
Adventure Data Read from XML
The story text (data) is not embedded within the code -
Location Based Story Model
Just as the books above did, locations contain items and have connections to other locations -
Living Story
Locations can be updated during game play, e.g. dropped items are reflected at the location they are dropped at -
Searchable Locations
Sometimes items will just be mentioned, in other locations the player may need to search first before they are revealed -
Player Inventory
Items that the player pickups are persisted through the story until dropped -
Take / Drop Items
Basic functionality for adding items to/removing items from the inventory -
Examinable Items
Items can be examined to reveal additional information (hints)
The Example Scene Is Dull
Being a framework my aim was not to make a whizzy looking game, instead provide a tool which could be used by others in order to make a more whizzy looking game, as such, the framework currently comes with an example scene which is incredibly basic and does little more than providing an interface for an adventure.
It is grey. It is dull. Anyone can make a more interesting scene. Please do.
Development Road Map
The current road map (read: gravel track) looks like this;
-
Usable items
As an example, a locked door may require you to use a specific key to open it -
Game Over Conditions
Currently you navigate through your locations but with only the story telling you that you have won/lost -
Automated Key Bindings
Key bindings are currently controlled through the XML file, with the exception of some reserved keys -
Alternative Data Sources Support
Database/Web Services
Creating Your Adventure
At this time there is no editor for creating the story, this is something I would seek to implement at a later stage. The structure of the XML data file is fairly lightweight, meaning that anyone with a text editor could write their own story, drop the file into Unity and off you go, playable game.
Want To Try It?
If anyone is interested in giving it a try please let me know and advise as to which version of Unity you are currently using. It has been developed using Unity 2017, but with the example scene being so basic there is no need to have Unity 2017 installed. I’m happy make one or two previous Unity versions available if there is interest. The real content is the C# framework.
I will happily put together some lightweight documentation on its usage but from the outset, it has been my hope that anyone at the Text101 level of experience with Unity would be able to use it with the briefest of instructions.
Feedback
I would, of course, welcome any constructive feedback/criticism, better still I would love to see some screenshots of your own scenes which implement the framework, throwing away the example scene.
Thanks for taking the time to read my post and showing any interest in my work.