Skip to content

Instantly share code, notes, and snippets.

@frankhale
Last active November 6, 2015 00:00
Show Gist options
  • Save frankhale/b88b80359dd080cac546 to your computer and use it in GitHub Desktop.
Save frankhale/b88b80359dd080cac546 to your computer and use it in GitHub Desktop.
A hypothetical data file for an interactive fiction engine capable of playing a Cloak of Darkness clone
rooms
1 Opera House Foyer
1 You are in the Foyer of the Opera House. This room has doors to the south and
1 west, also an unusable exit to the north. The room is quiet and you don't see
1 anyone around.
2 Cloak Room
2 You are in the cloak room. The room resembles a large walk in closet. You see
2 a brass hook on the wall.
3 The Bar
3 You are in the bar and it is extremely dark, you cannot see anything right
3 now. You can't even see if there is a light switch.
actions
2 1 hang 1
2 1 hang, place, put, throw
2 1 1 You take off your cloak and hang it up on the hook.
3 2 read 2
3 2 read, look, ponder, interpret
3 2 1 The message on the floor reads, YOU WON!
3 2 2 Because you disturbed the room while moving around in the dark you made
3 2 2 the message written on the floor impossible to read. I'm sorry but you
3 2 2 have lost.
3 2 3 You cannot see anything in the room because it's too dark.
triggers
3 entry
3 1 The room is lit vibrantly and you notice a message is scratched in sawdust
3 1 on the floor.
3 2 You can see the room now and there is nothing special about it. You do
3 2 notice that there is a mess on the floor but you cannot discern why it's
3 2 there.
3 movement
3 1 Your movement has disturbed things within the room and the room is no longer
3 1 as it was when you first entered.
objects
0 1 cloak
0 1 1 A eerily dark velvet cloak
0 1 2 This garment is made of a light absorbing material causing it to cancels
0 1 2 available light shedding darkness on objects around you.
0 1 3 cloak, dark cloak, velvet cloak
0 1 4 true
0 1 5 true
3 2 message
3 2 5 false
exits
1 0 3 0 2
2 0 0 1 0
3 1 0 0 0
@frankhale
Copy link
Author

Round #3. This is unfinished. I want a much cleaner format that is less error prone to parse.

text
1 You are in the Foyer of the Opera House. This room has doors to the south and west, also an
1 unusable exit to the north. The room is quiet and you don't see anyone around.
2 You are in the cloak room. The room resembles a large walk in closet. You see a brass hook on the
2 wall.
3 You are in the bar and it is extremely dark, you cannot see anything right now. You can't even see
3 if there is a light switch.
4 You take off your cloak and hang it up on the hook.
6 Because you disturbed the room while moving around in the dark you made the message written on the
6 floor impossible to read.
7 The message on the floor reads, YOU WON!
8 I'm sorry but you have lost.
9 You cannot see anything in the room because it's too dark.
10 The room is lit vibrantly and you notice a message is scratched in sawdust on the floor.
11 You can see the room now and there is nothing special about it. You do notice that there is a
11 mess on the floor but you cannot discern why it's there.
12 Your movement has disturbed things within the room and the room is no longer as it was when you
12 first entered.
13 A eerily dark velvet cloak
14 This garment is made of a light absorbing material causing it to cancels available light shedding
14 darkness on objects around you.

synonyms
1 cloak, dark cloak, velvet cloak, jacket, overcoat
2 hang, place, put, throw, toss
3 read, look, ponder, interpret, consider
4 message, words, inscription, sign
5 foyer, front room, entrance
6 cloak room, closet
7 bar

rooms
1 Opera House Foyer
2 Cloak Room
3 The Bar

actions
1 hang
2 read

triggers
1 entry
2 movement

objects
1 cloak
2 message

exits
1 0 0 0 3 0 0 0 2
2 0 0 0 0 0 0 1 0
3 1 0 0 0 0 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment