The second and final part of the method centers on scripting and testing. By the time I get to this stage the story and branches are written. But the writing—and particularly the editing—will continue a while longer as I finally see the game come to life. It’s always a good feeling to see the result of months of hard work!

Scripting

Choicescript is a high-level programming language which feels in many ways like a low-level one. High-level languages hide programming complexity behind handy functions, like “*image yourImageHere.png” and “*set drifter %+10”. Low-level languages, like MIPS and X86, use “jump” and “label” to navigate through sections of code in memory. The most important step towards making scripting an easy (dare I say enjoyable!) process is consistency. The process of creating a uniform naming system for your variables will drastically reduce bugs. “*goto c9_11” for me means we’re in chapter9, going to the end of the 11th mini-branch.

Again, way back in the writing process you can do your scripting process a lot of favors. I learned how to write every pronoun as she/he, every pronoun for the main character as MC_he/she, and so forth. I write the names of the female versions for the love interests because that’s what comes more natural to me. Write what you’re comfortable with, but try to get comfortable with writing multi-pronouns as soon as you are able. Because when you do, you need only ctrl+f to find and then replace all instances of “she/he” with “${shehe}”. If you do that, make sure you’re case-sensitive. “She/He” would be “$!{shehe}” in choicescript, for example.

Adding in the *goto’s and *label’s your game will need to make any sort of sense is a time-consuming process, but an important one. Once I copy over a paragraph into a text processor for scripting, I add those commands right after adding in the appropriate tabs. I then convert my pseudo-code variable changes (which I wrote back in the writing process) into commands that work in choicescript. Make sure to go back to your startup.txt file and declare those variables in as soon as they are used.

Getting into a rhythm scripting is easy this way: copy/paste, add the tabs and choices, add the *goto’s and *labels, then add the variables. I always place any variable changes at the start of choice branches and if statements, so I know where to look in case I need to make changes during playtesting. After I’ve gone through this routine a few times and made it to the end of a chapter, it’s testing time.

Testing

The biggest reason why scripting is so much easier than writing? Randomtest and Quicktest. If you use choicescript as your medium, get intimately familiar with these tests. I run a few iterations of randomtest before going through the game myself, because I know it’ll catch all my misspelled variables and incorrectly-tabbed code for me. Pay attention to the end of randomtest’s output. It will count how many times each line was traveled. Add up the totals before and after branches and be on the lookout for any 0’s. You’ll find all cases of incorrect text navigation this way.

Beta-testing is an important process that serves multiple purposes. A public beta-test for the demo portion of your game generates hype and lets the hardcore fanbase know what they’re in for. Even after all your edits there will still be a few errors that have managed to escape you, which someone will be more than happy to point out. Make edits here and conduct a private beta test for the remainder of your game. Now you’re ready for publication!

Conclusion

And that’s it! Spoiler alert though: the postpartum is not some glorious, climactic celebration. Picture it more like a constant refreshing of the forums mixed with soul-crushing fear of every 1-star review that pops up. Unfortunately no amount of late-night playtesting can save poor Suzy who can’t seem to get it running on her generation 1 ipod. Don’t stress over it, or at least try not to angst too hard. After your second or third book you’ll stop caring what the Suzies out there think. You’ll grow as a person in ways most folk never will. So pat yourself on the back!

You’ve made it.