Making an Adventure Game - Part 4
- 2 minutes read - 337 wordsPreviously in this series: Part 1, Part 2, Part 3,
So you’ve kept going, and by now you should have all of the text converted. Like any other effort, you’ll have mistakes in there. The basic twee-3 format isn’t complicated, but it is easy to typo stuff. Also, depending on how you converted the original files into text, you may find odd control characters messing up your file. I found, for instance, that because I’d specified that the PDF text extract should keep the layout on the pages all the way back in Part 1, I had spurious ASCII form feed characters at the top of every page. VS Code doesn’t show control characters by default, presumably on the basis that they haven’t really been useful this century, but until I worked out what was going on, I had lots of broken links everywhere.
If you’re playing along with the GitHub repo, then you’re here. All the text is done, and you’re ready to generate the game and play test it.
I’ve included two scripts to generate the game:
build.sh and build.bat. Linux/MacOS people want
build.sh, Windows users want
build.bat.
Run that, and tweego should build you a file called “secret-pyramids.html”. That’s your game file — double-click it and you’re ready to play!
For me, the biggest problems were making sure all the links were correct, and that I kept forgetting that tweego likes really long lines, and so you have to make sure that you’re wrapping correctly. So, you need to go in, fix any problems, and keep on play-testing. Eventually you should get all of the formatting correct, and you’re all good.
Eventually, you’re done, and so’s the game. This takes you to the end of the GitHub repo chain.
This is a fairly simple game — there’s not many choices, and lots of end states. I’ll look at how to make a more complex game next time. I’ll also explain the weird codes that show up in the end state pieces.
Until next time!