scottkit 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74caa6f49f168820ecb2dd75e69168e99a418580
4
- data.tar.gz: 7a1ff862fc3c098090fa42c9f42927742bcd1417
3
+ metadata.gz: ba5e8627024b057135cebd745dac5be2349a7cf2
4
+ data.tar.gz: 674fcefb8713c42bc1ae4ab03beecfb2f57cc0be
5
5
  SHA512:
6
- metadata.gz: 865872bd20ee18ccd2ed13af2c121de6d0932db82fb303648948a0ceb759adbd3b0c0ace1564cf54ca81e25dd015d7a4538767805badedbc144460ca103faa0d
7
- data.tar.gz: f50211980fb0b774677efc29adde3d9ea3f06d1e512f126a47044998a270286ac545e5e1e53330d0c02baf11919005071ffaa375a6c8ded52cc0cd22afbb30ea
6
+ metadata.gz: 1baf3caed8abf5d48ca423dec47d6886f6ad0e3073daed3dfa6224c6df0c1a5f00972f7d089cd6b58df0e76666e69787f3550e05a181c7088bc12f8fbb2a2f29
7
+ data.tar.gz: 72110fd1d28992b86f89772b2d774e7abc1c3a9c8a972bbe0d6133fe73399139d9bdea1bb29cea1c5eaeb817a1e011241484006c520f07a6d68f477772ecc327
data/ChangeLog.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # Revision history for Ruby gem ScottKit
2
2
 
3
- ## 1.2.0 (IN PROGRESS)
3
+ ## 1.2.0 (Mon Oct 16 15:11:44 BST 2017)
4
4
 
5
5
  * Create initial tutorial, exactly equivalent to that of Games::ScottAdams.
6
+ * Use the special name `_` for the unused variable representing the redundant dark-flag part of save-files. This avoids an unused-variable warning when running under certain older versions of Ruby.
7
+ * Top-level README links to the tutorial, reference manual and sequence of blog-posts.
8
+ * Add new game, [`data/nosferatu`](data/nosferatu), ported from the Games::ScottAdams reimplementation of the 1982 VIC-20 BASIC game. This is incomplete.
9
+ * Escape sequences for newline (`\n`) and tab (`\t`) are interpreted in printed strings.
10
+ * Add discussion of the `print` action to the reference guide.
6
11
 
7
12
  ## 1.1.0 (Thu Oct 12 21:59:28 BST 2017)
8
13
 
@@ -60,6 +65,7 @@
60
65
 
61
66
  ## Still to do
62
67
 
68
+ * Linting options: see https://github.com/MikeTaylor/scottkit/issues/1
63
69
  * Tweak compiler to break actions when they need too many arguments as
64
70
  well as when they need too many instructions.
65
71
  * Ensure that the right files are built by `YARD`
data/README.md CHANGED
@@ -98,3 +98,15 @@ The `-b` (`--bug-tolerant`) option is needed for Scott Adams Adventure
98
98
  in room 50 of 36. None of Scott's own games is so sloppy.
99
99
 
100
100
 
101
+ Documentation
102
+ -------------
103
+
104
+ * [ScottKit Tutorial](data/tutorial/tutorial.md)
105
+ * [The ScottKit format reference manual](manual/reference.md)
106
+ * A series of blog-posts about ScottKit:
107
+ * [Scottkit is born! Only seven and a half years late!](https://reprog.wordpress.com/2017/10/12/scottkit-is-born-only-seven-and-a-half-years-late/)
108
+ * [Building adventure games with ScottKit](https://reprog.wordpress.com/2017/10/13/building-adventure-games-with-scottkit/)
109
+ * [Rooms and items in ScottKit](https://reprog.wordpress.com/2017/10/14/rooms-and-items-in-scottkit/)
110
+ * [Actions in ScottKit](https://reprog.wordpress.com/2017/10/16/actions-in-scottkit/)
111
+
112
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
@@ -0,0 +1 @@
1
+ nosferatu.sao
@@ -0,0 +1,14 @@
1
+ test: nosferatu.sao
2
+ scottkit -W -e $< < nosferatu.sol | diff nosferatu.script -
3
+
4
+ nosferatu.sao: nosferatu.sck
5
+ scottkit -c $< > $@
6
+ diff nosferatu.regression $@
7
+
8
+ rebuild:
9
+ scottkit -c nosferatu.sck > nosferatu.regression
10
+ scottkit -W -e nosferatu.sao < nosferatu.sol > nosferatu.script
11
+
12
+ clean:
13
+ rm -f nosferatu.sao
14
+
@@ -0,0 +1,13 @@
1
+ This is a re-implementation of my 1982 game _Nosferatu_:
2
+ http://www.miketaylor.org.uk/tech/advent/nos/
3
+
4
+ It was originally written in lovingly hand-crafted BASIC for the
5
+ VIC-20 with 8k expansion, and marketed by Terminal Software.
6
+
7
+ To play the VIC-20 original in an emulator:
8
+ $ xvic -memory 8k -autostart ~/web/new/comp/tech/advent/nos/NOSFERAT.TAP
9
+
10
+ Known bugs:
11
+ * "wait" always summons bus.
12
+ * "climb ladder" always works as a teleport
13
+ * The end of the game has not been coded
@@ -0,0 +1,59 @@
1
+ Nosferatu -- originally for VIC-20, now for "sac"
2
+ =================================================
3
+
4
+ 13:On Bus
5
+ \
6
+ ^GIVE COINS
7
+ /
8
+ 21:Dingy Hut 11:Bus Stop
9
+ [spade] [(bus)]
10
+ | |
11
+ | |
12
+ 20:Lawn 15:Shed 10:Graveyard 12:Witch's Cave
13
+ | [bottle] [grave] /[witch->lamp]
14
+ | | | \__GO GRAVE_/
15
+ | | |
16
+ 29:Chasm---||---27:Thicket------22:W. Pond 19:On Bridge 16:E. Pond------14:Yard---||----8:Washroom--||--9:Mortuary
17
+ [fountain] | | | | |
18
+ | | | | | |
19
+ | | | | | |
20
+ 28:Ledge---||---26:By Thicket---23:Field--------18:Junction-----17:Swamp---||---33:Grove 7:Kitchen
21
+ | |\ |
22
+ | | \____________ | __CLIMB ROPE_
23
+ | | \ | / \
24
+ 25:Pit----------24:Forest GO HOLE 1:Coffin--------2:Rat-ridden----5:Balcony 6:Ledge
25
+ / | |
26
+ ____________/ | |
27
+ / | |
28
+ 30:Entrance-----31:Cavern---||--32:Chamber 3:Chamber-------4:Library
29
+ [stalactite, [count,
30
+ passage] statue]
31
+
32
+ Other objects listed on paper map
33
+ ---------------------------------
34
+
35
+ Crucifix engraved: Blackbeard woz ere
36
+ Ladder
37
+ Axe
38
+ Lamp
39
+ Rope
40
+ Coins
41
+ Water of Life
42
+
43
+ Other notes on paper map
44
+ ------------------------
45
+
46
+ On Bridge: ">1 Object carried => fall"
47
+ Between Swamp and Junction: "Some sort of Barrier"
48
+ Forest: "needs ladder" (to climb out of pit?)
49
+ By thicket: "JUMP"
50
+ Field of Grass: "DIG HERE. GO HOL"
51
+ Entrance: "SEMIDARK"
52
+ Cavern: "NEED LAMP / OR BREAK NECK"
53
+ Cavern: "Throw Axe. At Stalactite. It shatters, see passage"
54
+ Balcony: "Tie Rope, to Balcony. Climb Rope"
55
+ Washroom: "Locked doors"
56
+ Cave: "GIVE WATER (IN BOTTLE) => GET LAMP"
57
+ Bus stop: "WAIT: GIVE COINS"
58
+ Chamber: "Count sleeps on altar"
59
+ Chamber: "GO PASSAGE. SAY 'S$'"
@@ -0,0 +1,345 @@
1
+ 19540
2
+ 55
3
+ 67
4
+ 44
5
+ 33
6
+ 5
7
+ 2
8
+ 1
9
+ 3
10
+ 999
11
+ 44
12
+ 1
13
+
14
+ 750 0 0 0 0 0 9900 0
15
+ 1507 0 0 0 0 0 9900 0
16
+ 900 0 0 0 0 0 9750 0
17
+ 1058 0 0 0 0 0 10650 0
18
+ 100 29 20 0 0 0 8701 373
19
+ 0 0 0 0 0 0 454 823
20
+ 0 0 0 0 0 0 986 1050
21
+ 1200 652 0 0 0 0 1200 0
22
+ 100 644 309 0 0 0 8464 0
23
+ 100 624 308 0 0 0 8614 0
24
+ 100 664 86 0 0 0 1413 0
25
+ 1359 352 0 0 0 0 1500 0
26
+ 1359 60 0 0 0 0 1708 0
27
+ 1810 68 124 60 340 160 9055 7962
28
+ 1800 68 60 0 0 0 9013 0
29
+ 1800 0 0 0 0 0 2100 0
30
+ 1959 162 140 0 0 0 8100 0
31
+ 1959 144 221 0 0 0 2313 0
32
+ 1959 144 120 0 0 0 8100 0
33
+ 2111 203 302 300 320 0 10812 9600
34
+ 161 322 300 0 0 0 8100 0
35
+ 162 382 260 0 0 0 8100 0
36
+ 2400 425 420 0 0 0 7966 0
37
+ 163 422 280 0 0 0 8100 0
38
+ 2714 442 921 920 980 0 8303 10950
39
+ 0 440 480 0 0 0 10817 9600
40
+ 2565 522 0 0 0 0 2788 2913
41
+ 1200 484 680 700 0 0 10820 9600
42
+ 166 702 620 0 0 0 8100 0
43
+ 1967 562 500 0 0 0 8100 0
44
+ 3000 544 580 0 0 0 8100 0
45
+ 3000 584 540 0 0 0 8100 0
46
+ 1518 283 942 280 980 920 3222 11100
47
+ 3168 921 920 980 280 0 3205 10800
48
+ 3319 552 0 0 0 0 3300 0
49
+ 3319 40 0 0 0 0 3508 0
50
+ 3461 48 602 40 540 0 9053 10950
51
+ 0 600 620 0 0 0 10824 9600
52
+ 161 622 440 0 0 0 8100 0
53
+ 3471 48 1022 40 540 0 9053 10950
54
+ 0 1020 1040 0 0 0 10824 9600
55
+ 3450 48 40 540 0 0 9053 1825
56
+ 172 1042 660 0 0 0 8100 0
57
+ 3623 1062 0 20 0 0 1826 4112
58
+ 3774 40 0 0 0 0 4254 0
59
+ 3925 0 0 0 0 0 4350 0
60
+ 3926 104 0 0 0 0 4586 13231
61
+ 3927 103 0 0 0 0 4800 0
62
+ 3928 123 0 0 0 0 4950 0
63
+ 3908 143 0 0 0 0 5100 0
64
+ 4079 263 0 0 0 0 1835 5473
65
+ 0 260 280 80 0 0 10858 0
66
+ 2130 22 88 40 80 0 5603 8014
67
+ 2130 22 0 0 0 0 5700 0
68
+ 1531 42 40 60 0 0 5905 7950
69
+ 1532 62 0 0 0 0 6000 0
70
+ 4233 541 802 800 820 0 10873 0
71
+ 0 840 860 0 0 0 10821 0
72
+ 183 822 600 0 0 0 8100 0
73
+ 184 462 220 0 0 0 8100 0
74
+ 185 1002 640 0 0 0 8100 0
75
+ 4386 483 480 180 0 0 10821 9600
76
+ 4500 0 0 0 0 0 6150 0
77
+ 4650 0 0 0 0 0 6385 0
78
+ 2400 0 0 0 0 0 3750 0
79
+ 3000 0 0 0 0 0 6450 0
80
+ 1200 0 0 0 0 0 6600 0
81
+ 4800 0 0 0 0 0 9600 0
82
+
83
+ "AUT" "ANY"
84
+ "WAL" "NOR"
85
+ "*ENT" "SOU"
86
+ "*GO" "EAS"
87
+ "*RUN" "WES"
88
+ "INV" "UP"
89
+ "SCO" "DOW"
90
+ "SAV" "INV"
91
+ "DIG" "GAM"
92
+ "TIE" "ROP"
93
+ "TAK" "RAI"
94
+ "*GET" "DOO"
95
+ "TO" "GRA"
96
+ "CLI" "BUS"
97
+ "OPE" "BOT"
98
+ "*UNL" "COI"
99
+ "WAI" "PIT"
100
+ "GIV" "LAD"
101
+ "LEA" "WAT"
102
+ "*DRO" "AXE"
103
+ "JUM" "*AX"
104
+ "POU" "STA"
105
+ "THR" "ENT"
106
+ "AT" "COU"
107
+ "KIL" "COF"
108
+ "TEL" "BOO"
109
+ "REA" "LIB"
110
+ "DRI" "ATL"
111
+ "CHO" "MAG"
112
+ "LIG" "WHI"
113
+ "HEL" "SAR"
114
+ "EXA" "BOD"
115
+ "LOO" "DUS"
116
+ "*L" "THI"
117
+ "" "HOL"
118
+ "" "TUN"
119
+ "" "LAM"
120
+ "" "CRO"
121
+ "" "KEY"
122
+ "" "KIP"
123
+ "" "MAL"
124
+ "" "SPA"
125
+ "" "STI"
126
+ "" "MAT"
127
+ "" "BLO"
128
+
129
+ 0 0 0 0 0 0 ""
130
+ 0 0 0 0 0 0 "hidden treasury."
131
+ 0 0 3 0 0 0 "tall, satin-lined wooden box."
132
+ 8 4 6 2 0 0 "*I'm in an empty room."
133
+ 3 0 5 0 0 0 "dark crypt."
134
+ 6 0 0 4 0 0 "*I'm in the library."
135
+ 0 5 0 3 0 0 "*I'm on a balcony overlooking a tall cliff."
136
+ 0 0 0 0 0 0 "*I'm on a narrow ledge high up on a cliff."
137
+ 9 3 0 0 0 0 "*I'm in the kitchen."
138
+ 0 8 10 0 0 0 "*I'm in the washroom."
139
+ 11 0 0 9 0 0 "*I'm in the mortuary."
140
+ 12 10 0 0 0 0 "desolate windswept graveyard."
141
+ 0 11 0 0 0 0 "*I'm by a bus-stop."
142
+ 0 0 0 0 0 0 "dark gloomy cave."
143
+ 0 12 0 0 0 0 "*I'm on a double-decker bus."
144
+ 16 0 9 17 0 0 "rather dark yard."
145
+ 0 15 0 0 0 0 "dark shed."
146
+ 0 18 15 0 0 0 "*I'm by a fishpond ..."
147
+ 17 0 0 19 0 0 "damp swamp."
148
+ 20 0 18 24 0 0 "*I'm on a track. To my North is a bridge over a pond."
149
+ 21 19 0 0 0 0 "*I'm on a very flimsy bridge..."
150
+ 22 20 0 0 0 0 "*I'm on a lawn to the North of a pond."
151
+ 0 21 0 0 0 0 "small hut."
152
+ 0 24 0 28 0 0 "*I'm west of a pond."
153
+ 23 25 19 27 0 0 "sunny field."
154
+ 24 25 25 26 0 0 "*I'm in an oak-forest."
155
+ 0 0 0 0 0 0 "*I'm at the bottom of a disused cesspit."
156
+ 28 26 24 0 0 0 "*I'm north of a rather smelly hole."
157
+ 0 27 23 0 0 0 "*I'm at the top of a cliff."
158
+ 30 0 0 0 0 0 "*I'm on a narrow ledge, East of a chasm."
159
+ 0 29 28 0 0 0 "*I'm at the edge of a deep chasm."
160
+ 0 0 0 0 0 0 "*I'm at the bottom of a deep hole."
161
+ 0 31 0 0 0 0 "subterranean cavern."
162
+ 0 32 0 0 0 0 "cavern where the count sleeps."
163
+
164
+ ""
165
+ "Welcome to `NOSFERATU`, by Mike Taylor."
166
+ " Original VIC-20 BASIC version, 1982"
167
+ " Translation to Games::ScottAdams starting Sunday 25th November 2001"
168
+ " Translation to ScottKit starting Saturday 14 October 2017"
169
+ "This is a demo for the `ScottKit` adventure system --"
170
+ "See https://github.com/MikeTaylor/scottkit/"
171
+ "Your task is to kill the evil count Nosferatu and get back home."
172
+ "I'll need a spade."
173
+ "Nosferatu rises from his altar, and bites my neck!"
174
+ "Huh? What rope?"
175
+ "To what (eg. to key)"
176
+ "OK."
177
+ "What a stupid concept."
178
+ "Huh?"
179
+ "I'm too heavy:
180
+ I fall!"
181
+ "The bus arrives."
182
+ "The witch drinks the water, rejuvenates, drops something, and disappears!"
183
+ "He takes them and rings a bell. The bus starts."
184
+ "You arrive home."
185
+ "I break through to an underground chamber!"
186
+ "OK"
187
+ "Huh? What axe?"
188
+ "At what (eg. at bus)"
189
+ "It shatters!"
190
+ "Nothing happens."
191
+ "I punch him and he crumbles to dust."
192
+ "Huh! That was easier than I expected!"
193
+ ">Fzing!<"
194
+ "Which one?"
195
+ "OK, but it'll take a while."
196
+ "That was boring! It was in Transylvanian!"
197
+ "The book says:
198
+
199
+ Near the forest is a disused cess-pit."
200
+ "The book says:
201
+
202
+ Magic word id: 'OVYEZ'"
203
+ "The book says:
204
+
205
+ Bored with this game already, huh?"
206
+ "Burp! It's good!"
207
+ "I feel stronger."
208
+ "I find something!"
209
+ "The lid's too heavy!"
210
+ "It turns to dust!"
211
+ "It slips through my fingers"
212
+ "You'll have to figure it out for yourself."
213
+ "It looks like a pretty average"
214
+ "Wheee!"
215
+ "I find nothing."
216
+
217
+ "*treasure* (you shouldn't be able to see this)" 0
218
+ "stone Sarcophagus" 4
219
+ "decomposing Body" 0
220
+ "pile of Dust" 0
221
+ "wooden Cross/CRO/" 0
222
+ "transylvanian Atlas/ATL/" 5
223
+ "book of Magic/MAG/" 5
224
+ "book of Games/GAM/" 5
225
+ "rope tied to rail" 0
226
+ "lit Lamp/LAM/" 0
227
+ "brass Key/KEY/" 7
228
+ "scarlet Kipper/KIP/" 7
229
+ "hanging Rope" 7
230
+ "bottle of Whisky/WHI/" 8
231
+ "empty whisky Bottle/BOT/" 0
232
+ "locked Door" 9
233
+ "wide open Door" 0
234
+ "long Rope/ROP/" 9
235
+ "7-pound Mallet/MAL/" 10
236
+ "newely dug open Grave" 11
237
+ "tombstone engraved: BEWARE THE WITCH" 11
238
+ "large red no. 29 Bus" 0
239
+ "wrinkled old Witch" 13
240
+ "Hole (above me)" 13
241
+ "old Lamp/LAM/" 0
242
+ "balcony Rail" 6
243
+ "bus Conductor" 14
244
+ "sharp Axe/AXE/" 15
245
+ "tall Ladder/LAD/" 16
246
+ "maneating Shark!" 17
247
+ "Hut with locked door" 21
248
+ "Hut with smashed door" 0
249
+ "garden Spade/SPA/" 22
250
+ "sharp wooden Stick/STI/" 22
251
+ "crusifix engraved on the ground" 24
252
+ "Pit in the ground" 0
253
+ "oak-Trees" 25
254
+ "Sign says: 'TREES ARE RESERVED FOR COFFINS'" 25
255
+ "golden Coins/COI/" 26
256
+ "brick Wall" 27
257
+ "inpenetrable Thicket" 28
258
+ "mutilated thicket" 0
259
+ "Sign here says: 'EXA NO FO TROHS'" 28
260
+ "SHORT OF AN AXE' is written backwards on a Sign nearby'" 0
261
+ "brick Wall" 29
262
+ "safety Match/MAT/" 29
263
+ "Water of youth" 30
264
+ "Fountain of youth" 30
265
+ "Hole in thicket" 30
266
+ "whisky Bottle/BOT/" 0
267
+ "secret Tunnel" 31
268
+ "Stalactites hanging from the ceiling" 32
269
+ "entrance to cave" 0
270
+ "the count Nosferatu" 33
271
+ "stone Altar" 33
272
+ "giant *BLOODSTONE*/BLO/" 33
273
+
274
+ ""
275
+ ""
276
+ ""
277
+ ""
278
+ ""
279
+ "cont"
280
+ "cont"
281
+ ""
282
+ "everywhere inside the cavern is dark"
283
+ "everywhere outside the bottom of the pit is light"
284
+ ""
285
+ ""
286
+ ""
287
+ ""
288
+ ""
289
+ ""
290
+ ""
291
+ "We would rather this happen carrying more than one object, but this is near enough."
292
+ ""
293
+ "In the original, this created a new exit leading west, but we can't do that in the Scott Adams engine. Instead, the player must GO DOOR."
294
+ ""
295
+ ""
296
+ ""
297
+ ""
298
+ ""
299
+ ""
300
+ ""
301
+ ""
302
+ ""
303
+ ""
304
+ ""
305
+ ""
306
+ ""
307
+ ""
308
+ ""
309
+ ""
310
+ ""
311
+ ""
312
+ ""
313
+ ""
314
+ ""
315
+ ""
316
+ ""
317
+ ""
318
+ ""
319
+ ""
320
+ ""
321
+ ""
322
+ ""
323
+ ""
324
+ ""
325
+ "cont"
326
+ ""
327
+ ""
328
+ ""
329
+ ""
330
+ ""
331
+ ""
332
+ ""
333
+ ""
334
+ ""
335
+ "We only really want to look if it was previously dark. Can do this with flags."
336
+ ""
337
+ ""
338
+ ""
339
+ ""
340
+ ""
341
+ ""
342
+
343
+ 1
344
+ 18401
345
+ 0