A Distraction in Twine

I’ve been dabbling a little with a thing called Twine over the past few days, which is a cool way to make a game that’s a little more accessible than putting together a graphical game would be. I’m only starting with it, but already finding ways to do things that take me back to the game programming of my younger years.

Amidst trying to learn the ropes of how you put a game together in Twine, I hit upon a concept that combined my need to make a game, my intent to do something a little difference, and my very, very serious FOMO over No Man’s Sky. I put together a small set of passages that would cover the base idea of exploring a randomised universe, using a variation of words to mimic the simple side of exploration and finding things to be some extension of what we know. The result of this attempt is Sky.

While this might seem relatively simple to some, based on some conversations I’ve had with people, I thought it might be worthwhile to share just what went in to putting this together. It’s probably not the most elegant solution for the problem, and the grammar does get a bit iffy in places, but I hope it’s useful to some.

The bold headings below represent a passage, and the formatted section is the content of the passage. The following was done with Twine 2, using Sugarcube 2 as the Story Format.

Planet

<<set $planetnum = random(1,99999999999999)>><<set $suncols = ["blue", "white", "brown", "dark", "yellow", "orange"]>><<set $colours = ["blue", "green", "yellow", "red", "purple", "orange", "magenta", "white", "grey", "pink", "turquoise", "periwinkle", "silver", "gold", "crimson", "brown", "black"]>><<set $landscape = ["plains", "mountains", "rivers", "lakes", "deserts", "canyons", "jungles", "forests", "caves"]>><<set $awes = ["amazing", "quiet", "barren", "tranquil", "beautiful", "wonderous", "calming", "unnerving" ,"frightening", "magical", "desolate", "peaceful", "perilous", "familiar", "hopeless", "melancholy"]>><<set $suns = ["cold", "harsh", "bright", "warm", "scalding", "fading", "brilliant", "shimmering", "dying"]>><<set $reactions = ["warmth", "delight", "easiness", "dread"]>>
<<set $suncol = either($suncols)>><<set $skycol = either($colours)>><<set $landcol = either($colours)>><<set $landtype = either($landscape)>><<set $awetype = either($awes)>><<set $suntype = either($suns)>><<set $reactype = either($reactions)>>
You are on Planet <<print $planetnum>>.

You suspect that you are the first person to find this world, and that you may never see another person again. There is something <<print $awetype>> about it, and as you take in the <<print $suntype>> light of the <<print $suncol>> sun, you feel a <<print $reactype>> wash over you.

As you observe the planet from the confines of your ship, you see <<print $landcol>> <<print $landtype>> in all directions, and can scarcely believe what you see. As the <<print $suncol>> sun journeys across the <<print $skycol>> skies, that <<print $awetype>> feeling strikes you again.

[[Explore the Planet]]
[[Leave the Planet->Space]]

Explore the Planet

<<set $altaw = either($awes)>>
<<set $altre = either($reactions)>>

As you journey further from your ship, you find new sights beneath the <<print $skycol>> skies, and find more <<print $landtype>> that look unfamiliar in the changing light..

You find one part of the planet that seems even more <<print $altaw>> than the rest, but even in that moment and as a sense of <<print $altre>> comes to you, you know you cannot stay forever.

[[Explore some more->Explore the Planet]] 
[[Leave the Planet->Space]]

Space

You leave planet <<print $planetnum>>.

You'll always remember that feeling of <<print $awetype>> that it gave you, and how it felt to sit in the <<print $suntype>> glow of its <<print $suncol>> sun.

Space seems to go on forever.

You begin to wonder if you will ever find a new place, or see another soul.

Eventually you find one - a planet intriguing enough that you want to set the ship down.

[[Land on the Planet->Planet]]

And that’s it. Just the three passages.

Since then I’ve done some experimenting with other ways to do things, and can see the potential to turn the planet exploration into something analogous to old text adventure games, or a dynamic room system on a MUSH. I’ve done things like that before – one of the earliest types of games I tried creating was a text adventure in BASIC, and used a very similar concept for room controls.

The Twine version of that looks a little like the following picture:

twine-dynamic-room

I’ve separately been working on another idea, which is capitalising on one of my fanfic ideas for a short Mass Effect mission as a Twine proof of concept, which has a bunch of characters in a ship embarking on a mission – except the story should change in different ways depending on which random assortment of crew have come together. Yeah, it’s gonna get messy.

You don’t need to go to this sort of level if all you want is a basic branching narrative. Variables will help you in the long-run, particularly if you’re trying to keep track of things without having to remember everything that could happen, and believe me – I’m not even close to an expert on this. Right now it’s been ohhhhhhhhhhhhhhh a few days of messing with Twine, but it’s simple enough that even weird stuff like I do is accessible to all.

Addition:

So, added a short version of what this crew thing is all about. The rest comes down to varying scenes dependant on who is who, etc. Anyway, here it is.

<<set $crewAlton=false, $crewBraga=false, $crewCalla=false, $crewNellan=false, $crewHeira=false, $crewTara=false, $crewZan=false, $crewJoures=false>>

<<set $adjectives=["Fearless", "Shuddered", "Grave", "Quiet", "Wandering", "Wild", "Stellar"],$nouns=["Explorer", "Chance", "Whisper", "Rider", "Measure", "Constellation", "Star"]>>

<<set $characters=[
["Tara", "Tara Fisher"],
["Alton", "Alton Andass"],
["Braga", "Braga Laragas"],
["Nellan", "Nellan Tratis"],
["Calla", "Calla Sil Beredon"], 
["Heira", "Heira Correl"], 
["Zan", "Zan"],
["Joures", "Peira Joures"]]>>

<<set $crew=$characters.shuffle()>>

<<set $player=$crew[0], $captain=$crew[1], $pilot=$crew[2], $tech=$crew[3], $medic=$crew[4]>>
<<set $shipname=either($adjectives)+" "+either($nouns)>>

<<if $player[0] eq "Alton" or $captain[0] eq "Alton" or $pilot[0] eq "Alton" or $tech[0] eq "Alton" or $medic[0] eq "Alton">><<set $crewAlton=true>><</if>>

<<if $player[0] eq "Braga" or $captain[0] eq "Braga" or $pilot[0] eq "Braga" or $tech[0] eq "Braga" or $medic[0] eq "Braga">><<set $crewBraga=true>><</if>>

<<if $player[0] eq "Calla" or $captain[0] eq "Calla" or $pilot[0] eq "Calla" or $tech[0] eq "Calla" or $medic[0] eq "Calla">><<set $crewCalla=true>><</if>>

<<if $player[0] eq "Nellan" or $captain[0] eq "Nellan" or $pilot[0] eq "Nellan" or $tech[0] eq "Nellan" or $medic[0] eq "Nellan">><<set $crewNellan=true>><</if>>

<<if $player[0] eq "Heira" or $captain[0] eq "Heira" or $pilot[0] eq "Heira" or $tech[0] eq "Heira" or $medic[0] eq "Heira">><<set $crewHeira=true>><</if>>

<<if $player[0] eq "Tara" or $captain[0] eq "Tara" or $pilot[0] eq "Tara" or $tech[0] eq "Tara" or $medic[0] eq "Tara">><<set $crewTara=true>><</if>>

<<if $player[0] eq "Zan" or $captain[0] eq "Zan" or $pilot[0] eq "Zan" or $tech[0] eq "Zan" or $medic[0] eq "Zan">><<set $crewZan=true>><</if>>

<<if $player[0] eq "Joures" or $captain[0] eq "Joures" or $pilot[0] eq "Joures" or $tech[0] eq "Joures" or $medic[0] eq "Joures">><<set $crewJoures=true>><</if>>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s