Dark Forest Crow Notes - Interactive fiction, text-interactions based and roleplaying games

Tuesday, July 5, 2016

Overview of interactive fiction frameworks #1: Twine


I decided to give a brief overview of commonly used frameworks for interactive fiction and text based games development. Most of them are primitive enough to be covered on a single page. I don't want to write yet another tutorial #1000, I maybe put some links to existing ones.

I start with Twine. People who write interactive fiction nowadays like this 'framework' because it allows to create a 'game' from scratch in a minute. Literally. You don't need to be a programmer. You don't need to use your brain most of the time. You just write some passages, add some links, some variables (variables are for advanced Twine users, don't laugh, don't laugh) - and your game is ready to be published in the internet.


Psyduck uses Twine. Psyduck feels bad.
I am not saying it's bad. I am saying it's super simple. And this is bad. Simplification made too early is the worst thing in any learning process. When you learn something for the first time in your life, your mind changes significantly (as well as your brain structure, amount and strength of connections between neurons,...). And the entire perception of any advanced thing in the future will be based on your first experience and the model created in your mind. 

That's why every simple framework like Twine may be fatal for complete newcomers in games development with zero knowledge of any decent programming language techniques and patterns.

So, I want to create my first interactive fiction game. I don't know how to start, but I am clever enough to google things. I encounter Twine. What do I do now?

1.) I download and install it.

2.) I launch it:



3.) I press '+ Story', I name my story, I see this:



4.) I click on that fancy square and edit it's content:



5.) I press '+ passage'. I edit this new passage:


Now I need to connect my passages somehow. I don't see any arrows (usually in such kind of editors you use arrows to connect tiles/places/figures). Time to google! It seems you need to edit the text of a passage to make a link to another one:

6.) I add '->' after the text of my first passage. Twine suggests me the name of my second passage (so kind), but it actually fails: as you can see, it added ']]' symbols, but didn't add '[[' at the beginning. 



7.) I fix it and I see the miracle of science: arrow appears!



8.) Time to test my creation. I press 'play'.


9.) I press on the text and the game shows me the second passage: 


10.) [Optional] I cry because I have finally created something - my brand new game.

As you can see, it's pretty simple. It's simple when you need to create something simple. But if you need variables, conditions, classes and objects, events (any simple thing that you usually use during development) Twine says 'Of course you can do it, mate, but don't ask me to help!' 

And you do it. On your own. Digging javascript or using crutches that Twine suggests you to use:

- Tons of macros. Literally. Save your eyes, don't look at them.

One girl posted a guide here describing how to create something 'advanced' using Twine.

There is even something that looks like code snippet:

(else:)[ You hit the monster!  
  (set:$monster_hp = $monster_hp - 1)  
  (if: $monster_hp < 1)[ The [[monster is dead]]! ]  
  (else:)[    
    Its health is $monster_hp.
    [[fight]] 
    [[flee|main]] ]  
]

You see conditions, you see variables. Not that bad. But why do I need to use this tool if I still have to write code in some strange programming language (and even in javascript!) to create something different from 'Hello World' example? That's why:

- You are not a beginner and you just want to create something simple and fast.

- You need to create something that will use browser as it's engine. This is probably the only reason why I could use this tool.

- You are a beginner and you want to create something simple and fast and forget about it in a hope that your brain will not be damaged.

Here's an another blog of a girl who uses Twine with tutorial and with a list of games you can play. For example, 'at the bonfire' (yeah they use dropbox to distribute their games!) Some links are broken tho.

I also suggest this blog of yet another girl, Gersandelf. It contains an article which describes really advanced Twine techniques showing the implementation of items system with really good explanations. If you decided to use Twine, check this out.

Caw caw.

No comments:

Post a Comment