Ink – inkle's narrative scripting language
inklestudios.com
inklestudios.com
[
`I stared at Monsieur Fogg.`,
{
if: `know_about_wager`,
then: [`<> "But surely you are not serious?" I demanded.`],
else: [`<> "But there must be a reason for this trip," I observed.`]
},
`He said nothing in reply, merely considering his newspaper with as much
thoroughness as entomologist considering his latest pinned addition.`
]
Or, more complicated: [
`I looked at Monsieur Fogg `,
{choose: [
`... and I could contain myself no longer.`,
`What is the purpose of our journey, Monsieur?`,
`'A wager,' he replied.`,
{choose: [
`'A wager!'[] I returned.`,
`He nodded.`,
{choose: `'But surely that is foolishness!'`},
{choose: [`'A most serious matter then!'`, `He nodded again.`]},
{choose: [
`'But can we win?'`,
`'That is what we will endeavour to find out,' he answered.`
]},
{choose: [
`'A modest wager, I trust?'`,
`'Twenty thousand pounds,' he replied, quite flatly.`
]},
{choose: `I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <>`}
]},
{choose: `'Ah[.'],' I replied, uncertain what I thought.`},
`After that, <>`
]},
{choose: `... but I said nothing[] and <>`},
`we passed the day in silence.`,
{goto: 'END'}
]
[1]: http://sriku.org/blog/2012/04/15/j-expressions/Ink is more suited for embedding in a game which adds additional presentation or gameplay stuff on top of the text, using some other language/engine (like Unity). It will handle the text stuff, and provide hooks/bindings for the rest of the game to use.
Whereas, in Ink, IIRC the flow is like scrolling text. New passages appear below the older ones, depending on choices made. I don't know a lot about Ink to be honest.