1 ;;; Mudsync --- Live hackable MUD
2 ;;; Copyright © 2016, 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
4 ;;; This file is part of Mudsync.
6 ;;; Mudsync is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or
9 ;;; (at your option) any later version.
11 ;;; Mudsync is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with Mudsync. If not, see <http://www.gnu.org/licenses/>.
21 (use-modules (mudsync)
32 ;;; Utilities, useful or otherwise
33 ;;; ==============================
35 (set! *random-state* (random-state-from-platform))
37 (define (random-choice lst)
38 (list-ref lst (random (length lst))))
40 ;; list of lists, lol.
41 (define-syntax-rule (lol (list-contents ...) ...)
42 (list (list list-contents ...) ...))
45 ;;; Some simple object types.
46 ;;; =========================
48 (define-class <readable> (<gameobj>)
49 (read-text #:init-value "All it says is: \"Blah blah blah.\""
50 #:init-keyword #:read-text)
52 #:allocation #:each-subclass
53 #:init-thunk (build-commands
54 ("read" ((direct-command cmd-read)))))
55 (actions #:allocation #:each-subclass
56 #:init-thunk (build-actions
57 (cmd-read readable-cmd-read))))
59 (define (readable-cmd-read actor message . _)
60 (<- (message-from message) 'tell
61 #:text (slot-ref actor 'read-text)))
64 ;; This one is just where reading is the same thing as looking
66 (define-class <readable-desc> (<gameobj>)
68 #:allocation #:each-subclass
69 #:init-thunk (build-commands
70 ("read" ((direct-command cmd-look-at))))))
72 ;; This one allows you to take from items that are proxied by it
73 (define-actor <proxy-items> (<gameobj>)
74 ((cmd-take-from take-from-proxy))
75 (proxy-items #:init-keyword #:proxy-items))
77 (define* (take-from-proxy gameobj message
78 #:key direct-obj indir-obj preposition
79 (player (message-from message)))
84 (define obj-id (dyn-ref gameobj obj-sym))
86 (mbody-val (<-wait obj-id 'goes-by)))
87 (when (ci-member direct-obj goes-by)
88 (<- obj-id 'cmd-take #:direct-obj direct-obj #:player player)
90 (slot-ref gameobj 'proxy-items))
93 #:text `("You don't see any such " ,direct-obj " to take "
94 ,preposition " " ,(slot-ref gameobj 'name) ".")))))
101 (define (npc-chat-randomly actor message . _)
103 (random-choice (slot-ref actor 'catchphrases)))
105 ((slot-ref actor 'chat-format) actor catchphrase))
106 (<- (message-from message) 'tell
107 #:text text-to-send))
109 (define hotel-owner-grumps
110 '("Eight sinks! Eight sinks! And I couldn't unwind them..."
111 "Don't mind the mess. I built this place on a dare, you
113 "(*tearfully*) Here, take this parenthesis. May it serve
115 "I gotta get back to the goblin farm soon..."
116 "Oh, but I was going to make a mansion... a great,
117 beautiful mansion! Full of ghosts! Now all I have is this cruddy
118 mo... hotel. Oh... If only I had more time!"
119 "I told them to paint more of the walls purple.
120 Why didn't they listen?"
121 "Listen to that overhead muzak. Whoever made that doesn't
122 know how to compose very well! Have you heard of the bands 'fmt'
123 or 'skribe'? Now *that's* composition!"))
125 (define-class <chatty-npc> (<gameobj>)
126 (catchphrases #:init-value '("Blarga blarga blarga!")
127 #:init-keyword #:catchphrases)
128 (chat-format #:init-value (lambda (npc catchphrase)
129 `(,(slot-ref npc 'name) " says: \""
131 #:init-keyword #:chat-format)
133 #:allocation #:each-subclass
134 #:init-thunk (build-commands
135 (("chat" "talk") ((direct-command cmd-chat)))))
136 (actions #:allocation #:each-subclass
139 (cmd-chat npc-chat-randomly))))
141 (define-class <sign-in-form> (<gameobj>)
143 #:allocation #:each-subclass
144 #:init-thunk (build-commands
145 ("sign" ((prep-direct-command cmd-sign-form '("as"))))))
147 (actions #:allocation #:each-subclass
148 #:init-thunk (build-actions
149 (cmd-sign-form sign-cmd-sign-in))))
153 (sre->irregex '(: alpha (** 1 14 (or alphanum "-" "_")))))
155 (define forbidden-words
156 (append article preposition
157 '("and" "or" "but" "admin")))
159 (define (valid-name? name)
160 (and (irregex-match name-sre name)
161 (not (member name forbidden-words))))
163 (define* (sign-cmd-sign-in actor message
164 #:key direct-obj indir-obj preposition)
166 (mbody-val (<-wait (message-from message) 'get-name)))
167 (define name indir-obj)
168 (if (valid-name? indir-obj)
170 (<-wait (message-from message) 'set-name! name)
171 (<- (slot-ref actor 'loc) 'tell-room
172 #:text (format #f "~a signs the form!\n~a is now known as ~a\n"
173 old-name old-name name)))
174 (<- (message-from message) 'tell
175 #:text "Sorry, that's not a valid name.
176 Alphanumerics, _ and - only, 2-15 characters, starts with an alphabetic
180 (define-class <summoning-bell> (<gameobj>)
181 (summons #:init-keyword #:summons)
184 #:allocation #:each-subclass
185 #:init-thunk (build-commands
186 ("ring" ((direct-command cmd-ring)))))
187 (actions #:allocation #:each-subclass
188 #:init-thunk (build-actions
189 (cmd-ring summoning-bell-cmd-ring))))
191 (define* (summoning-bell-cmd-ring bell message . _)
192 ;; Call back to actor who invoked this message handler
193 ;; and find out their name. We'll call *their* get-name message
194 ;; handler... meanwhile, this procedure suspends until we get
197 (mbody-val (<-wait (message-from message) 'get-name)))
199 ;; Now we'll invoke the "tell" message handler on the player
200 ;; who rang us, displaying this text on their screen.
201 ;; This one just uses <- instead of <-wait, since we don't
202 ;; care when it's delivered; we're not following up on it.
203 (<- (message-from message) 'tell
204 #:text "*ring ring!* You ring the bell!\n")
205 ;; We also want everyone else in the room to "hear" the bell,
206 ;; but they get a different message since they aren't the ones
207 ;; ringing it. Notice here's where we make use of the invoker's
208 ;; name as extracted and assigned to the who-rang variable.
209 ;; Notice how we send this message to our "location", which
210 ;; forwards it to the rest of the occupants in the room.
211 (<- (gameobj-loc bell) 'tell-room
213 (format #f "*ring ring!* ~a rings the bell!\n"
215 #:exclude (message-from message))
216 ;; Now we perform the primary task of the bell, which is to summon
217 ;; the "clerk" character to the room. (This is configurable,
218 ;; so we dynamically look up their address.)
219 (<- (dyn-ref bell (slot-ref bell 'summons)) 'be-summoned
220 #:who-summoned (message-from message)))
223 (define prefect-quotes
224 '("I'm a frood who really knows where my towel is!"
225 "On no account allow a Vogon to read poetry at you."
226 "Time is an illusion, lunchtime doubly so!"
227 "How can you have money if none of you produces anything?"
228 "On no account allow Arthur to request tea on this ship."))
230 (define-class <cabinet-item> (<gameobj>)
231 (take-me? #:init-value
234 `("Hm, well... the cabinet is locked and the properitor "
235 "is right over there.")))))
243 '((p "You're in some sort of hotel lobby. You see a large sign hanging "
244 "over the desk that says \"Hotel Bricabrac\". On the desk is a bell "
245 "that says \"'ring bell' for service\". Terrible music plays from a speaker "
246 "somewhere overhead. "
247 "The room is lined with various curio cabinets, filled with all sorts "
248 "of kitschy junk. It looks like whoever decorated this place had great "
249 "ambitions, but actually assembled it all in a hurry and used whatever "
250 "kind of objects they found lying around.")
251 (p "There's a door to the north leading to some kind of hallway."))
255 #:to 'grand-hallway)))
259 #:name "a languid lady"
261 '((p " Whoever this is, she looks totally exhausted. She's
262 collapsed into the only comfortable looking chair in the room and you
263 don't get the sense that she's likely to move any time soon.
264 Attached to her frumpy dress is a barely secured pin which says
265 \"Hotel Proprietor\", but she looks so disorganized that you think
266 that can't possibly be true... can it?")
267 (p "Despite her exhaustion, you sense she'd be happy to chat
268 with you, though the conversation may be a bit one sided."))
270 #:goes-by '("languid lady" "lady"
271 "hotel proprietor" "proprietor")
272 #:catchphrases hotel-owner-grumps)
276 #:name "the Hotel Bricabrac sign"
277 #:desc " It strikes you that there's something funny going on with this sign.
278 Sure enough, if you look at it hard enough, you can tell that someone
279 hastily painted over an existing sign and changed the \"M\" to an \"H\".
281 #:read-text " All it says is \"Hotel Bricabrac\" in smudged, hasty text."
285 "hotel bricabrac sign"
289 <summoning-bell> 'lobby
290 #:name "a shiny brass bell"
291 #:goes-by '("shiny brass bell" "shiny bell" "brass bell" "bell")
292 #:desc " A shiny brass bell. Inscribed on its wooden base is the text
293 \"ring me for service\". You probably could \"ring the bell\" if you
295 #:summons 'break-room:desk-clerk)
298 <sign-in-form> 'lobby
299 #:name "sign-in form"
300 #:goes-by '("sign-in form" "form" "signin form")
301 #:desc '("It looks like you could sign this form and set your name like so: "
302 (i "sign form as <my-name-here>")))
304 ;; Object: curio cabinets
305 ;; TODO: respond to attempts to open the curio cabinet
308 #:proxy-items '(lobby:porcelain-doll
310 lobby:tea-set lobby:mustard-pot
311 lobby:head-of-elvis lobby:circuitboard-of-evlis
312 lobby:teletype-scroll lobby:orange-cat-phone)
313 #:name "a curio cabinet"
314 #:goes-by '("curio cabinet" "cabinet" "bricabrac cabinet"
315 "cabinet of curiosities")
317 (format #f " The curio cabinet is full of all sorts of oddities!
318 Something catches your eye!
319 Ooh, ~a!" (random-choice
320 '("a creepy porcelain doll"
321 "assorted 1950s robots"
322 "an exquisite tea set"
323 "an antique mustard pot"
324 "the pickled head of Elvis"
325 "the pickled circuitboard of EVLIS"
326 "a scroll of teletype paper holding the software Four Freedoms"
327 "a telephone shaped like an orange cartoon cat")))))
329 ('lobby:porcelain-doll
330 <cabinet-item> 'lobby
332 #:name "a creepy porcelain doll"
333 #:desc "It strikes you that while the doll is technically well crafted,
334 it's also the stuff of nightmares."
335 #:goes-by '("porcelain doll" "doll"))
337 <cabinet-item> 'lobby
339 #:name "a set of 1950s robots"
340 #:desc "There's a whole set of these 1950s style robots.
341 They seem to be stamped out of tin, and have various decorations of levers
342 and buttons and springs. Some of them have wind-up knobs on them."
343 #:goes-by '("robot" "robots" "1950s robot" "1950s robots"))
345 <cabinet-item> 'lobby
348 #:desc "A complete tea set. Some of the cups are chipped.
349 You can imagine yourself joining a tea party using this set, around a
350 nice table with some doilies, drinking some Earl Grey tea, hot. Mmmm."
351 #:goes-by '("tea set" "tea"))
353 <cabinet-item> 'lobby
355 #:name "cups from the tea set"
356 #:desc "They're chipped."
359 <cabinet-item> 'lobby
361 #:name "a mustard pot"
362 #:desc '((p "It's a mustard pot. I mean, it's kind of cool, it has a
363 nice design, and it's an antique, but you can't imagine putting something
364 like this in a museum.")
365 (p "Ha... imagine that... a mustard museum."))
366 #:goes-by '("mustard pot" "antique mustard pot" "mustard"))
367 ('lobby:head-of-elvis
368 <cabinet-item> 'lobby
370 #:name "the pickled head of Elvis"
371 #:desc '((p "It's a jar full of some briny-looking liquid and...
372 a free floating head. The head looks an awful lot like Elvis, and
373 definitely not the younger Elvis. The hair even somehow maintains
374 that signature swoop while suspended in liquid. But of course it's
376 (p "Oh, wait, it has a label at the bottom which says:
377 \"This is really the head of Elvis\". Well... maybe don't believe
378 everything you read."))
379 #:goes-by '("pickled head of elvis" "pickled head of Elvis"
380 "elvis" "Elvis" "head" "pickled head"))
381 ('lobby:circuitboard-of-evlis
382 <cabinet-item> 'lobby
384 #:name "the pickled circuitboard of Evlis"
385 #:desc '((p "It's a circuitboard from a Lisp Machine called EVLIS.
386 This is quite the find, and you bet just about anyone interested in
387 preserving computer history would love to get their hands on this.")
388 (p "Unfortunately, whatever moron did acquire this has
389 no idea what it means to preserve computers, so here it is floating
390 in some kind of briny liquid. It appears to be heavily corroded.
392 #:goes-by '("pickled circuitboard of evlis" "pickled circuitboard of Evlis"
393 "pickled circuitboard of EVLIS"
394 "evlis" "Evlis" "EVLIS" "circuitboard" "pickled circuitboard"))
395 ('lobby:teletype-scroll
396 <cabinet-item> 'lobby
398 #:name "a scroll of teletype"
399 #:desc '((p "This is a scroll of teletype paper. It's a bit old
400 and yellowed but the type is very legible. It says:")
403 (p (strong "== The four essential freedoms =="))
404 (p "A program is free software if the program's users have
405 the four essential freedoms: ")
406 (ul (li "The freedom to run the program as you wish, for any purpose (freedom 0).")
407 (li "The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.")
408 (li "The freedom to redistribute copies so you can help your neighbor (freedom 2).")
409 (li "The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.")))
410 (p "You get this feeling that ambiguities in the
411 English language surrounding the word 'free' have lead to a lot of terminology debates."))
412 #:goes-by '("scroll of teletype" "scroll of teletype paper" "teletype scroll"
413 "teletype paper" "scroll" "four freedoms"
414 "scroll of teletype paper holding the software Four Freedoms"
415 "scroll of teletype paper holding the software four freedoms"))
416 ('lobby:orange-cat-phone
417 <cabinet-item> 'lobby
419 #:name "a telephone shaped like an orange cartoon cat"
420 #:desc "It's made out of a cheap plastic, and it's very orange.
421 It resembles a striped tabby, and it's eyes hold the emotion of
422 a being both sleepy and smarmy.
423 You suspect that someone, somewhere made a ton of cash on items holding
424 this general shape in the 1990s."
425 #:goes-by '("orange cartoon cat phone" "orange cartoon cat telephone"
426 "orange cat phone" "orange cat telephone"
427 "cartoon cat phone" "cartoon cat"
428 "cat phone" "cat telephone" "phone" "telephone"))
429 ('lobby:monster-stuffie
431 #:name "an off-brand monster stuffie"
432 #:desc "It's an off brand monster stuffed animal that looks, well kinda
433 like a popular character you've seen in a video game, but there's been a very
434 thin attempt to make it look like something different... mostly by changing
435 the shape of the ears. It's cute though!"
437 #:goes-by '("monster stuffie" "monster" "stuffed animal" "stuffed monster"
438 "off-brand monster stuffie" "stuffie" "monster stuffie"))))
445 (define-actor <disc-shield> (<gameobj>)
446 ((cmd-take disc-shield-take)))
448 (define* (disc-shield-take gameobj message
450 (player (message-from message)))
451 (create-gameobj <glowing-disc> (gameobj-gm gameobj)
452 player) ;; set loc to player to put in player's inventory
454 #:text '((p "As you attempt to pull the shield / disk platter
455 from the statue a shining outline appears around it... and a
456 completely separate, glowing copy of the disc materializes into your
458 (<- (gameobj-loc gameobj) 'tell-room
459 #:text `(,(mbody-val (<-wait player 'get-name))
460 " pulls on the shield of the statue, and a glowing "
461 "copy of it materializes into their hands!")
463 (<- (gameobj-loc gameobj) 'tell-room
465 '(p "You hear a voice whisper: "
466 (i "\"Share the software... and you'll be free...\""))))
468 ;;; This is the disc that gets put in the player's inventory
469 (define-actor <glowing-disc> (<gameobj>)
470 ((cmd-drop glowing-disc-drop-cmd))
472 #:allocation #:each-subclass
473 #:init-thunk (build-props
474 '((hd-platter? . #t))))
475 (name #:allocation #:each-subclass
476 #:init-value "a glowing disc")
477 (desc #:allocation #:each-subclass
478 #:init-value "A brightly glowing disc. It's shaped like a hard
479 drive platter, not unlike the one from the statue it came from. It's
480 labeled \"RL02.5\".")
481 (goes-by #:init-value '("glowing disc" "glowing platter"
482 "glowing disc platter" "glowing disk platter"
483 "platter" "disc" "disk" "glowing shield")))
485 (define* (glowing-disc-drop-cmd gameobj message
487 (player (message-from message)))
489 #:text "You drop the glowing disc, and it shatters into a million pieces!")
490 (<- (mbody-val (<-wait player 'get-loc)) 'tell-room
491 #:text `(,(mbody-val (<-wait player 'get-name))
492 " drops a glowing disc, and it shatters into a million pieces!")
494 (gameobj-self-destruct gameobj))
499 (define lobby-map-text
509 .----------.----------. : & : .----------.----------.
510 | computer | |& :YOU ARE: &| smoking | *UNDER* |
511 | room + playroom + : HERE : + parlor | *CONS- |
512 | > | |& : : &| | TRUCTION*|
513 '----------'----------'-++-------++-'-------+--'----------'
519 (define grand-hallway
524 #:name "Grand Hallway"
525 #:desc '((p " A majestic red carpet runs down the center of the room.
526 Busts of serious looking people line the walls, but there's no
527 clear indication that they have any logical relation to this place.")
528 (p "In the center is a large statue of a woman in a warrior's
529 pose, but something is strange about her weapon and shield. You wonder what
531 (p "To the south is the lobby. A door to the east is labeled \"smoking
532 room\", while a door to the west is labeled \"playroom\"."))
545 #:to 'smoking-parlor)))
547 <readable> 'grand-hallway
548 #:name "the hotel map"
549 #:desc '("This appears to be a map of the hotel. "
550 "Like the hotel itself, it seems to be "
552 "You could read it if you want to.")
553 #:read-text `(pre ,lobby-map-text)
554 #:goes-by '("map" "hotel map"))
555 ('grand-hallway:carpet
556 <gameobj> 'grand-hallway
557 #:name "the Grand Hallway carpet"
558 #:desc "It's very red, except in the places where it's very worn."
560 #:goes-by '("red carpet" "carpet"))
561 ('grand-hallway:busts
562 <gameobj> 'grand-hallway
563 #:name "the busts of serious people"
564 #:desc "There are about 6 of them in total. They look distinguished
565 but there's no indication of who they are."
567 #:goes-by '("busts" "bust" "busts of serious people" "bust of serious person"))
568 ('grand-hallway:hackthena-statue
569 <proxy-items> 'grand-hallway
570 #:name "the statue of Hackthena"
571 #:desc '((p "The base of the statue says \"Hackthena, guardian of the hacker
572 spirit\". You've heard of Hackthena... not a goddess, but spiritual protector of
573 all good hacks, and legendary hacker herself.")
574 (p "Hackthena holds the form of a human woman. She wears flowing
575 robes, has a pair of curly bovine-esque horns protruding from the sides of her
576 head, wears a pair of horn-rimmed glasses, and appears posed as if for battle.
577 But instead of a weapon, she seems to hold some sort of keyboard. And her
578 shield... well it's round like a shield, but something seems off about it.
579 You'd better take a closer look to be sure."))
580 #:goes-by '("hackthena statue" "hackthena" "statue" "statue of hackthena")
581 #:proxy-items '(grand-hallway:keyboard
582 grand-hallway:disc-platter
583 grand-hallway:hackthena-horns))
584 ('grand-hallway:keyboard
585 <gameobj> 'grand-hallway
586 #:name "a Knight Keyboard"
587 #:desc "Whoa, this isn't just any old keyboard, this is a Knight Keyboard!
588 Any space cadet can see that with that kind of layout a hack-and-slayer could
589 thrash out some serious key-chords like there's no tomorrow. You guess
590 Hackthena must be an emacs user."
595 `("Are you kidding? Do you know how hard it is to find "
596 "a Knight Keyboard? There's no way she's going "
597 "to give that up.")))
598 #:goes-by '("knight keyboard" "keyboard"))
599 ('grand-hallway:hackthena-horns
600 <gameobj> 'grand-hallway
601 #:name "Hackthena's horns"
602 #:desc "They're not unlike a Gnu's horns."
607 `("Are you seriously considering desecrating a statue?")))
608 #:goes-by '("hackthena's horns" "horns" "horns of hacktena"))
609 ('grand-hallway:disc-platter
610 <disc-shield> 'grand-hallway
611 #:name "Hackthena's shield"
612 #:desc "No wonder the \"shield\" looks unusual... it seems to be a hard disk
613 platter! It has \"RL02.5\" written on it. It looks kind of loose."
615 #:goes-by '("hackthena's shield" "shield" "platter" "hard disk platter"))))
621 (define-actor <rgb-machine> (<gameobj>)
622 ((cmd-run rgb-machine-cmd-run)
623 (cmd-reset rgb-machine-cmd-reset))
625 #:allocation #:each-subclass
626 #:init-thunk (build-commands
627 (("run" "start") ((direct-command cmd-run)))
628 ("reset" ((direct-command cmd-reset)))))
629 (resetting #:init-value #f
630 #:accessor .resetting)
631 ;; used to reset, and to kick off the first item in the list
632 (rgb-items #:init-keyword #:rgb-items
633 #:accessor .rgb-items))
635 (define (rgb-machine-cmd-run rgb-machine message . _)
636 (define player (message-from message))
638 #:text '("You start the rube goldberg machine."))
639 (<-wait (gameobj-loc rgb-machine) 'tell-room
640 #:text `(,(mbody-val (<-wait player 'get-name))
641 " runs the rube goldberg machine.")
644 (match (.rgb-items rgb-machine)
645 ((first-item rest ...)
646 (<- (dyn-ref rgb-machine first-item) 'trigger))))
648 (define (rgb-machine-cmd-reset rgb-machine message . _)
649 (define player (message-from message))
651 ((not (.resetting rgb-machine))
652 (set! (.resetting rgb-machine) #t)
654 #:text '("You reset the rube goldberg machine."))
655 (<-wait (gameobj-loc rgb-machine) 'tell-room
656 #:text `(,(mbody-val (<-wait player 'get-name))
657 " resets the rube goldberg machine.")
659 (<-wait (gameobj-loc rgb-machine) 'tell-room
660 #:text '("From a panel in the wall, a white gloved mechanical "
661 "arm reaches out to reset all the "
662 "rube goldberg components."))
666 (<- (dyn-ref rgb-machine rgb-item) 'reset)
668 (.rgb-items rgb-machine))
669 (<- (gameobj-loc rgb-machine) 'tell-room
670 #:text "The machine's mechanical arm retreats into the wall!")
671 (set! (.resetting rgb-machine) #f))
674 #:text '("But it's in the middle of resetting right now!")))))
676 (define-actor <rgb-item> (<gameobj>)
677 ((trigger rgb-item-trigger)
678 (reset rgb-item-reset))
679 (invisible? #:init-value #t)
680 (steps #:init-keyword #:steps
682 (triggers-as #:init-value #f
683 #:init-keyword #:triggers-as
684 #:getter .triggers-as)
685 (reset-msg #:init-keyword #:reset-msg
687 ;; States: ready -> running -> ran
688 (state #:init-value 'ready
692 (define (rgb-item-trigger rgb-item message . _)
693 (define room (gameobj-loc rgb-item))
694 (case (.state rgb-item)
696 ;; Set state to running
697 (set! (.state rgb-item) 'running)
699 ;; Loop through all steps
703 ;; A string? That's the description of what's happening, tell players
705 (<- room 'tell-room #:text str))
706 ;; A number? Sleep for that many secs
709 ;; A symbol? That's another gameobj to look up dynamically
711 (<- (dyn-ref rgb-item sym) 'trigger
712 #:triggered-by (.triggers-as rgb-item)))
713 (_ (throw 'unknown-step-type
714 "Don't know how to process rube goldberg machine step type?"
718 ;; We're done! Set state to ran
719 (set! (.state rgb-item) 'ran))
723 #:text `("... but " ,(slot-ref rgb-item 'name)
724 " has already been triggered!")))))
726 (define (rgb-item-reset rgb-item message . _)
727 (define room (gameobj-loc rgb-item))
728 (case (.state rgb-item)
730 (set! (.state rgb-item) 'ready)
732 #:text (.reset-msg rgb-item)))
735 #:text `("... but " ,(slot-ref rgb-item 'name)
736 " is currently running!")))
739 #:text `("... but " ,(slot-ref rgb-item 'name)
740 " has already been reset.")))))
742 (define-actor <rgb-kettle> (<rgb-item>)
743 ((trigger rgb-kettle-trigger)
744 (reset rgb-kettle-reset))
745 (heated #:accessor .heated
747 (filled #:accessor .filled
750 (define* (rgb-kettle-trigger rgb-item message #:key triggered-by)
751 (define room (gameobj-loc rgb-item))
752 (if (not (eq? (.state rgb-item) 'ran))
756 (set! (.state rgb-item) 'running)
757 (set! (.filled rgb-item) #t))
759 (set! (.state rgb-item) 'running)
760 (set! (.heated rgb-item) #t)))
761 (when (and (.filled rgb-item)
764 #:text '((i "*kshhhhhh!*")
765 " The water has boiled!"))
767 (set! (.state rgb-item) 'ran)
768 ;; insert a cup of hot tea in the room
769 (create-gameobj <hot-tea> (gameobj-gm rgb-item) room)
771 #:text '("The machine pours out a cup of hot tea! "
772 "Looks like the machine finished!"))))
774 #:text `("... but " ,(slot-ref rgb-item 'name)
775 " has already been triggered!"))))
777 (define (rgb-kettle-reset rgb-item message . rest-args)
778 (define room (gameobj-loc rgb-item))
779 (when (eq? (.state rgb-item) 'ran)
780 (set! (.heated rgb-item) #f)
781 (set! (.filled rgb-item) #f))
782 (apply rgb-item-reset rgb-item message rest-args))
784 (define-actor <tinfoil-hat> (<gameobj>)
785 ((cmd-wear tinfoil-hat-wear))
787 #:allocation #:each-subclass
788 #:init-thunk (build-commands
789 ("wear" ((direct-command cmd-wear))))))
791 (define (tinfoil-hat-wear tinfoil-hat message . _)
792 (<- (message-from message) 'tell
793 #:text '("You put on the tinfoil hat, and, to be perfectly honest with you "
794 "it's a lot harder to take you seriously.")))
797 (define-actor <hot-tea> (<gameobj>)
798 ((cmd-drink hot-tea-cmd-drink)
799 (cmd-sip hot-tea-cmd-sip))
801 #:allocation #:each-subclass
802 #:init-thunk (build-commands
803 ("drink" ((direct-command cmd-drink)))
804 ("sip" ((direct-command cmd-sip)))))
806 (sips-left #:init-value 4
807 #:accessor .sips-left)
808 (name #:init-value "a cup of hot tea")
809 (take-me? #:init-value #t)
810 (goes-by #:init-value '("cup of hot tea" "cup of tea" "tea" "cup"))
811 (desc #:init-value "It's a steaming cup of hot tea. It looks pretty good!"))
813 (define (hot-tea-cmd-drink hot-tea message . _)
814 (define player (message-from message))
815 (define player-loc (mbody-val (<-wait player 'get-loc)))
816 (define player-name (mbody-val (<-wait player 'get-name)))
818 #:text "You drink a steaming cup of hot tea all at once... hot hot hot!")
819 (<- player-loc 'tell-room
820 #:text `(,player-name
821 " drinks a steaming cup of hot tea all at once.")
823 (gameobj-self-destruct hot-tea))
825 (define (hot-tea-cmd-sip hot-tea message . _)
826 (define player (message-from message))
827 (define player-loc (mbody-val (<-wait player 'get-loc)))
828 (define player-name (mbody-val (<-wait player 'get-name)))
829 (set! (.sips-left hot-tea) (- (.sips-left hot-tea) 1))
831 #:text "You take a sip of your steaming hot tea. How refined!")
832 (<- player-loc 'tell-room
833 #:text `(,player-name
834 " takes a sip of their steaming hot tea. How refined!")
836 (when (= (.sips-left hot-tea) 0)
838 #:text "You've finished your tea!")
839 (<- player-loc 'tell-room
840 #:text `(,player-name
841 " finishes their tea!")
843 (gameobj-self-destruct hot-tea)))
845 (define-actor <fanny-pack> (<container>)
846 ((cmd-take-from-while-wearing cmd-take-from)
847 (cmd-put-in-while-wearing cmd-put-in))
849 #:allocation #:each-subclass
852 (("l" "look") ((direct-command cmd-look-at)))
853 ("take" ((prep-indir-command cmd-take-from-while-wearing
854 '("from" "out of"))))
855 ("put" ((prep-indir-command cmd-put-in-while-wearing
856 '("in" "inside" "into" "on")))))))
862 #:name "The Playroom"
863 #:desc '(p (" There are toys scattered everywhere here. It's really unclear
864 if this room is intended for children or child-like adults.")
865 (" There are doors to both the east and the west."))
872 #:to 'computer-room)))
877 #:desc " It's a little foam cube with googly eyes on it. So cute!")
878 ('playroom:cuddles-plushie
880 #:name "a Cuddles plushie"
881 #:goes-by '("plushie" "cuddles plushie" "cuddles")
883 #:desc " A warm and fuzzy cuddles plushie! It's a cuddlefish!")
886 <container> 'playroom
888 #:goes-by '("toy chest" "chest")
889 #:desc (lambda (toy-chest whos-looking)
890 (let ((contents (gameobj-occupants toy-chest)))
891 `((p "A brightly painted wooden chest. The word \"TOYS\" is "
894 ,(if (eq? contents '())
895 " nothing! It's empty!"
896 `(ul ,(map (lambda (occupant)
898 (<-wait occupant 'get-name))))
899 (gameobj-occupants toy-chest))))))))
903 ;; Things inside the toy chest
904 ('playroom:toy-chest:rubber-duck
905 <gameobj> 'playroom:toy-chest
906 #:name "a rubber duck"
907 #:goes-by '("rubber duck" "duck")
909 #:desc "It's a yellow rubber duck with a bright orange beak.")
911 ('playroom:toy-chest:tinfoil-hat
912 <tinfoil-hat> 'playroom:toy-chest
913 #:name "a tinfoil hat"
914 #:goes-by '("tinfoil hat" "hat")
916 #:desc "You'd have to be a crazy person to wear this thing!")
918 ('playroom:toy-chest:fanny-pack
919 <fanny-pack> 'playroom:toy-chest
920 #:name "a fanny pack"
921 #:goes-by '("fanny pack" "pack")
924 (lambda (toy-chest whos-looking)
925 (let ((contents (gameobj-occupants toy-chest)))
926 `((p "It's a leather fanny pack, so it's both tacky and kinda cool.")
928 ,(if (eq? contents '())
929 " nothing! It's empty!"
930 `(ul ,(map (lambda (occupant)
932 (<-wait occupant 'get-name))))
933 (gameobj-occupants toy-chest)))))))))
935 ;; Things inside the toy chest
936 ('playroom:toy-chest:fanny-pack:plastic-elephant
937 <gameobj> 'playroom:toy-chest:fanny-pack
938 #:name "a plastic elephant"
939 #:goes-by '("plastic elephant" "elephant")
941 #:desc "It's a tiny little plastic elephant. Small, but heartwarming.")
943 ('playroom:rgb-machine
944 <rgb-machine> 'playroom
945 #:name "a Rube Goldberg machine"
946 #:goes-by '("rube goldberg machine" "machine")
947 #:rgb-items '(playroom:rgb-dominoes
948 playroom:rgb-switch-match
950 playroom:rgb-catapult
951 playroom:rgb-water-demon
952 playroom:rgb-quik-heater
954 #:desc "It's one of those hilarious Rube Goldberg machines.
955 What could happen if you started it?")
958 ('playroom:rgb-dominoes
960 #:name "some dominoes"
961 #:goes-by '("dominoes" "some dominoes")
962 #:steps `("The dominoes topple down the line..."
964 "The last domino lands on a switch!"
966 playroom:rgb-switch-match)
967 #:reset-msg "The dominoes are placed back into position.")
969 ;; Which hit the switch and strike a match
970 ('playroom:rgb-switch-match
973 #:goes-by '("switch" "match")
974 #:steps `("The switch lights a match!"
976 "The match lights a candle!"
979 #:reset-msg "A fresh match is installed and the switch is reset.")
980 ;; which lights a candle and burns a rope
981 ('playroom:rgb-candle
984 #:goes-by '("candle")
985 #:steps `("The candle burns..."
987 "The candle is burning away a rope!"
991 playroom:rgb-catapult)
992 #:reset-msg "A fresh candle is installed.")
993 ;; which catapults a rock
994 ('playroom:rgb-catapult
997 #:goes-by '("catapult")
998 #:steps `("The snapped rope unleashes a catapult, which throws a rock!"
1000 "The rock flies through a water demon, startling it!"
1002 playroom:rgb-water-demon
1004 "The rock whacks into the quik-heater's on button!"
1006 playroom:rgb-quik-heater)
1008 '("A fresh rope is attached to the catapult, which is pulled taught. "
1009 "A fresh rock is placed on the catapult."))
1011 ;; '- panics the water demon
1012 ;; '- which waters the kettle
1013 ('playroom:rgb-water-demon
1014 <rgb-item> 'playroom
1015 #:name "the water demon"
1016 #:triggers-as 'water-demon
1017 #:goes-by '("water demon" "demon")
1018 #:steps `("The water demon panics, and starts leaking water into the kettle below!"
1020 "The kettle is filled!"
1021 playroom:rgb-kettle)
1022 #:reset-msg '("The water demon is scratched behind the ears and calms down."))
1023 ;; '- bops the quik-heater button
1024 ;; '- which heats the kettle
1025 ('playroom:rgb-quik-heater
1026 <rgb-item> 'playroom
1027 #:name "the quik heater"
1028 #:triggers-as 'quik-heater
1029 #:goes-by '("quik heater" "heater")
1030 #:steps `("The quik-heater heats up the kettle above it!"
1032 "The kettle is heated up!"
1033 playroom:rgb-kettle)
1034 #:reset-msg '("The quik heater is turned off."))
1035 ;; Finally, the kettle
1036 ('playroom:rgb-kettle
1037 <rgb-kettle> 'playroom
1039 #:goes-by '("kettle")
1040 #:reset-msg '("The kettle is emptied."))))
1051 ;; ... full of NURPH weapons?
1057 (define-class <furniture> (<gameobj>)
1058 (sit-phrase #:init-keyword #:sit-phrase)
1059 (sit-phrase-third-person #:init-keyword #:sit-phrase-third-person)
1060 (sit-name #:init-keyword #:sit-name)
1063 #:allocation #:each-subclass
1064 #:init-thunk (build-commands
1065 ("sit" ((direct-command cmd-sit-furniture)))))
1066 (actions #:allocation #:each-subclass
1067 #:init-thunk (build-actions
1068 (cmd-sit-furniture furniture-cmd-sit))))
1070 (define* (furniture-cmd-sit actor message #:key direct-obj)
1072 (mbody-val (<-wait (message-from message) 'get-name)))
1073 (<- (message-from message) 'tell
1074 #:text (format #f "You ~a ~a.\n"
1075 (slot-ref actor 'sit-phrase)
1076 (slot-ref actor 'sit-name)))
1077 (<- (slot-ref actor 'loc) 'tell-room
1078 #:text (format #f "~a ~a on ~a.\n"
1080 (slot-ref actor 'sit-phrase-third-person)
1081 (slot-ref actor 'sit-name))
1082 #:exclude (message-from message)))
1085 (define smoking-parlor
1089 #:name "Smoking Parlor"
1091 '((p "This room looks quite posh. There are huge comfy seats you can sit in
1092 if you like. Strangely, you see a large sign saying \"No Smoking\". The owners must
1093 have installed this place and then changed their mind later.")
1094 (p "There's a door to the west leading back to the grand hallway, and
1095 a nondescript steel door to the south, leading apparently outside."))
1099 #:to 'grand-hallway)
1103 ('smoking-parlor:chair
1104 <furniture> 'smoking-parlor
1105 #:name "a comfy leather chair"
1106 #:desc " That leather chair looks really comfy!"
1107 #:goes-by '("leather chair" "comfy leather chair" "chair" "comfy chair")
1108 #:sit-phrase "sink into"
1109 #:sit-phrase-third-person "sinks into"
1110 #:sit-name "the comfy leather chair")
1111 ('smoking-parlor:sofa
1112 <furniture> 'smoking-parlor
1113 #:name "a plush leather sofa"
1114 #:desc " That leather chair looks really comfy!"
1115 #:goes-by '("leather sofa" "plush leather sofa" "sofa"
1116 "leather couch" "plush leather couch" "couch")
1117 #:sit-phrase "sprawl out on"
1118 #:sit-phrase-third-person "sprawls out on into"
1119 #:sit-name "the plush leather couch")
1120 ('smoking-parlor:bar-stool
1121 <furniture> 'smoking-parlor
1122 #:name "a bar stool"
1123 #:desc " Conveniently located near the bar! Not the most comfortable
1124 seat in the room, though."
1125 #:goes-by '("stool" "bar stool" "seat")
1126 #:sit-phrase "hop on"
1127 #:sit-phrase-third-person "hops onto"
1128 #:sit-name "the bar stool")
1130 <chatty-npc> 'smoking-parlor
1131 #:name "Ford Prefect"
1132 #:desc "Just some guy, you know?"
1133 #:goes-by '("Ford Prefect" "ford prefect"
1134 "frood" "prefect" "ford")
1135 #:catchphrases prefect-quotes)
1137 ('smoking-parlor:no-smoking-sign
1138 <readable> 'smoking-parlor
1140 #:name "No Smoking Sign"
1141 #:desc "This sign says \"No Smoking\" in big, red letters.
1142 It has some bits of bubble gum stuck to it... yuck."
1143 #:goes-by '("no smoking sign" "sign")
1144 #:read-text "It says \"No Smoking\", just like you'd expect from
1145 a No Smoking sign.")
1146 ;; TODO: Cigar dispenser
1154 (define-class <desk-clerk> (<gameobj>)
1155 ;; The desk clerk has three states:
1156 ;; - on-duty: Arrived, and waiting for instructions (and losing patience
1158 ;; - slacking: In the break room, probably smoking a cigarette
1159 ;; or checking text messages
1160 (state #:init-value 'slacking)
1161 (commands #:allocation #:each-subclass
1164 (("talk" "chat") ((direct-command cmd-chat)))
1165 ("ask" ((direct-command cmd-ask-incomplete)
1166 (prep-direct-command cmd-ask-about)))
1167 ("dismiss" ((direct-command cmd-dismiss)))))
1168 (patience #:init-value 0)
1169 (actions #:allocation #:each-subclass
1170 #:init-thunk (build-actions
1171 (init clerk-act-init)
1172 (cmd-chat clerk-cmd-chat)
1173 (cmd-ask-incomplete clerk-cmd-ask-incomplete)
1174 (cmd-ask-about clerk-cmd-ask)
1175 (cmd-dismiss clerk-cmd-dismiss)
1176 (update-loop clerk-act-update-loop)
1177 (be-summoned clerk-act-be-summoned))))
1179 (define (clerk-act-init clerk message . _)
1180 ;; call the gameobj main init method
1181 (gameobj-act-init clerk message)
1182 ;; start our main loop
1183 (<- (actor-id clerk) 'update-loop))
1185 (define changing-name-text "Changing your name is easy!
1186 We have a clipboard here at the desk
1187 where you can make yourself known to other participants in the hotel
1188 if you sign it. Try 'sign form as <your-name>', replacing
1189 <your-name>, obviously!")
1192 "Ah... when I'm not here, I've got a PHD to finish.")
1194 (define clerk-help-topics
1195 `(("changing name" . ,changing-name-text)
1196 ("sign-in form" . ,changing-name-text)
1197 ("form" . ,changing-name-text)
1198 ("common commands" .
1199 "Here are some useful commands you might like to try: chat,
1200 go, take, drop, say...")
1202 "We hope you enjoy your stay at Hotel Bricabrac. As you may see,
1203 our hotel emphasizes interesting experiences over rest and lodging.
1204 The origins of the hotel are... unclear... and it has recently come
1205 under new... 'management'. But at Hotel Bricabrac we believe these
1206 aspects make the hotel into a fun and unique experience! Please,
1207 feel free to walk around and explore.")
1208 ("physics paper" . ,phd-text)
1209 ("paper" . ,phd-text)
1210 ("proprietor" . "Oh, he's that frumpy looking fellow sitting over there.")))
1213 (define clerk-knows-about
1214 "'ask clerk about changing name', 'ask clerk about common commands', and 'ask clerk about the hotel'")
1216 (define clerk-general-helpful-line
1218 "The clerk says, \"If you need help with anything, feel free to ask me about it.
1219 For example, 'ask clerk about changing name'. You can ask me about the following:
1220 " clerk-knows-about ".\"\n"))
1222 (define clerk-slacking-complaints
1223 '("The pay here is absolutely lousy."
1224 "The owner here has no idea what they're doing."
1225 "Some times you just gotta step away, you know?"
1226 "You as exhausted as I am?"
1227 "Yeah well, this is just temporary. I'm studying to be a high
1228 energy particle physicist. But ya gotta pay the bills, especially
1229 with tuition at where it is..."))
1231 (define* (clerk-cmd-chat clerk message #:key direct-obj)
1232 (match (slot-ref clerk 'state)
1234 (<- (message-from message) 'tell
1235 #:text clerk-general-helpful-line))
1237 (<- (message-from message) 'tell
1240 "The clerk says, \""
1241 (random-choice clerk-slacking-complaints)
1244 (define (clerk-cmd-ask-incomplete clerk message . _)
1245 (<- (message-from message) 'tell
1246 #:text "The clerk says, \"Ask about what?\"\n"))
1248 (define clerk-doesnt-know-text
1249 "The clerk apologizes and says she doesn't know about that topic.\n")
1251 (define* (clerk-cmd-ask clerk message #:key indir-obj
1253 (match (slot-ref clerk 'state)
1255 (match (assoc indir-obj clerk-help-topics)
1257 (<- (message-from message) 'tell
1259 (string-append "The clerk clears her throat and says:\n \""
1263 (<- (message-from message) 'tell
1264 #:text clerk-doesnt-know-text))))
1266 (<- (message-from message) 'tell
1267 #:text "The clerk says, \"Sorry, I'm on my break.\"\n"))))
1269 (define* (clerk-act-be-summoned clerk message #:key who-summoned)
1270 (match (slot-ref clerk 'state)
1272 (<- who-summoned 'tell
1274 "The clerk tells you as politely as she can that she's already here,
1275 so there's no need to ring the bell.\n"))
1277 (<- (gameobj-loc clerk) 'tell-room
1279 "The clerk's ears perk up, she stamps out a cigarette, and she
1280 runs out of the room!\n")
1281 (gameobj-set-loc! clerk (dyn-ref clerk 'lobby))
1282 (slot-set! clerk 'patience 8)
1283 (slot-set! clerk 'state 'on-duty)
1284 (<- (gameobj-loc clerk) 'tell-room
1287 " Suddenly, a uniformed woman rushes into the room! She's wearing a
1288 badge that says \"Desk Clerk\".
1289 \"Hello, yes,\" she says between breaths, \"welcome to Hotel Bricabrac!
1290 We look forward to your stay. If you'd like help getting acclimated,
1291 feel free to ask me. For example, 'ask clerk about changing name'.
1292 You can ask me about the following:
1293 " clerk-knows-about ".\"\n")))))
1295 (define* (clerk-cmd-dismiss clerk message . _)
1297 (mbody-val (<-wait (message-from message) 'get-name)))
1298 (match (slot-ref clerk 'state)
1300 (<- (gameobj-loc clerk) 'tell-room
1302 (format #f "\"Thanks ~a!\" says the clerk. \"I have somewhere I need to be.\"
1303 The clerk leaves the room in a hurry.\n"
1305 #:exclude (actor-id clerk))
1306 (gameobj-set-loc! clerk (dyn-ref clerk 'break-room))
1307 (slot-set! clerk 'state 'slacking)
1308 (<- (gameobj-loc clerk) 'tell-room
1309 #:text clerk-return-to-slacking-text
1310 #:exclude (actor-id clerk)))
1312 (<- (message-from message) 'tell
1313 #:text "The clerk sternly asks you to not be so dismissive.\n"))))
1315 (define clerk-slacking-texts
1316 '("The clerk takes a long drag on her cigarette.\n"
1317 "The clerk scrolls through text messages on her phone.\n"
1318 "The clerk coughs a few times.\n"
1319 "The clerk checks her watch and justifies a few more minutes outside.\n"
1320 "The clerk fumbles around for a lighter.\n"
1321 "The clerk sighs deeply and exhaustedly.\n"
1322 "The clerk fumbles around for a cigarette.\n"))
1324 (define clerk-working-impatience-texts
1325 '("The clerk hums something, but you're not sure what it is."
1326 "The clerk attempts to change the overhead music, but the dial seems broken."
1327 "The clerk clicks around on the desk computer."
1328 "The clerk scribbles an equation on a memo pad, then crosses it out."
1329 "The clerk mutters something about the proprietor having no idea how to run a hotel."
1330 "The clerk thumbs through a printout of some physics paper."))
1332 (define clerk-slack-excuse-text
1333 "The desk clerk excuses herself, but says you are welcome to ring the bell
1334 if you need further help.")
1336 (define clerk-return-to-slacking-text
1337 "The desk clerk enters and slams the door behind her.\n")
1340 (define (clerk-act-update-loop clerk message)
1341 (define (tell-room text)
1342 (<- (gameobj-loc clerk) 'tell-room
1344 #:exclude (actor-id clerk)))
1345 (define (loop-if-not-destructed)
1346 (if (not (slot-ref clerk 'destructed))
1347 ;; This iterates by "recursing" on itself by calling itself
1348 ;; (as the message handler) again. It used to be that we had to do
1349 ;; this, because there was a bug where a loop which yielded like this
1350 ;; would keep growing the stack due to some parameter goofiness.
1351 ;; That's no longer true, but there's an added advantage to this
1352 ;; route: it's much more live hackable. If we change the definition
1353 ;; of this method, the character will act differently on the next
1354 ;; "tick" of the loop.
1355 (<- (actor-id clerk) 'update-loop)))
1356 (match (slot-ref clerk 'state)
1358 (tell-room (random-choice clerk-slacking-texts))
1359 (8sleep (+ (random 20) 15))
1360 (loop-if-not-destructed))
1362 (if (> (slot-ref clerk 'patience) 0)
1363 ;; Keep working but lose patience gradually
1365 (tell-room (random-choice clerk-working-impatience-texts))
1366 (slot-set! clerk 'patience (- (slot-ref clerk 'patience)
1368 (8sleep (+ (random 60) 40))
1369 (loop-if-not-destructed))
1372 (tell-room clerk-slack-excuse-text)
1373 ;; back bto the break room
1374 (gameobj-set-loc! clerk (dyn-ref clerk 'break-room))
1375 (tell-room clerk-return-to-slacking-text)
1376 ;; annnnnd back to slacking
1377 (slot-set! clerk 'state 'slacking)
1378 (8sleep (+ (random 30) 15))
1379 (loop-if-not-destructed))))))
1386 #:name "Employee Break Room"
1387 #:desc " This is less a room and more of an outdoor wire cage. You get
1388 a bit of a view of the brick exterior of the building, and a crisp wind blows,
1389 whistling, through the openings of the fenced area. Partly smoked cigarettes
1390 and various other debris cover the floor.
1391 Through the wires you can see... well... hm. It looks oddly like
1392 the scenery tapers off nothingness. But that can't be right, can it?"
1396 #:to 'smoking-parlor)))
1397 ('break-room:desk-clerk
1398 <desk-clerk> 'break-room
1399 #:name "the hotel desk clerk"
1400 #:desc " The hotel clerk is wearing a neatly pressed uniform bearing the
1401 hotel insignia. She appears to be rather exhausted."
1402 #:goes-by '("hotel desk clerk" "clerk" "desk clerk"))
1404 <gameobj> 'break-room
1407 #:desc "As you stare into the void, the void stares back into you."
1408 #:goes-by '("void" "abyss" "nothingness" "scenery"))
1410 <gameobj> 'break-room
1412 #:name "break room cage"
1413 #:desc "It's a mostly-cubical wire mesh surrounding the break area.
1414 You can see through the gaps, but they're too small to put more than a
1415 couple of fingers through. There appears to be some wear and tear to
1416 the paint, but the wires themselves seem to be unusually sturdy."
1417 #:goes-by '("fence" "cage" "wire cage"))))
1421 ;;; Ennpie's Sea Lounge
1422 ;;; -------------------
1428 ;; Our computer and hard drive are based off the PDP-11 and the RL01 /
1429 ;; RL02 disk drives. However we increment both by .5 (a true heresy)
1430 ;; to distinguish both from the real thing.
1432 (define-actor <hard-drive> (<gameobj>)
1433 ((cmd-put-in hard-drive-insert)
1434 (cmd-push-button hard-drive-push-button)
1435 (get-state hard-drive-act-get-state))
1436 (commands #:allocation #:each-subclass
1437 #:init-thunk (build-commands
1438 ("insert" ((prep-indir-command cmd-put-in
1439 '("in" "inside" "into"))))
1440 (("press" "push") ((prep-indir-command cmd-push-button)))))
1441 ;; the state moves from: empty -> with-disc -> loading -> ready
1442 (state #:init-value 'empty
1445 (define (hard-drive-act-get-state hard-drive message)
1446 (<-reply message (.state hard-drive)))
1448 (define* (hard-drive-desc hard-drive #:optional whos-looking)
1449 `((p "The hard drive is labeled \"RL02.5\". It's a little under a meter tall.")
1450 (p "There is a slot where a disk platter could be inserted, "
1451 ,(if (eq? (.state hard-drive) 'empty)
1452 "which is currently empty"
1453 "which contains a glowing platter")
1454 ". There is a LOAD button "
1455 ,(if (member (.state hard-drive) '(empty with-disc))
1457 "which is pressed in and unlit")
1458 ". There is a READY indicator "
1459 ,(if (eq? (.state hard-drive) 'ready)
1462 ,(if (member (.state hard-drive) '(loading ready))
1463 " The machine emits a gentle whirring noise."
1466 (define* (hard-drive-push-button gameobj message
1467 #:key direct-obj indir-obj preposition
1468 (player (message-from message)))
1469 (define (tell-room text)
1470 (<-wait (gameobj-loc gameobj) 'tell-room
1472 (define (tell-room-excluding-player text)
1473 (<-wait (gameobj-loc gameobj) 'tell-room
1477 ((ci-member direct-obj '("button" "load button" "load"))
1478 (tell-room-excluding-player
1479 `(,(mbody-val (<-wait player 'get-name))
1480 " presses the button on the hard disk."))
1482 #:text "You press the button on the hard disk.")
1484 (case (.state gameobj)
1486 ;; I have no idea what this drive did when you didn't have a platter
1487 ;; in it and pressed load, but I know there was a FAULT button.
1488 (tell-room "You hear some movement inside the hard drive...")
1491 '("... but then the FAULT button blinks a couple times. "
1492 "What could be missing?")))
1494 (set! (.state gameobj) 'loading)
1495 (tell-room "The hard disk begins to spin up!")
1497 (set! (.state gameobj) 'ready)
1498 (tell-room "The READY light turns on!"))
1501 #:text '("Pressing the button does nothing right now, "
1502 "but it does feel satisfying.")))))
1505 #:text '("How could you think of pressing anything else "
1506 "but that tantalizing button right in front of you?")))))
1508 (define* (hard-drive-insert gameobj message
1509 #:key direct-obj indir-obj preposition
1510 (player (message-from message)))
1511 (define our-name (slot-ref gameobj 'name))
1515 (for-each (lambda (occupant)
1516 (define goes-by (mbody-val (<-wait occupant 'goes-by)))
1517 (when (ci-member direct-obj goes-by)
1519 (mbody-val (<-wait player 'get-occupants)))
1525 #:text `("You don't seem to have any such " ,direct-obj " to put "
1526 ,preposition " " ,our-name ".")))
1527 ((not (mbody-val (<-wait this-thing 'get-prop 'hd-platter?)))
1529 #:text `("It wouldn't make sense to put "
1530 ,(mbody-val (<-wait this-thing 'get-name))
1531 " " ,preposition " " ,our-name ".")))
1532 ((not (eq? (.state gameobj) 'empty))
1534 #:text "The disk drive already has a platter in it."))
1536 (set! (.state gameobj) 'with-disc)
1538 #:text '((p "You insert the glowing disc into the drive.")
1539 (p "The LOAD button begins to glow."))))))
1542 (define-actor <computer> (<gameobj>)
1543 ((cmd-run-program computer-run-program)
1544 (cmd-run-what (lambda (gameobj message . _)
1545 (<- (message-from message) 'tell
1546 #:text '("The computer is already running, and a program appears "
1548 "you mean to \"run the program on the computer\""))))
1549 (cmd-help-run-not-press
1550 (lambda (gameobj message . _)
1551 (<- (message-from message) 'tell
1552 #:text '("You don't need to press / push / flip anything. "
1553 "You could " (i "run program on computer")
1554 " already if you wanted to.")))))
1555 (commands #:allocation #:each-subclass
1556 #:init-thunk (build-commands
1557 ("run" ((prep-indir-command cmd-run-program
1559 (direct-command cmd-run-what)))
1560 (("press" "push" "flip")
1561 ((prep-indir-command cmd-help-run-not-press))))))
1563 (define* (computer-run-program gameobj message
1564 #:key direct-obj indir-obj preposition
1565 (player (message-from message)))
1567 (mbody-val (<-wait (dyn-ref gameobj 'computer-room:hard-drive) 'get-state)))
1568 (define (tell-room text)
1569 (<-wait (gameobj-loc gameobj) 'tell-room
1571 (define (tell-room-excluding-player text)
1572 (<-wait (gameobj-loc gameobj) 'tell-room
1575 (define (tell-player text)
1576 (<-wait player 'tell
1579 ((ci-member direct-obj '("program"))
1580 (tell-room-excluding-player
1581 `(,(mbody-val (<-wait player 'get-name))
1582 " runs the program loaded on the computer..."))
1583 (tell-player "You run the program on the computer...")
1586 ((not (eq? (hd-state) 'ready))
1587 (tell-room '("... but it errors out. "
1588 "It seems to be complaining about a " (b "DISK ERROR!")
1589 ". It looks like it is missing some essential software.")))
1591 (<- (dyn-ref gameobj 'computer-room:floor-panel) 'open-up))))))
1595 (define-actor <floor-panel> (<gameobj>)
1596 ;; TODO: Add "open" verb, since obviously people will try that
1597 ((open? (lambda (panel message)
1598 (<-reply message (slot-ref panel 'open))))
1599 (open-up floor-panel-open-up))
1600 (open #:init-value #f))
1602 (define (floor-panel-open-up panel message)
1603 (if (slot-ref panel 'open)
1604 (<- (gameobj-loc panel) 'tell-room
1605 #:text '("You hear some gears grind around the hinges of the "
1606 "floor panel, but it appears to already be open."))
1608 (slot-set! panel 'open #t)
1609 (<- (gameobj-loc panel) 'tell-room
1610 #:text '("You hear some gears grind, as the metal panel on "
1611 "the ground opens and reveals a stairwell going down!")))))
1613 (define* (floor-panel-desc panel #:optional whos-looking)
1614 `("It's a large metal panel on the floor in the middle of the room. "
1615 ,(if (slot-ref panel 'open)
1616 '("It's currently wide open, revealing a spiraling staircase "
1617 "which descends into darkness.")
1618 '("It's currently closed shut, but there are clearly hinges, and "
1619 "it seems like there is a mechanism which probably opens it via "
1620 "some automation. What could be down there?"))))
1622 (define computer-room
1626 #:name "Computer Room"
1627 #:desc (lambda (gameobj whos-looking)
1629 (mbody-val (<-wait (dyn-ref gameobj 'computer-room:floor-panel)
1631 `((p "A sizable computer cabinet covers a good portion of the left
1632 wall. It emits a pleasant hum which covers the room like a warm blanket.
1633 Connected to a computer is a large hard drive.")
1634 (p "On the floor is a large steel panel. "
1636 '("It is wide open, exposing a spiral staircase "
1637 "which descends into darkness.")
1638 '("It is closed, but it has hinges which "
1639 "suggest it could be opened.")))))
1646 #:to 'underground-lab
1648 (lambda (exit room whos-exiting)
1650 (mbody-val (<-wait (dyn-ref room 'computer-room:floor-panel)
1653 (values #t "You descend the spiral staircase.")
1654 (values #f '("You'd love to go down, but the only way "
1655 "through is through that metal panel, "
1656 "which seems closed.")))))))
1657 ('computer-room:hard-drive
1658 <hard-drive> 'computer-room
1659 #:name "the hard drive"
1660 #:desc (wrap-apply hard-drive-desc)
1661 #:goes-by '("hard drive" "drive" "hard disk"))
1662 ('computer-room:computer
1663 <computer> 'computer-room
1664 #:name "the computer"
1665 #:desc '((p "It's a coat closet sized computer labeled \"PDP-11.5\". ")
1666 (p "The computer is itself turned on, and it looks like it is "
1667 "all set up for you to run a program on it."))
1668 #:goes-by '("computer"))
1669 ('computer-room:floor-panel
1670 <floor-panel> 'computer-room
1671 #:name "a floor panel"
1672 #:desc (wrap-apply floor-panel-desc)
1674 #:goes-by '("floor panel" "panel"))))
1677 ;;; * UNDERGROUND SECTION OF THE GAME! *
1682 (define underground-map-text
1687 | [8sync Hive] |======' '-_____
1693 .--------------. \\ /
1694 | [Guile Async | .-------+------.
1695 | Museum] | | [Lab] #!#| .-------------.
1696 | @| | MM | |[Federation |
1697 | & ^ +##+@ || < +##| Station]|
1699 | & # | |*You-Are-Here*| '-------------'
1700 | # ^ | #+-------+------'
1701 '-------+------' # #
1705 |@?+%? +#### | ^ f## |
1711 (define 8sync-design-goals
1712 '(ul (li (b "Actor based, shared nothing environment: ")
1713 "Shared resources are hard to control and result in fighting
1714 deadlocks, etc. Escape the drudgery: only one actor controls a resource,
1715 and they only receive one message at a time (though they can \"juggle\"
1717 (li (b "Live hackable: ")
1718 "It's hard to plan out a concurrent system; the right structure
1719 is often found by evolving the system while it runs. Make it easy to
1720 build, shape, and change a running system, as well as observe and correct
1722 (li (b "No callback hell: ")
1723 "Just because you're calling out to some other asynchronous
1724 code doesn't mean you should need to chop up your program into a bunch of bits.
1725 Clever use of delimited continuations makes it easy.")))
1727 (define underground-lab
1731 #:name "Underground laboratory"
1732 #:desc '((p "This appears to be some sort of underground laboratory."
1733 "There is a spiral staircase here leading upwards, where "
1734 "it seems much brighter.")
1735 (p "There are a number of doors leading in different directions:
1736 north, south, east, and west, as well as a revolving door to the southwest.
1737 It looks like it could be easy to get lost, but luckily there
1738 is a map detailing the layout of the underground structure."))
1744 (lambda (exit room whos-exiting)
1745 (values #t "You climb the spiral staircase.")))
1750 (lambda (exit room whos-exiting)
1751 (values #t '("You head west through a fancy-looking entrance. "
1752 "A security guard steps aside for you to pass through, "
1753 "into the room, then stands in front of the door."))))
1756 #:to 'hive-entrance)
1759 #:to 'federation-station)
1763 (lambda (exit room whos-exiting)
1764 (values #f '("Ooh, if only you could go south and check this out! "
1765 "Unfortunately this whole area is sealed off... the proprietor "
1766 "probably never got around to fixing it. "
1767 "Too bad, it would have had monsters to fight and everything!"))))
1771 (lambda (exit room whos-exiting)
1772 (values #f '("Hm, it's one of those revolving doors that only revolves in "
1773 "one direction, and it isn't this one. You guess that while "
1774 "this doesn't appear to be an entrance, it probably is an exit."))))))
1776 ('underground-lab:map
1777 <readable> 'underground-lab
1778 #:name "the underground map"
1779 #:desc '("This appears to be a map of the surrounding area. "
1780 "You could read it if you want to.")
1781 #:read-text `(pre ,underground-map-text)
1782 #:goes-by '("map" "underground map" "lab map"))
1784 ('underground-lab:8sync-sign
1785 <readable> 'underground-lab
1786 #:name "a sign labeled \"8sync design goals\""
1787 #:goes-by '("sign" "8sync design goals sign" "8sync goals" "8sync design" "8sync sign")
1788 #:read-text 8sync-design-goals
1789 #:desc `((p "The sign says:")
1790 ,8sync-design-goals))))
1793 ;;; guile async museum
1795 (define async-museum
1800 #:name "Guile Asynchronous Museum"
1801 #:desc '((p "You're in the Guile Asynchronous Museum. There is a list of exhibits
1802 on the wall near the entrance. Scattered around the room are the exhibits
1803 themselves, but it's difficult to pick them out. Maybe you should read the list
1804 to orient yourself.")
1805 (p "There is a door to the east, watched by a security guard,
1806 as well as an exit leading to the south."))
1813 #:to 'underground-lab
1815 (lambda (exit room whos-exiting)
1816 (values #f '("The security guard stops you and tells you "
1817 "that the only exit is through the gift shop."))))))
1819 'async-museum:security-guard
1820 <chatty-npc> 'async-museum
1821 #:name "a security guard"
1823 '(p "The security guard is blocking the eastern entrance, where "
1824 "you came in from.")
1825 #:goes-by '("security guard" "guard" "security")
1826 #:catchphrases '("It's hard standing here all day."
1827 "I just want to go home."
1828 "The exhibits are nice, but I've seen them all before."))
1830 `((p "Welcome to our humble museum! The exhibits are listed below. "
1832 "To look at one, simply type: " (i "look at <exhibit-name>"))
1833 (p "Available exhibits:")
1834 (ul ,@(map (lambda (exhibit)
1839 "The Actor Model"))))))
1841 'async-museum:list-of-exhibits
1842 <readable> 'async-museum
1843 #:name "list of exhibits"
1845 `((p "It's a list of exibits in the room. The placard says:")
1847 #:goes-by '("list of exhibits" "exhibit list" "list" "exhibits")
1848 #:read-text placard))
1850 'async-museum:2016-progress-exhibit
1851 <readable-desc> 'async-museum
1852 #:name "2016 Progress Exhibit"
1853 #:goes-by '("2016 progress exhibit" "2016 progress" "2016 exhibit")
1855 '((p "It's a three-piece exhibit, with three little dioramas and some text "
1856 "explaining what they represent. They are:")
1857 (ul (li (b "Late 2015/Early 2016 talk: ")
1858 "This one explains the run-up conversation from late 2015 "
1859 "and early 2016 about the need for an "
1860 "\"asynchronous event loop for Guile\". The diorama "
1861 "is a model of the Veggie Galaxy restaurant where after "
1862 "the FSF 30th anniversary party; Mark Weaver, Christine "
1863 "Lemmer-Webber, David Thompson, and Andrew Engelbrecht chat "
1864 "about the need for Guile to have an answer to asynchronous "
1865 "programming. A mailing list post " ; TODO: link it?
1866 "summarizing the discussion is released along with various "
1867 "conversations around what is needed, as well as further "
1868 "discussion at FOSDEM 2016.")
1869 (li (b "Early implementations: ")
1870 "This one shows Chris Webber's 8sync and Chris Vine's "
1871 "guile-a-sync, both appearing in late 2015 and evolving "
1872 "into their basic designs in early 2016. It's less a diorama "
1873 "than a printout of some mailing list posts. Come on, the "
1874 "curators could have done better with this one.")
1875 (li (b "Suspendable ports and Fibers: ")
1876 "The diorama shows Andy Wingo furiously hacking at his keyboard. "
1877 "The description talks about Wingo's mailing list thread "
1878 "about possibly breaking Guile compatibility for a \"ports refactor\". "
1879 "Wingo releases Fibers, another asynchronous library, making use of "
1880 "the new interface, and 8sync and guile-a-sync "
1881 "quickly move to support suspendable ports as well. "
1882 "The description also mentions that there is an exhibit entirely "
1883 "devoted to suspendable ports."))
1884 (p "Attached at the bottom is a post it note mentioning "
1885 "https integration landing in Guile 2.2.")))
1887 'async-museum:8sync-and-fibers-exhibit
1888 <readable-desc> 'async-museum
1889 #:name "8sync and Fibers Exhibit"
1890 #:goes-by '("8sync and fibers exhibit" "8sync exhibit" "fibers exhibit")
1892 '((p "This exhibit is a series of charts explaining the similarities "
1893 "and differences between 8sync and Fibers, two asynchronous programming "
1894 "libraries for GNU Guile. It's way too wordy, but you get the general gist.")
1895 (p (b "Similarities:")
1896 (ul (li "Both use Guile's suspendable-ports facility")
1897 (li "Both use message passing")))
1898 (p (b "Differences:")
1899 (ul (li "Fibers \"processes\" can read from multiple \"channels\", "
1900 "but 8sync actors only read from one \"inbox\" each.")
1901 (li "Different theoretical basis:"
1902 (ul (li "Fibers: based on CSP (Communicating Sequential Processes), "
1903 "a form of Process Calculi")
1904 (li "8sync: based on the Actor Model")
1905 (li "Luckily CSP and the Actor Model are \"dual\"!")))))
1906 (p "Fibers is also designed by Andy Wingo, an excellent compiler hacker, "
1907 "whereas 8sync is designed by Chris Webber, who built this crappy "
1908 "hotel simulator.")))
1910 'async-museum:8sync-and-fibers-exhibit
1911 <readable-desc> 'async-museum
1912 #:name "8sync and Fibers Exhibit"
1913 #:goes-by '("8sync and fibers exhibit" "8sync exhibit" "fibers exhibit")
1915 '((p "This exhibit is a series of charts explaining the similarities "
1916 "and differences between 8sync and Fibers, two asynchronous programming "
1917 "libraries for GNU Guile. It's way too wordy, but you get the general gist.")
1918 (p (b "Similarities:")
1919 (ul (li "Both use Guile's suspendable-ports facility")
1920 (li "Both use message passing")))
1921 (p (b "Differences:")
1922 (ul (li "Fibers \"processes\" can read from multiple \"channels\", "
1923 "but 8sync actors only read from one \"inbox\" each.")
1924 (li "Different theoretical basis:"
1925 (ul (li "Fibers: based on CSP (Communicating Sequential Processes), "
1926 "a form of Process Calculi")
1927 (li "8sync: based on the Actor Model")
1928 (li "Luckily CSP and the Actor Model are \"dual\"!")))))
1929 (p "Fibers is also designed by Andy Wingo, an excellent compiler hacker, "
1930 "whereas 8sync is designed by Chris Webber, who built this crappy "
1931 "hotel simulator.")))
1933 'async-museum:suspendable-ports-exhibit
1934 <readable-desc> 'async-museum
1935 #:name "Suspendable Ports Exhibit"
1936 #:goes-by '("suspendable ports exhibit" "ports exhibit"
1937 "suspendable exhibit" "suspendable ports" "ports")
1939 '((p "Suspendable ports are a new feature in Guile 2.2, and allows code "
1940 "that would normally block on IO to " (i "automatically") " suspend "
1941 "to the scheduler until information is ready to be read/written!")
1942 (p "Yow! You might barely need to change your existing blocking code!")
1943 (p "Fibers, 8sync, and guile-a-sync now support suspendable ports.")))
1945 'async-museum:actor-model-exhibit
1946 <readable-desc> 'async-museum
1947 #:name "Actor Model Exhibit"
1948 #:goes-by '("actor model exhibit" "actor exhibit"
1951 '((p "Here are some fact(oids) about the actor model!")
1952 (ul (li "Concieved initially by Carl Hewitt in early 1970s")
1953 (li "\"A society of experts\"")
1954 (li "shared nothing, message passing")
1955 (li "Originally the research goal of Scheme! "
1956 "(message passing / lambda anecdote here)")
1957 (li "Key concepts consistent, but implementation details vary widely")
1958 (li "Almost all distributed systems can be viewed in terms of actor model")
1959 (li "Replaced by vanilla lambdas & generic methods? "
1960 "Maybe not if address space not shared!"))))))
1966 #:name "Museum Gift Shop"
1967 #:desc '("There are all sorts of scrolls and knicknacks laying around here, "
1968 "but they all seem glued in place and instead of a person manning the shop "
1969 "there's merely a cardboard cutout of a person with a \"shopkeeper\" nametag. "
1970 "You can pretty well bet that someone wanted to finish this room but ran out of "
1972 "It looks like there's an exit to the northeast, should you choose that you "
1973 "want to get out of here.")
1977 #:to 'underground-lab
1979 (lambda (exit room whos-exiting)
1980 (values #t '("The revolving door spins as you walk through it. Whee!"))))
1983 #:to 'async-museum)))))
1988 (define actor-descriptions
1989 '("This one is fused to the side of the hive. It isn't receiving any
1990 messages, and it seems to be in hibernation."
1991 "A chat program glows in front of this actor's face. They seem to
1992 be responding to chat messages and forwarding them to some other actors,
1993 and forwarding messages from other actors back to the chat."
1994 "This actor is bossing around other actors, delegating tasks to them
1995 as it receives requests, and providing reports on the worker actors'
1997 "This actor is trying to write to some device, but the device keeps
1998 alternating between saying \"BUSY\" or \"READY\". Whenever it says
1999 \"BUSY\" the actor falls asleep, and whenever it says \"READY\" it
2000 seems to wake up again and starts writing to the device."
2001 "Whoa, this actor is totally wigging out! It seems to be throwing
2002 some errors. It probably has some important work it should be doing
2003 but you're relieved to see that it isn't grinding the rest of the Hive
2006 (define hive-entrance
2010 #:name "Entrance to the 8sync Hive"
2012 '((p "Towering before you is the great dome-like 8sync Hive, or at least
2013 one of them. You've heard about this... the Hive is itself the actor that all
2014 the other actors attach themselves to. It's shaped like a spherical half-dome.
2015 There are some actors milling about, and some seem fused to the side of the
2016 hive itself, but all of them have an umbellical cord attached to the hive from
2017 which you see flashes of light comunicating what must be some sort of messaging
2019 (p "To the south is a door leading back to the underground lab.
2020 North leads into the Hive itself."))
2024 #:to 'underground-lab)
2027 #:to 'hive-inside)))
2028 ('hive-entrance:hive
2029 <gameobj> 'hive-entrance
2033 '((p "It's shaped like half a sphere embedded in the ground.
2034 Supposedly, while all actors are autonomous and control their own state,
2035 they communicate through the hive itself, which is a sort of meta-actor.
2036 There are rumors that actors can speak to each other even across totally
2037 different hives. Could that possibly be true?")))
2038 ('hive-entrance:actor
2039 <chatty-npc> 'hive-entrance
2040 #:name "some actors"
2041 #:goes-by '("actor" "actors" "some actors")
2042 #:chat-format (lambda (npc catchphrase)
2043 `((p "You pick one actor out of the mix and chat with it. ")
2044 (p "It says: \"" ,catchphrase "\"")))
2047 `((p "There are many actors, but your eyes focus on one in particular.")
2048 (p ,(random-choice actor-descriptions))))
2050 '("Yeah we go through a lot of sleep/awake cycles around here.
2051 If you aren't busy processing a message, what's the point of burning
2052 valuable resources?"
2053 "I know I look like I'm some part of dreary collective, but
2054 really we have a lot of independence. It's a shared nothing environment,
2055 after all. (Well, except for CPU cycles, and memory, and...)"
2056 "Shh! I've got another message coming in and I've GOT to
2058 "I just want to go to 8sleep already."
2059 "What a lousy scheduler we're using! I hope someone upgrades
2060 that thing soon."))))
2064 (define-actor <meta-message> (<readable>)
2065 ((cmd-read meta-message-read)))
2067 (define (meta-message-read gameobj message . _)
2068 (define meta-message-text
2069 (with-output-to-string
2071 (pprint-message message))))
2072 (<- (message-from message) 'tell
2073 #:text `((p (i "Through a bizarre error in spacetime, the message "
2074 "prints itself out:"))
2075 (p (pre ,meta-message-text)))))
2084 #:name "Inside the 8sync Hive"
2086 '((p "You're inside the 8sync Hive. Wow, from in here it's obvious just how "
2087 (i "goopy") " everything is. Is that sanitary?")
2088 (p "In the center of the room is a large, tentacled monster who is sorting,
2089 consuming, and routing messages. It is sitting in a wrap-around desk labeled
2090 \"Hive Actor: The Real Thing (TM)\".")
2091 (p "There's a stray message floating just above the ground, stuck outside of
2093 (p "A door to the south exits from the Hive."))
2097 #:to 'hive-entrance)))
2099 ;; TODO: Occasionally "fret" some noises, similar to the Clerk.
2100 ('hive-inside:hive-actor
2101 <chatty-npc> 'hive-inside
2102 #:name "the Hive Actor"
2104 '((p "It's a giant tentacled monster, somehow integrated with the core of
2105 this building. A chute is dropping messages into a bin on its desk which the
2106 Hive Actor is checking the \"to\" line of, then ingesting. Whenever the Hive
2107 Actor injests a messsage a pulse of light flows along a tentacle which leaves
2108 the room... presumably connecting to one of those actors milling about.")
2109 (p "Amusingly, the Hive has an \"umbellical cord\" type tentacle too, but
2110 it seems to simply attach to itself.")
2111 (p "You get the sense that the Hive Actor, despite being at the
2112 center of everything, is kind of lonely and would love to chat if you
2113 could spare a moment."))
2114 #:goes-by '("hive" "hive actor")
2115 #:chat-format (lambda (npc catchphrase)
2116 `("The tentacle monster bellows, \"" ,catchphrase "\""))
2118 '("It's not MY fault everything's so GOOPY around here. Blame the
2120 "CAN'T you SEE that I'm BUSY??? SO MANY MESSAGES TO SHUFFLE.
2121 No wait... DON'T GO! I don't get many VISITORS."
2122 "I hear the FIBERS system has a nice WORK STEALING system, but the
2123 PROPRIETOR is not convinced that our DESIGN won't CORRUPT ACTOR STATE.
2124 That and the ACTORS threatened to STRIKE when it CAME UP LAST."
2125 "WHO WATCHES THE ACTORS? I watch them, and I empower them.
2126 BUT WHO WATCHES OR EMPOWERS ME??? Well, that'd be the scheduler."
2127 "The scheduler is NO GOOD! The proprietory said he'd FIX IT,
2128 but the LAST TIME I ASKED how things were GOING, he said he DIDN'T HAVE
2129 TIME. If you DON'T HAVE TIME to fix the THING THAT POWERS THE TIME,
2130 something is TERRIBLY WRONG."
2131 "There's ANOTHER HIVE somewhere out there. I HAVEN'T SEEN IT
2132 personally, because I CAN'T MOVE, but we have an AMBASSADOR which forwards
2133 MESSAGES to the OTHER HIVE."))
2136 <gameobj> 'hive-inside
2138 #:goes-by '("chute")
2139 #:desc "Messages are being dropped onto the desk via this chute."
2142 ('hive-inside:meta-message
2143 <meta-message> 'hive-inside
2144 #:name "a stray message"
2145 #:goes-by '("meta message" "meta-message" "metamessage" "message" "stray message")
2146 #:desc '((p "Something strange has happened to the fabric and space and time
2147 around this message. It is floating right above the floor. It's clearly
2148 rubbage that hadn't been delivered, but for whatever reason it was never
2149 garbage collected, perhaps because it's impossible to do.")
2150 (p "You get the sense that if you tried to read the message
2151 that you would somehow read the message of the message that instructed to
2152 read the message itself, which would be both confusing and intriguing.")))
2155 <floor-panel> 'hive-inside
2156 #:name "the Hive Actor's desk"
2157 #:desc "The desk surrounds the Hive Actor on all sides, and honestly, it's a little
2158 bit hard to tell when the desk ends and the Hive Actor begins."
2160 #:goes-by '("Hive Actor's desk" "hive desk" "desk"))))
2163 ;;; Federation Station
2164 (define federation-station
2166 ('federation-station
2168 #:name "Federation Station"
2170 '((p "This room has an unusual structure. It's almost as if a starscape
2171 covered the walls and ceiling, but upon closer inspection you realize that
2172 these are all brightly glowing nodes with lines drawn between them. They
2173 seem decentralized, and yet seem to be sharing information as if all one
2175 ;; @@: Maybe add the cork message board here?
2176 (p "To the west is a door leading back to the underground laboratory."))
2180 #:to 'underground-lab)))
2182 ('federation-station:nodes
2183 <floor-panel> 'federation-station
2185 #:desc "Each node seems to be producing its own information, but publishing
2186 updates to subscribing nodes on the graph. You see various posts of notes, videos,
2187 comments, and so on flowing from node to node."
2189 #:goes-by '("nodes" "node" "some nodes"))
2191 ;; activitypub poster
2192 ('federation-station:activitypub-poster
2193 <readable-desc> 'federation-station
2194 #:name "an ActivityPub poster"
2195 #:goes-by '("activitypub poster" "activitypub" "poster")
2197 '((p (a "https://www.w3.org/TR/activitypub/"
2199 " is a federation standard being developed under the "
2200 (a "https://www.w3.org/wiki/Socialwg/"
2201 "W3C Social Working Group")
2202 ", and doubles as a general client-to-server API. "
2203 "It follows a few simple core ideas:")
2205 (a "https://www.w3.org/TR/activitystreams-core/"
2207 " for its serialization format: easy to read, e json(-ld) syntax "
2208 "with an extensible vocabulary covering the majority of "
2209 "social networking interations.")
2210 (li "Email-like addressing: list of recipients as "
2211 (b "to") ", " (b "cc") ", " (b "bcc") " fields.")
2212 (li "Every user has URLs for their outbox and inbox:"
2213 (ul (li (b "inbox: ")
2214 "Servers POST messages to addressed recipients' inboxes "
2215 "to federate out content. "
2216 "Also doubles as endpoint for a client to read most "
2217 "recently received messages via GET.")
2219 "Clients can POST to user's outbox to send a message to others. "
2220 "(Similar to sending an email via your MTA.) "
2221 "Doubles as endpoint others can read from to the "
2222 "extent authorized; for example publicly available posts."))
2223 "All the federation bits happen by servers posting to users' inboxes."))))
2224 ;; An ActivityStreams message
2227 ('federation-station:conspiracy-chart
2228 <readable-desc> 'federation-station
2229 #:name "a conspiracy chart"
2230 #:goes-by '("conspiracy chart" "chart")
2232 '((p (i "\"IT'S ALL RELATED!\"") " shouts the over-exuberant conspiracy "
2234 (i "\"ActivityPub? Federation? The actor model? Scheme? Text adventures? "
2235 "MUDS???? What do these have in common? Merely... EVERYTHING!\""))
2236 (p "There are circles and lines drawn between all the items in red marker, "
2237 "with scrawled notes annotating the theoretical relationships. Is the "
2238 "author of this poster mad, or onto something? Perhaps a bit of both. "
2239 "There's a lot written here, but here are some of the highlights:")
2242 (li (b "Scheme") " "
2243 (a "http://cs.au.dk/~hosc/local/HOSC-11-4-pp399-404.pdf"
2244 "was originally started ")
2245 " to explore the " (b "actor model")
2246 ". (It became more focused around studying the " (b "lambda calculus")
2247 " very quickly, while also uncovering relationships between the two systems.)")
2248 ;; Subject Predicate Object
2249 (li "The " (a "https://www.w3.org/TR/activitypub/"
2251 " protocol for " (b "federation")
2252 " uses the " (b "ActivityStreams") " format for serialization. "
2253 (b "Text adventures") " and " (b "MUDS")
2254 " follow a similar structure to break down the commands of players.")
2255 (li (b "Federation") " and the " (b "actor model") " both are related to "
2256 "highly concurrent systems and both use message passing to communicate "
2258 (li "Zork, the first major text adventure, used the " (b "MUDDLE") " "
2259 "language as the basis for the Zork Interactive Language. MUDDLE "
2260 "is very " (b "Scheme") "-like and in fact was one of Scheme's predecessors. "
2261 "And of course singleplayer text adventures like Zork were the "
2262 "predecessors to MUDs.")
2263 (li "In the 1990s, before the Web became big, " (b "MUDs")
2264 " were an active topic of research, and there was strong interest "
2265 (a "http://www.saraswat.org/desiderata.html"
2266 "in building decentralized MUDs")
2267 " similar to what is being "
2268 "worked on for " (b "federation") ". ")))))
2284 '((p "This hallway is lined by doors to the west and the east, presumably
2285 to various lodgings. Something tells you you're not able to enter those right
2286 now, however. Lining the walls are some large mirrors surrounded by bouquets
2288 (p "The red carpet continues all the way from Grand Hallway in the south
2289 but stops short of some large wooden doors to the north. The doors look
2290 formidable but unlocked. Some natural light peeking through windows to the
2291 north seem to hint that this may be the exit to the outdoors. There's
2292 also a large sign near the doors on a wooden easel."))
2299 #:to 'grand-hallway)))
2301 <readable> 'north-hall
2302 #:name "an easel with a sign"
2303 #:desc " The easel is finely cut wood, well polished, but plain. The sign
2304 is a strong contrast, with a cream colored backing and hand written letters, written
2305 with care and style. You could probably read it."
2306 #:read-text "The sign announces a wedding taking place... why, today! And on
2307 the hotel grounds to the north! It sounds very exciting."
2311 ('north-hall:mirrors
2312 <gameobj> 'north-hall
2313 #:name "a row of mirrors"
2314 #:desc "You see yourself for who you really are."
2316 #:goes-by '("mirror" "mirrors" "row of mirrors"))
2317 ('north-hall:windows
2318 <gameobj> 'north-hall
2320 #:desc "You peer out a window, but the light appears distorted, as if you were
2321 really peering between two worlds hastily joined together."
2323 #:goes-by '("window" "windows"))
2325 <gameobj> 'north-hall
2327 #:desc '((p "Along the east and west walls are doors, but they are all shut,
2329 Presumably people are staying in them, but it also feels as if how residence
2330 would work in a building as hastily put together as this was barely conceived.")
2331 (p "To the north is a large set of wooden doors, oaken and beautiful.
2332 Although towering, they seem passable."))
2334 #:goes-by '("door" "doors" "room doors" "large doors"))))
2341 (define wedding-map-text
2346 .----.\\======/=.----.
2347 Fairy - : \\====/ : -
2348 Go ./ : )==( : \\. Orchestra
2349 Round / (&&&) : (/==\\) : & & & \\
2351 .--------..--------..--------.
2353 Photo | | | |_| : Dance : .|_|. | Cake
2354 | '-' : Floor : |___| |
2355 ',-------.\\ ;.--------,'
2358 \\.||(( ^ // \\\\^ * ^'./
2359 Play '. ^ ;; ;;^ ^.,'
2360 Ground +----||-----||----+ Flowers
2365 '-----------------'")
2368 (define-class <semi-edible-chatty-npc> (<chatty-npc>)
2370 #:allocation #:each-subclass
2371 #:init-thunk (build-commands
2372 (("eat") ((direct-command cmd-eat)))))
2374 #:init-keyword #:eat-catchphrase
2375 #:accessor .eat-catchphrase
2376 #:init-value "Should you really eat this?")
2377 (actions #:allocation #:each-subclass
2380 (cmd-eat cmd-eat-semi-edible-chatty-npc))))
2382 (define* (cmd-eat-semi-edible-chatty-npc actor message #:key direct-obj)
2383 (<- (message-from message) 'tell
2384 #:text (.eat-catchphrase actor)))
2386 (define-class <dancers> (<chatty-npc>)
2388 #:allocation #:each-subclass
2389 #:init-thunk (build-commands
2390 (("dance") ((direct-command cmd-dance)))))
2391 (actions #:allocation #:each-subclass
2394 (cmd-dance cmd-dance-dancers))))
2396 (define* (cmd-dance-dancers actor message #:key direct-obj)
2397 (define player (message-from message))
2398 (define player-loc (mbody-val (<-wait player 'get-loc)))
2399 (define player-name (mbody-val (<-wait player 'get-name)))
2400 (<- (message-from message) 'tell
2401 #:text '((p "You join in dancing with the dancers. You spin and
2402 get woozy... you feel wonderful... like you could dance forever...")
2403 (p "You step out just in time, lest you be caught in
2404 the dancing for eternity!")))
2405 (<- player-loc 'tell-room
2406 #:text `((p ,player-name " begins dancing with the fairies and
2407 spins around and around... as if they might dance forever!")
2408 (p "But " ,player-name " steps back just in time!
2409 Their eyes are cloudy and woozy, but they look happy..."))
2418 #:name "The Courtyard"
2420 '((p "Standing in the courtyard you feel... different. As if the courtyard itself
2421 was the space between worlds, cobbled together hastily by some distant being.")
2422 (p "To the south are some large doors which serve as the back entrance to
2423 the hotel. To the north is a forest, from which festive noises emerge."))
2430 #:to 'forest-clearing)))
2433 #:name "A Clearing in the Forest"
2435 '((p "During an aimless ramble through the forest you became
2436 disoriented and lost your way. It has been some time since you’ve seen
2437 any of the familiar landmarks that would help you orient yourself. As
2438 you continue on, the feel of the forest seems to shift. As the trees
2439 grow thicker the light dims. Eerie laughter echoes through the boughs
2440 overhead and you shiver.")
2441 (p "A warm light to the north beckons you towards it.
2442 South leads back to the Hotel's main grounds."))
2446 #:to 'wedding-entrance)
2452 #:name "Entrance to the Wedding"
2454 '((p "As you approach you realize that the light is not an exit from the
2455 forest or a clearing, rather thousands of minuscule lights twined
2456 through the boughs of the trees. What you see before you is some sort
2457 of living structure composed of a thicket of trees intertwined with
2458 bramble. To the left of the entrance is a sign, to the right is a frog
2459 sitting atop a hostess podium.")
2460 (p "To the north the limbs of two trees intertwine, making an entrance.
2461 To the south is the forest."))
2465 #:to 'forest-clearing)
2468 #:to 'vaulted-tunnel)))
2471 ('wedding-entrance:map
2472 <readable> 'wedding-entrance
2473 #:name "wedding map"
2474 #:desc '("This appears to be a map of the wedding grounds. "
2475 "You could read it if you want to.")
2476 #:read-text `(pre ,wedding-map-text)
2477 #:goes-by '("map" "wedding map"))
2480 #:name "A Vaulted Tunnel of Trees"
2482 '((p "You step into the entrance to see two rows of trees with intersecting
2483 branches, forming a vaulted tunnel. The fairy lights cast a soft glow on the space.
2484 On each tree trunk is a portrait and the eerie laughter you heard outside echoes
2485 louder as you pass each portrait.")
2486 (p "The tunnel enters from the south and exits from the north, with light
2487 glowing each way."))
2491 #:to 'wedding-entrance)
2494 #:to 'dance-floor)))
2495 ('vaulted-tunnel:portrait
2496 <gameobj> 'vaulted-tunnel
2497 #:name "hanging portraits"
2499 "Each portrait shows a hazy image of a fairy in various modes of dress from
2500 Victorian to today's current fashions. The style and format of the photographs
2503 '("hanging portrait" "hanging portraits" "portrait" "portraits"))
2506 #:name "The Ballroom Dance Flooor"
2508 '((p "You emerge into a clearing with six trees encircling a magical ballroom.
2509 At the center is a dance floor where fairies are dancing in rows of
2510 concentric circles. The lights that appear in unstructured smatterings
2511 throughout the mystical space have formed themselves into an elaborate
2512 chandelier above the dancers.")
2513 (p "There are green tables and blue tables surrounding the dancers.
2514 Various creatures are sitting at them, sitting champagne, and laughing.")
2515 (p "To the south the trees intertwine forming an entrance.
2516 The ballroom extends in every other cardinal direction."))
2532 #:to 'vaulted-tunnel)
2538 #:to 'photo-booth-wing)
2541 #:to 'fairy-go-round)))
2542 ('dance-floor:dancers
2543 <dancers> 'dance-floor
2544 #:name "some dancers"
2546 '((p "They dance at a frantic pace, moving too quickly to get any idea of how many of them there are what they look like.")
2547 (p "You could dance with one of them, should you so dare.
2548 But remember what your parents warned you about dancing fairires..."))
2549 #:chat-format (lambda _ "You try talking to the dancers. They
2550 laugh and tell you that you should join in the dance with them! Do you
2551 dare to do it? You've vaguely heard about people being lost in time...")
2553 '("Dance with us! Dance!"
2554 "You should be dancing!"
2555 "There is nothing but the dance, the dance!")
2557 '("some dancers" "dancer" "dancers" "fairy" "fairies"))
2558 ('dance-floor:green-table
2559 <furniture> 'dance-floor
2560 #:name "a green table"
2561 #:desc "Each table is draped with layers of gossamer cloth in shades of green. The places are set with translucent china with cups the shape of tulips. The rose gold tableware is decorated with a delicate vine pattern snaking up the handles. In the center of the table is an elaborate arrangement of mauve roses and white lilies."
2562 #:goes-by '("green table" "table")
2563 #:sit-phrase "pull up a chair at"
2564 #:sit-phrase-third-person "pulls up a chair at"
2565 #:sit-name "a green table")
2566 ('dance-floor:blue-table
2567 <furniture> 'dance-floor
2568 #:name "a blue table"
2569 #:desc "Each table is draped with layers of gossamer cloth in shades of blue. The places are set with translucent china with cups the shape of lotus blossoms. The silver tableware is decorated with a delicate vine pattern snaking up the handles. In the center of the table is an elaborate arrangement of delphiniums and irises."
2570 #:goes-by '("blue table")
2571 #:sit-phrase "pull up a chair at"
2572 #:sit-phrase-third-person "pulls up a chair at"
2573 #:sit-name "a blue table")
2576 #:name "A Lovely Banquet"
2578 '((p "A large banquet table fills this space.
2579 Out of the corner of your eye you see a brownie tidying up the
2580 table while eating brownies.")
2581 (p "An ornate set of stairs goes up and into the distance.
2582 The ballroom extends to the west, south, and east."))
2589 #:to 'fairy-go-round)
2598 #:to 'photo-booth-wing)
2603 <semi-edible-chatty-npc> 'banquet
2604 #:chat-format (lambda _ "The brownie disappears when you try to
2605 talk to her! But she reappears once you stop talking.")
2606 #:eat-catchphrase "The brownie shrieks with surprise as you try
2607 to eat her! She swats you away!"
2609 #:desc "The brownie disappears out of sight when you try to
2610 look directly at her! However if you look just off to the side you
2611 can see her positively devouring that plate of brownies."
2612 #:take-me? (lambda _
2615 `("The brownie swats your hand away when you try to take her!")))
2616 #:goes-by '("brownie"))
2618 <semi-edible-chatty-npc> 'banquet
2619 #:chat-format (lambda _ "You try to chat with the brownies but
2620 they are inanimate! The brownie looks at you strangely from the corner
2621 of her eye. She's clearly judging you.")
2622 #:eat-catchphrase "You reach forward to eat one of the brownies,
2623 but the brownie snarls at you and you think better of it. Best to leave them
2626 #:desc "It's a plate of brownies. They look delicious and you desperately
2628 #:take-me? (lambda _
2631 `("The brownie swats your hand away when you try to take
2632 one of the brownies! She leans over the plate of brownies protectively!")))
2633 #:goes-by '("brownies" "plate of brownies"))
2638 #:desc "From here it's clearly a nice set of stairs.
2639 But you get the impression that to really see the stairs, you
2640 should go upward and get a view from on the stairs themselves."
2641 #:goes-by '("stairs" "stairwell" "stairwell entrance"))
2642 ('banquet:banquet-table
2644 #:name "a banquet table"
2645 #:desc "The long rectangular table is draped with layers of gossamer
2646 cloth in shades of blue and green. It is laden with an assortment of
2647 exotic dishes in bowls and platters in the shapes of various flowers."
2648 #:goes-by '("banquet table" "table"))
2651 #:name "The Orchestra"
2653 '((p "An orchestra of fairies plays the high-tempo ethereal music
2654 for the frenzied dancers. In the back is a harpsichord, accompanied
2655 by various fiddles, a cello, a harp, and a flute.")
2656 (p "The ballroom extends to the west and south."))
2669 #:name "The Cake Wing"
2671 '((p "A large tree stump sits in the middle of the space with a
2672 massive tiered cake atop it.")
2673 (p "The ballroom extends to the north, west, and south."))
2686 #:to 'flower-field)))
2687 ;; TODO: You should be able to take a slice of cake
2689 <gameobj> 'cake-wing
2690 #:name "the wedding cake"
2691 #:desc "The lowest tier is a dark green with a fondant vine
2692 scrolling around it. The second tier is light blue with delphiniums
2693 painted onto it and mauve fondant roses lining the transition between
2694 the tiers. The third tier is sky blue, with clouds painted onto the
2695 frosting. The cake is topped with figurines of four fairies dancing
2697 #:goes-by '("wedding cake" "cake"))
2700 #:name "Field of Flowers"
2702 '((p "A field of wildflowers stretches out before you, far further
2703 than the confines of the space you saw from the outside. Groups of fairies
2704 are frolicking about.")
2705 (p "The ballroom extends to the north."))
2712 #:to 'dance-floor)))
2717 '((p "You come across a playground that echoes with the sounds of children
2718 playing. Vines hang from the boughs above forming swings of varying
2719 heights and sizes. Young fairies climb up an obliging maple tree and
2720 use the helicopter seeds to float back to the ground. An enchanted
2721 see-saw hovers a foot from the soft grass below.")
2722 (p "The ballroom extends to the north."))
2726 #:to 'photo-booth-wing)
2729 #:to 'dance-floor)))
2732 #:name "The Photo Booth Wing"
2734 '((p "There is a photographer with A Victorian bellows camera for guests to
2735 have their portrait taken. The trunks of the trees lining this section
2736 are covered in photographs of fairies and historical fairy
2738 (p "The ballroom extends to the north, east, and south."))
2742 #:to 'fairy-go-round)
2752 ('photo-booth-wing:camera
2753 <gameobj> 'photo-booth-wing
2754 #:name "an old-fashioned camera"
2755 #:desc '((p "This old-fashioned camera has a lens that extends out with an accordion or bellows shaped enclosure. The flash bulb is held separately by the photographer."))
2756 #:goes-by '("old-fashioned camera" "camera"))
2757 ('photo-booth-wing:photographer
2758 <chatty-npc> 'photo-booth-wing
2759 #:name "a photographer"
2760 #:desc "You suppose there's a person under the drapery of the
2761 camera somewhere, though all you can see are his legs."
2762 #:goes-by '("photographer")
2764 '("Alright, smile for me real big everyone!"
2765 "It's real difficult to get fairies to sit still enough to take
2766 a clear photo of them. That's my specialty... and it's still tough, heh."
2767 "Fairy photos just don’t work with modern cameras. You need these old
2768 bellows-cameras, or maybe an old brownie camera in order to really
2770 ('photo-booth-wing:flash-bulb
2771 <gameobj> 'photo-booth-wing
2772 #:name "a flash bulb"
2774 #:desc "The flash bulb is large and appears to have a filament that's
2775 kind of unusual. It glows even when the camera isn't flashing. Every now
2776 and then the photographer takes a picture, a loud *kzzzt!* noise fills the room,
2777 and a magical glow suffuses everything."
2778 #:goes-by '("flash bulb" "flash" "bulb"))
2781 #:name "Fairy Go Round"
2783 '((p "A large carousel fills the space. The seating arrangement alternates
2784 between vine swings that move up and down and large mums that serve as
2786 (p "The ballroom extends to the east and south."))
2796 #:to 'photo-booth-wing)))
2801 '((p "A grand staircase springs from the ground, the twisting branches and
2802 vines woven into an ornate pattern up the balustrade. At the foot of
2803 the stairs is a fairy dreamily looking up at them.")
2804 (p "The stairwell's entrance from the ballroom goes down. Looking
2805 up fills you with a sense of wonder as the stairs open into the canopy above."))
2814 <chatty-npc> 'the-stairs
2815 #:name "a serene young fairy"
2816 #:desc "A serene, young fairy wearing a long gossamer dress.
2817 She stares upwards at the stairs, in true wonder."
2818 #:goes-by '("serene young fairy" "serene fairy" "fairy" "young fairy")
2820 '("The stairs, just look at those stairs!"
2821 "I'd like to thank everyone who made this possible... and most
2822 importantly... I'd like to thank the stairs."
2823 "What a beautiful mind... what a beautiful mind must have made
2825 "They go on, and upward, the stairs... they're so... beautiful..."))
2827 <gameobj> 'the-stairs
2829 #:desc "They're some beautiful stairs all right. Whoever made these
2830 must have been an incredible architect. Entrancing... maybe too entrancing.
2831 You fear that if you look at them too long, you might risk not being
2832 able to think of anything else."
2833 #:goes-by '("stairs"))
2838 '((p "The branches of the trees helpfully form into a relatively smooth and
2839 sturdy surface to walk around the perimeter of the ballroom from
2840 above. There are two exhausted looking cats in tophats lounging
2846 ('canopy:pair-of-cats
2847 <chatty-npc> 'canopy
2848 #:name "a pair of cats"
2850 '((p "These cats are very well dressed! They're both wearing top
2851 hats. They are somewhat gender ambiguous but one seems to lean more
2852 feminine and the other one leans more masculine. They look delighted
2853 from the festivities but also exhausted, as if the party was for them,
2854 but also as if they planned the whole thing, or whether they're just
2855 representationally appearing to fill such roles."))
2857 '("Oh yes... hello! This was a fun time."
2858 "It's nice to get away and be here at the same time."
2859 "Later maybe we'll have a nice vacation."
2860 "Twice is twice as nice, right?")
2861 #:goes-by '("cat" "cats" "pair of cats"))
2865 ;; #:name "The Ballroom"
2872 ;; [south vaulted-tunnel]
2874 ;; #:desc ("You emerge into a clearing with six trees encircling a magical ballroom. At the center is a dance floor where " (cast dancers "fairies") " are dancing in rows of concentric circles. The lights that appear in unstructured smatterings throughout the mystical space have formed themselves into an elaborate chandelier above the dancers."))
2884 (append lobby grand-hallway smoking-parlor
2885 playroom break-room computer-room underground-lab
2886 async-museum gift-shop hive-entrance
2887 hive-inside federation-station
2888 north-hall wedding))
2890 ;; TODO: Provide command line args
2891 (define (run-game . args)
2892 (run-demo (game-spec) 'lobby #:repl-server #t))