Introducing your very own... Adventure Game Template!

Make Your Own Text Adventure!


Using nodes and graphs, I made a customizable adventure game template! Just edit the `adventure.txt` and check out the `README` file, and you'll be making a complex adventure game in no time! Check it out here! Comment below or on the repl if you have any suggestions, questions, or comments!
8 Likes

It looks good, but I think the syntax should be reworked in various ways.

Currently, the nodes are separated from the edges. I think the edges should be allowed to be placed next to the nodes. Imagine if the game was much larger.
There are a few missing language features. Comments, aliases, multiline strings, and it would be nice for regular expressions to be allowed. Also, start should be more special.

Here’s my suggestion for syntax, using the default example.
adventure.txt:

@START = wake up
wake up: You wake up stranded on a lone island. Do you explore or make a shelter?
explore, look around: {
You explore the island. After a few minutes you discover a small metal item.
Do you examine it or leave it?
}

make a shelter = shelter
wake up > explore, shelter  # comment1
shelter > explore  # stuff
shelter: You pick up a few branches and sticks but have no previous knowledge on how to build a structure. Do you explore or sit down?

About the source code, there’s a few things.
There’s a bug, I think, where a comma in the option text will get the text truncated.
You should actually raise an error instead of returning an error message string in your methods.
There’s a bunch a small ways the code could be improved, but don’t affect functionality.

2 Likes

Yeah. I made this quite a while ago, and found it recently. I’ll probably rework the layout someday.

New Update!

A new update has just been released including these new features…

  • A menu so that users don’t have to type in their choice and can choose from a menu
  • adventure.txt is now game.advt

Coming soon…

@NuclearPasta0 gave me a great idea, and I am working on a new syntax for .advt files to make it even easier to make your own adventure game!

2 Likes