Skip to content

Commit 161af57

Browse files
authored
Merge pull request #3 from dastels/master
Add a cave example
2 parents 8ebf84e + 2675144 commit 161af57

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed

examples/cave/cyoa.json

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
[
2+
{
3+
"card_id": "start",
4+
"background_image": "page01.bmp",
5+
"text": "Welcome adventurer. Your adventure begins, as many do, in Ye Olde Inn.",
6+
"text_color": "0x000001",
7+
"button01_text": "Continue",
8+
"button01_goto_card_id": "inn",
9+
},
10+
{
11+
"card_id": "inn",
12+
"background_image": "page01.bmp",
13+
"text": "This is a peaceful, happy inn with plentiful drink, tasty food, and friendly staff.",
14+
"text_color": "0x000001",
15+
"button01_text": "Stay here",
16+
"button01_goto_card_id": "inn",
17+
"button02_text": "Adventure!",
18+
"button02_goto_card_id": "cave entrance",
19+
},
20+
{
21+
"card_id": "cave entrance",
22+
"background_image": "page01.bmp",
23+
"text": "There is a dark cave in the hillside before you.",
24+
"text_color": "0x000001",
25+
"button01_text": "Go inside",
26+
"button01_goto_card_id": "entry",
27+
"button02_text": "Run away",
28+
"button02_goto_card_id": "inn"
29+
},
30+
{
31+
"card_id": "entry",
32+
"background_image": "page01.bmp",
33+
"text": "You are in a dark, narrow tunnel.",
34+
"text_color": "0x000001",
35+
"button01_text": "Next",
36+
"button01_goto_card_id": "side opening",
37+
},
38+
{
39+
"card_id": "side opening",
40+
"background_image": "page01.bmp",
41+
"text": "You are in a small room, one tunnel leads ahead and another to the side. Do you continue on or explore the side tunnel?",
42+
"text_color": "0x000001",
43+
"button01_text": "Continue",
44+
"button01_goto_card_id": "skeleton room",
45+
"button02_text": "Side Tunnel",
46+
"button02_goto_card_id": "treasure room",
47+
},
48+
{
49+
"card_id": "treasure room",
50+
"background_image": "page01.bmp",
51+
"text": "There is a pile of treasure here. Congratulations!",
52+
"text_color": "0x000001",
53+
"button01_text": "Next",
54+
"button01_goto_card_id": "maze 1",
55+
},
56+
{
57+
"card_id": "skeleton room",
58+
"background_image": "page01.bmp",
59+
"text": "There is a skeleton on the floor. From the items around it, it seems to be that of an unfortunate adventurer.",
60+
"text_color": "0x000001",
61+
"button01_text": "Next",
62+
"button01_goto_card_id": "maze 2",
63+
},
64+
{
65+
"card_id": "maze 1",
66+
"background_image": "page01.bmp",
67+
"text": "There are passages to the left and right.",
68+
"text_color": "0x000001",
69+
"button01_text": "Left",
70+
"button01_goto_card_id": "maze 3",
71+
"button02_text": "Right",
72+
"button02_goto_card_id": "maze 2",
73+
},
74+
{
75+
"card_id": "maze 2",
76+
"background_image": "page01.bmp",
77+
"text": "There are passages to the left and right.",
78+
"text_color": "0x000001",
79+
"button01_text": "Left",
80+
"button01_goto_card_id": "maze 1",
81+
"button02_text": "Right",
82+
"button02_goto_card_id": "maze 4",
83+
},
84+
{
85+
"card_id": "maze 3",
86+
"background_image": "page01.bmp",
87+
"text": "There are passages to the left and right.",
88+
"text_color": "0x000001",
89+
"button01_text": "Left",
90+
"button01_goto_card_id": "maze 5",
91+
"button02_text": "Right",
92+
"button02_goto_card_id": "maze 2",
93+
},
94+
{
95+
"card_id": "maze 4",
96+
"background_image": "page01.bmp",
97+
"text": "There are passages to the left and right.",
98+
"text_color": "0x000001",
99+
"button01_text": "Left",
100+
"button01_goto_card_id": "maze 1",
101+
"button02_text": "Right",
102+
"button02_goto_card_id": "maze 6",
103+
},
104+
{
105+
"card_id": "maze 5",
106+
"background_image": "page01.bmp",
107+
"text": "There are passages to the left and right.",
108+
"text_color": "0x000001",
109+
"button01_text": "Left",
110+
"button01_goto_card_id": "maze 4",
111+
"button02_text": "Right",
112+
"button02_goto_card_id": "creaking",
113+
},
114+
{
115+
"card_id": "maze 6",
116+
"background_image": "page01.bmp",
117+
"text": "There are passages to the left and right.",
118+
"text_color": "0x000001",
119+
"button01_text": "Left",
120+
"button01_goto_card_id": "creaking",
121+
"button02_text": "Right",
122+
"button02_goto_card_id": "maze 3",
123+
},
124+
{
125+
"card_id": "creaking",
126+
"background_image": "page01.bmp",
127+
"text": "You hear an ominuous creaking from around the corner",
128+
"text_color": "0x000001",
129+
"button01_text": "Continue",
130+
"button01_goto_card_id": "bridge room",
131+
"button02_text": "Turn back",
132+
"button02_goto_card_id": "inn",
133+
},
134+
{
135+
"card_id": "bridge room",
136+
"background_image": "page01.bmp",
137+
"text": "There is a creaking, rickity wooded bridge leading across a gaping chasm. At the other end is a large treasure chest. There is also a hort tunnel with daylight at the end.",
138+
"text_color": "0x000001",
139+
"button01_text": "Treasure!",
140+
"button01_goto_card_id": "die",
141+
"button02_text": "Leave",
142+
"button02_goto_card_id": "inn",
143+
},
144+
{
145+
"card_id": "die",
146+
"background_image": "page01.bmp",
147+
"text": "The bridge gives way and you fall to a painful death.",
148+
"text_color": "0x000001",
149+
"button01_text": "Next",
150+
"button01_goto_card_id": "inn",
151+
}
152+
]

examples/cave/page01.bmp

9.44 KB
Binary file not shown.

0 commit comments

Comments
 (0)