Editor's Note: Some weeks ago, we spoke of a desire - impossible to fulfill - of mapping all the game. One reader, John Lindberg, took up the challenge with the opening scenes, free to play at the this year's Spring Thing IF showcase. In this, the second of our 2 part interview, we talk to John about his methods, and show some of what he's come up with.
Who knew the opening of the game was so complicated! I certainly didn't. Could you talk about the tools and techniques you use to develop these maps?
I use the tool 'dot' which is part of the free software package 'Graphviz' to generate the actual graph images from text files. Other than that everything is done in Java without any external libraries.
The code goes through the Nocked! source files (which are in the 'twee' format for twine) line by line and builds up an internal structure of which sections exist, which consequences will happen when you get to a section and which options a player will have to progress further from there.
From this internal structure we can do two different things, making an image of it or doing analytics on it.
For making an image we could just let dot generate a graph directly from the structure we've just constructed, but that doesn't turn out looking very well... go into color-coding, graph-transformations to minimize nodes and edges, grouping nodes together etc...
For the analytics we need to understand more of what the consequences and conditions in the code actually do, so I've written a parser that can parse the simple expressions they consist of into executable code.
The game state while Nocked! is played normally is basically the name of which section you are currently reading and all of the variables (both visible and hidden) that are currently set. E.g. how many merry men that are in your company. So we simulate that and create a Robin starting at the beginning of the book with the sheriff just starting his assault on your mansion, play out the consequences for the starting section (setting some initial variables) and then take all of the choices available.
Thanks, John! Readers, we hope you've enjoyed this backstage look into the flow-structure of Nocked. Remember, if you want to try out John's maps for yourself, head over and play our preview of Nocked in the Spring Thing IF showcase.
About John Lindberg: I'm a programmer from Stockholm, Sweden. Developer of business software by day and mad mapper of IF by night. When not programming, I mostly enjoy reading, gaming, biking, traveling, cooking, running, one-on-one conversations and watching tv-series.
The Adventures of Maid Marian and the Sheriff Continue
Read the entire adventure to this point, starting on the post of July 26th.
Face to Face with Will Scarlet
I glance towards the stables, then back at the castle. I bite my lip, uncertain, and study Will.
He's nervous, his clothes are tattered, and of arrows - there remain only 3. Time, and the dissolution of Robin's band, have not been kind to him. Speaking of which...
1. Little John is chained in the dungeon. Let's get him out.
2. Alan a Dale sings for coin in the Sheriff's hall. We can find him, remind him what it is to sing for freedom!
3. Friar Tuck sold the location of Robin's hideout for the Church's absolution. He is here, and must pay.
Marian's decision at this juncture has been made. To continue her adventures, check out the latest dev blog and vote on her current actions. Read the entire adventure starting July 26th.
This is the Nocked! True Tales of Robin Hood development blog. Every week I’ll discuss some aspect of the game’s development, show off some art, and give you the opportunity to create an entirely new Robin Hood story. Be sure to check out the butler's take on the Sheriff of Nottingham, occasionally updated @ManOfNottingham, and mention us in your tweets with #whosyourrobin.