Constant Story "Calliope"; Constant Headline "^An Interactive Obtrusion^by J McIntosh^^(first-time players should type 'about'.)^^"; Include "parser"; ! Library overrides Replace ScoreSub; Object LibraryMessages with before [; Sleep: "Tempting, very tempting..."; Mild, Strong: "Real programmers are more creative than that."; Attack: ! The rolled-up Inform manual is the game's only 'weapon', ! and though there's only one valid target for it (the ! fly), the player can still have some fun with it, whacking ! things at leisure, sometimes getting a special result from ! it (e.g. from striking the computer). if (second == manual && manual has general && manual in player) { if (noun == computer || noun in computer || noun in monitor) { print "You give the computer a playful whack with the rolled-up manual. Oh, but were it a magic wand, which could instantly repair all the problems "; if (monitor has on) { "glowing before you."; } else { "hidden behind the dark screen before you."; } } else { ! This is a kludge. Whee! if (location == living_room) { "You give the thing a swift rap with the rolled-up manual. Take that!"; } else { return true; } } } else { if (location == living_room) { "Trashing your apartment would do little to summon any muses tonight."; } } ]; Include "verblib"; ! Global data structures Array channel_timing --> 6 3 5 7 9 11 13; ! Attributes; ! Cheap hack stolen from the real Designer's Manual, to let this ! game's version of the same book have a read action distinct from Examine. Attribute legible; ! Classes ! The computer objects should probably exist as their own class, I betcha. Class Computer_Object ! These things all exist within the computer. has static with before [; Push, Pull: "Using the mouse, you drag the window containing ",(the) self," around the screen, perhaps hoping to breathe a little extra life into it. Alas, once rearranged, your work spreads out as dismally as before."; Attack: ScreenAttack(); Repair: "Again, you attempt to get into the debugging mindset, but burnout has really started to set in, making it quite difficult."; Compile: "You recompile the code, for all the good it will do. The usual array of errors and warnings spill all over the code window."; Search: "You spend a moment scrolling through the text, letting the undulating left margin lull you into a light hypnosis, discouraging you from finding any particular meaning within."; Make: "And abandon what you've done so far? Despairingly buggy as it is, you haven't come up with any better ideas for a contest entry, and even if you had, it's far too late to start anything fresh."; Play, Use: <>; Close: "Hrm. There's no reason to do that; if you're going to close any windows this late, you might as well just switch the whole bloody computer off."; Receive: if (noun == game_idea) { <>; } ]; ! Objects ! Rooms Object Living_Room "Living Room" ! It doesn't have light by itself! with name "room" "peripherals" "foo", ! Because I'm a lazy bum I'm letting the game's current ! chapter be a property of the living room. Eh, why not! chapter 1, description "You amuse yourself to think of this as your living room. Technically, if you have to demarcate it from the rest of your apartment, it is that-which-is-not-the-bathroom-or-kitchen.^^And, really, especially lately, you tend only to populate this corner of it, nested inside the crook of your computer desk, surrounded by all the gear that lies on and under it.", before [; Sleep: switch (self.chapter) { 1: ! I wonder if this will be enough... self.time_left = 0; 2: "The oddities glowing before you are enough to banish your sleepiness, at least for now."; 3,4: deadflag = 3; "Aw, screw it. Nothing's going right with this thing. Even nature is against you. Maybe... maybe you can finish it in the morning, if you get up early enough... yeah..."; } ], cant_go "Where is there to go? You're either going to finish this thing tonight, or call it quits.", time_out [; switch (self.chapter) { 1: self.chapter = 2; StartTimer (living_room, 4); self.game_turn = 0; print "Huh? An unexpected flickering-by of text on the game window catches your attention, preventing the slow, inexorable progress toward the keyboard your head was apparently making. You blink away the blurriness of Sleep, thwarted once again, and squint at what just appeared...^"; font off; hr(); changeplayer(game_player); move muse to location; changeplayer(selfobj); print "Calliope strolls into the room.^"; print "^>_^"; hr(); font on; "'Calliope'? The fact that the game did something in between turns is one thing -- after all, it's been done before, and you honestly wouldn't be half-surprised if your low-level mucking about has allowed for such behavior to happen by complete accident -- but you definitely have no recollection of any 'Calliope' living in your program (though the name does ring a bell), and no amount of the most obfuscated code is capable of writing its own NPCs!"; 2: starttimer(live_fly,3); self.chapter = 3; self.time_left = 10; self.game_turn = 0; remove muse; print "One more line appears on-screen: ~"; font off; print "Smiling, Calliope draws forth her scrolls, while taking a step towards you..."; font on; print "~^^From the shadows behind you: a footfall.^^"; print "You perform one of those little full-body twitches that so often wakes you, usually when you've been asleep for only a little while.^^Oh no...^^"; if (tv hasnt on) { give tv on; move remote to desk; "Something uncomfortable encourages you to lift your head off the desk, disturbing the mountains of paper refuse a bit. Oh, look at that: you found the TV's remote by falling asleep on it. On the power button, more specifically, since the set's back on. Well, there you have it! You can't say you've had a completely unproductive evening, now, can you? Sheesh..."; } } ], time_left 15, ! How long until we SLEEP game_turn 0, ! Yuck! Surely there's a ! better way to know which game turn it is. grumble 0, ! Player grumblings ! Argh. Argh argh argh. daemon [; ! Count how far into the game we are, to make the TV noisy self.game_turn++; ], each_turn [; self.print_random_stuff(); ], print_random_stuff [; switch (self.chapter) { 1: ! Check player sleepiness, maybe print update message switch (self.time_left) { 10: print "^You seem to have passed over the point of diminishing returns on your caffeine consumption some time ago, as you're starting to feel the combined effects of the late hour and the fact you've been hacking at this thing for god knows how many hours, despite the amount of coffee you've been drinking.^"; 6: print "^You rub your eyes a bit, straining against the growing desire to get some sleep.^"; 2: print "^It's starting to become impossible to think about anything but packing it in and heading off to bed. Well, that and again cursing yourself yet again for not doing all of this much, much sooner. But you just couldn't get inspired! That was the problem, really. All you had motivating you was the deadline, and, it seems now, that just wasn't enough. Sigh.^"; } 2: if (game_player has general) { give game_player ~general; } else { muse.babble(self.game_turn); } } ! If my grumble property has a value, make the play ! grumble, and reset it. if (self.grumble > 0) { self.make_player_grumble(self.grumble); } tv.maybe_make_noise(); ], ! It would be somewhat better to attach this to playerobj make_player_grumble [grumble_value; living_room.grumble = 0; switch (grumble_value) { 1: "^Huh? Hercules isn't supposed to appear until the next chapter! And where did the Oracle go? Argh..."; 2: "^Groan... you most definitely did not use the Oracle room's pool object as the river object. Not knowingly, anyway."; 3: "^Yes, you've certainly done quite a job on the library's movement code. How you've managed to make the character move almost completely randomly, despite your best intentions, remains a mystery to you, as does the fastest way to fix this mess."; 4: "^Wow. Here you are worried about low-level code, when you still haven't written half of the bloody game's room description? Yikes. And what's more, you're supposed to be in Cerebus's chamber, or something, at this point. Oh well."; 5: switch (random(3)) { 1: "^What the... huh?!"; 2: "^Now... that's just not right."; 3: "^Wonderful, just wonderful."; 4: "^Um... sigh."; 5: "^Hello?"; } } ]; ! Real-world Things Object bathroom "the bathroom" living_room has scenery concealed with name "bathroom" "toilet" "loo" "bog" "john" "pot" "kitchen", description "Yes, it's still there. You have no practical reason to pay it a visit at the moment, however.", before [; Enter, Go: <>; ]; Object bed "bed" living_room has scenery concealed with name "bed" "sleep", description "Straining your willpower, you manage to avert your eyes from the bed that you know lies only a few steps behind you, in the shadows. In your condition, you know that once it has you under its spell, there's no turning back.", before [; Enter, Go: <>; ]; Object desk "large computer desk" Living_Room has supporter static with name "desk" "table" "large", description "You've owned this hefty, boomerang-shaped, modular desk for years, evidenced by the camouflage patterns of divers dark beverage stains covering the portions of its cheap white Formica surface not supporting your computer, its attached jumble of peripherals, and other odds and ends.", before [; Take: "Even if you had good reason, you'd be loathe to move this behemoth. Due to the transient nature of your job, you end up disassembling and then painfully rebuilding this thing about once a year, and it's without a doubt the worst part of any move. Certainly, now's not the time to try."; Attack: "It would be easy enough to trash the desk, as you suspect the thing is ready to fall apart any minute now anyway; more than once you've considered replacing it before it finally collapses and smushes your Mac, or your legs. While your mounting frustration might make the prospect of taking a wrench to the table right now somewhat inviting, it would mean moving all your precious equipment out of the way first, and you'd sooner go to bed than invest that much effort in pursuing violent absurdities."; ]; Object book "paperback mythology reference" desk ! general == muse has been looked up with name "book" "myth" "reference" "mythology" "greek" "softcover" "paperback", description "You dug this fat and well-worn little paperback from your boxes of high school textbooks to serve as reference for the game, but between your procrastination and your proclivity towards low-level hacking instead of design, you probably haven't used it that much.", before [the_word; Open: <>; Consult: wn=consult_from; the_word=NextWord(); if ((the_word == 'muse') || (the_word =='calliope')) { print "Yes, here we are: in classical Greek mythology, Calliope was the eldest of the Muses, fantastic women who provided inspiration for all brands of artists. Additionally, each muse had her specialty, and Calliope's realm involved epic poetry.^"; if (self hasnt general && living_room.chapter >= 2) { give self general; print "^You can't help but chuckle; perhaps her mysterious visit "; if (living_room.chapter > 2) print "to your dreams was "; else print "to your game is "; print "meant to inspire you; after all, computer code looks a bit like some obscure form of poetry, doesn't it? And your sprawling monster certainly is epic!^"; if (living_room.chapter == 2) print "Strange that none of this rings a bell, but then, you have been taxing your brain a bit much on this silly project, lately.^"; } return; } else { "Oh... it would be a pleasant shift away from your current grungy task to do a bit more research, wouldn't it? But really, you know you've got to extricate yourself from this tangled mess you've made for yourself in your game code before even thinking about such high-level design matters. And besides, you almost certainly wouldn't have the time, anyway. Sigh."; } ]; Object coffee "coffee mug" desk ! general == player has sipped it with name "mug" "coffee" "cup", description "Your favorite coffee mug, last filled with your brew of choice some hours ago. A little bit of it remains within.", before [; Drink, Taste: if (self hasnt general) { if (living_room.time_left > 0) { living_room.time_left = living_room.time_left + 11; } give self general; "You find yourself taking a healthy sip of cold coffee, but brave it out, deciding it a better thing to swallow the scummy stuff than spit-take all over your computer."; } else { "You can't bring yourself to take another sip of the stuff. A shame, since this was the last of it, and any place that might sell you more is surely closed, this time of night."; } Smell: "It smells... suspiciously absent."; Shake, Wave: "You meditate for a moment on the hypnotic waves and ripples thus generated within the murky coffee."; Pour: "Eh... that would mean getting up."; ThrowAt, Attack: "This mug has too much history behind it to deserve perishing in one frustrated moment."; ]; Object chair "seedy office chair" Living_Room has supporter enterable static with name "chair" "seedy" "office" "arms" "foam" "rubber" "back", description "Like your desk, your chair has also been through a lot, but, being a good, soft, susceptible chair, displays quite a bit more injury for it. Both arms have much of their rubber coating picked away, exposing the foam within, the backrest wobbles constantly and creakily, and you sometimes suspect the seat lies off the horizontal plane by a degree or two, but when you've got your mind on computer-related issues -- which is to say, whenever you sit in this chair -- you usually can't be troubled to notice.", before [; Push, Pull, PushDir: "You've got it situated just fine for what you're trying to do tonight."; Take: "Perhaps it does need a little upholstery, but seriously, now is not the time."; Turn: if (player in self) { "Wheeee!^^Sigh."; } else { "You spin the chair idly for a moment."; } ]; Object computer "mutated Macintosh" desk has supporter switchable on with name "mac" "macintosh" "computer" "cpu" "apple" "machine" "box" "pizza", description "You have rewarded this mostly-beige (for, some months ago, you intentionally spattered a parti-color pattern of India ink across its case while in an artsy mood) little pizza box's years of service with a number of upgrades its manufacturer did not intend. Of course, none of this helps you out any now, as it doesn't take much processing power to generate the half-baked 'game' facing you presently. At least you can compile quickly.", before [; SwitchOff: ! This 'instant death' should be an option only at the ! start of the game before the PC encounters inspiring ! things, if we're to take that route. print "With a soft grunt of disgust, you abruptly jab the box's power switch, silencing the machine, blackening the monitor, and disposing of your 'game'. No longer bathed in the glow of your creation, you sink back in your chair, sigh, and close your eyes."; deadflag = 3; return true; Play, Use: <>; Receive: if (noun == game_idea) { <>; } ]; Object lamp "halogen floor lamp" living_room has static light switchable on with name "lamp" "light" "halogen" "tall" "six", description "This six-foot-tall lamp set in the room's extreme corner works by shining directly upwards from the halogen bulbs nestled in its opaque crown, letting its light reflect radially from the ceiling, and normally acts as the apartment's sole light source at night, since its dim, sharply-angled rays let every little thing cast shadows, making the whole environment more... dramatic.", after [; SwitchOn: give self light; SwitchOff: give self ~light; ]; Object wall "wall" living_room has scenery concealed with name "wall" "nail" "wallpaper", description "Yellowish and studded with nails, testifying to the long past of this apartment and the many tenants it has housed, all with different wall-hanging preferences. You have made use of one nail to support that clock up there."; Object clock "wall clock" living_room has scenery with name "clock" "time", description [; if (living_room.chapter < 3) { "God... is it really that late? Sigh."; } else { "It's about fifteen minutes later than the last time you looked."; } ], before [; Take: "Nah, you'd have to move around a lot of stuff just to reach it."; ]; ! Intentionally misplet because 'keyboard' breaks compilation. Huh? Object keeyboard "keyboard" desk has scenery concealed with name "keyboard" "keys" "board" "deck", description "This keyboard works great, but, boy, could it use a good cleaning.", before [; Take: "Yick, that would mean having to look at whatever's collected underneath."; Rub: "Oh, the keyboard can survive another night before you need to actually give in and clean the thing."; Play, Use: <>; ]; Object monitor "monitor" computer has supporter general switchable on light transparent scenery with name "monitor" "screen" "tube", description [; print "This is a fairly typical 15-inch color monitor, evidencing its age of a few years through its slight blurriness."; if (monitor has on) " However, it's just fine for programming, which is what you're to doing now. Or, at least, the several windowsful of indented text sprawled across several windows would suggest this to an onlooker. After hours of frustration, you might call it something else."; else " You can't notice this now, though, because it's switched off."; ], before [; Attack: ScreenAttack(); Receive: if (noun == game_idea) { <>; } ], after [; SwitchOn: give self light; move code to self; move game to self; SwitchOff: give self ~light; remove code; remove game; ], when_on "The window-filled screen before you glows patiently.", when_off "Directly before you sits the dark pane of your switched-off monitor."; Object manual "Inform Designer's Manual" desk ! general == rolled-up has legible, with name "inform" "manual" "book" "paper" "papers" "bound" "docs" "instructions" "documentation" "designers", description [; print "A few months ago, when you were young and foolish, you printed out a copy of the entirety of this, the bible of programming IF games in your chosen language, in a flyspeck-sized font, eight pages to a sheet, and had one edge gummed to make a skinny book. Little did you know then how much of a disservice to your future self this economical thinking would represent, as your weariness effectively denies your eyes the level of focus necessary to decipher the tiny print.^"; if (self has general) print "^Currently, however, you have apparently employed it toward some other service, as you have shaped it with your fist into a club of sorts, the base of which you grip. Good heft to it, really.^"; return true; ], after [; Drop: if (self has general) { give self ~general; "The manual flops back to its normal, flat shape."; } ], before [the_word; Open: <>; Unroll: if (self has general) { "You straighten the manual back out again."; } Roll: if (self has general) "It's already rolled up!"; else { give self general; "You roll the thin manual up into a bulky cylinder, and now grip its base with your fist."; } BareHandAttack: if (self has general) "Like the Berzerkers of yore, you gnaw a bit on your weapon. Very good, very good."; else { deadflag=3; "Abruptly, you grasp a handful of pages and tear them straight out of the manual's bindings, tossing them over your shoulder. The release feels so good that you've done it twice more before you sink back into your chair, and blink.^^Let's call it a night."; } Read: if (self has general) { give self ~general; print "You unroll the thing back to a more appropriate shape, first.^"; } print "You can read the first bit well enough, thanks to all the whitespace:^^"; font off; style bold; print "The Inform Designer's Manual^^"; style roman; print " by Graham Nelson^^"; font on; "Alas, the print on the remaining hundred and something miniscule pages is far too small and dense for your weary eyes and mind to decipher at this untidy hour."; Consult: the_word=NextWord(); "Blearily, you try to find that in the index, but even this small effort among the book's unbearably miniature typeface makes your sleep-deprived head swim."; ]; Computer_Object code "buggy code" monitor has static scenery with description "One on-screen window contains a slice of your game's source code, a textual serpent of writhing left and right through countless subroutines and complex object definitions as it stretches up and down interminably. This size in itself is certainly not the cause of its flaws, but it does present a frustratingly wide landscape to seek out the elusive bugs that lie buried within. That you created the whole monstrosity yourself makes the process all the more infuriating.", name "code" "window" "buggy" "bug" "bugs" "windows" "work", article "some"; Computer_Object game "broken text adventure game" monitor has static scenery with description "This window on your computer's screen displays your text adventure game as it now stands, running happily, ready to accept your next typed command. Ah, when in such an idle state, offering up its prompt with no complaint, it looks so stable; yet, as soon as it parses a command, the myriad bugs and faults introduced through your attempts at low-level hacking on the game system's basic engine become all too evident.", name "game" "window" "broken" "adventure" "text" "windows"; Computer_Object garbage "countless strings of textual garbage" monitor has scenery with name "garbage" "errors" "messages" "error" "strings" "countless" "textual" "message", description "Others would look at the strings of garbage pockmarking your game window with incomprehension, but you, the master programmer, can decipher their meaning perfectly: your game is horribly broken."; Object fingerprint "oily fingerprint" has static with name "fingerprint" "oily" "smudge" "smear", description [; ! the && below may be redundant unless I make turning off ! computer !=death at some point if (monitor has on && computer has on) "Perhaps your most successfully creative act this evening, the smear from your earlier attempt at directly assaulting the game refracts the white light from the monitor into a sparkling smear."; else "A dim smudge lies on the screen, evidence of your earlier frustration."; ], before [; Rub: remove fingerprint; "Smirking, you wipe the smudge off with your sleeve. Your code looks cleaner than ever. In a sense."; ]; ! Instead of making channel and volume objects, how about make aliases ! named after these things on the tv? Then call the value of noun? Hmm. !Eh.. Object tv_channel "tv channel" living_room has scenery concealed with name "channel" "station" "frequency", description [; tv.channel_description(); ]; Object tv_volume "tv volume" living_room has scenery concealed with name "volume", description [; tv.channel_description(); ]; Object tv "television set" living_room has light static switchable on with name "tv" "set" "television" "telly" "controls", channel 2, channel_max 3, volume_max 3, volume 2, description [; print "Who can say how long you've had this 12-inch set. It's always been by your side, helping to provide just the right level of background informational whitenoise to ease the process of hacking. Unfortunately, despite the fact you have cable, you can receive only a few channels, since you programmed the thing to skip over all but a few favorites, and you've long since lost the manual to the kipplefields of your apartment. "; if (remote notin living_room) { print "Sadly, the same could be said for its remote control, which has a habit of coming and going. You can use the volume and channel controls on the set itself for now, though.^^"; } else { print "Like the remote control, which you have again found by accident a moment ago, it has simple volume and channel-changing controls.^^"; } self.channel_description(); ], channel_change [; print "The set skips past several channels, stopping on the first one it's programmed not to ignore.^^"; self.channel_description(); ], channel_description [; print "At the moment, "; if (self has on) { print "the screen is displaying "; switch (self.channel) { 1: "a bland newsfeed from some statehouse, focusing on some senator or other dignitary monotonizing her views on some foreign-relations issue.^"; 2: "a mindless situation comedy from the 1970s, where wacky neighbors scheme against one other over petty differences and canned laughter.^"; 3: "some shlocky 1950s horror flick.^"; } } ], before [; Take: "Nah, it's just fine where it is."; Listen: if (tv has on) { tv.channel_description(); } else { "You can still hear the audio mumbling quietly."; } ], after [; SwitchOff: give self ~light; SwitchOn: give self light; self.channel_description(); ], maybe_make_noise [i; if (self hasnt on || self.volume < 1) { return; } switch (living_room.chapter) { 1: for (i=1:i<=channel_timing-->0:i++) { if (channel_timing-->i == living_room.game_turn) { self.make_noise(i); return; } } 2: return; 3,4: if (random(4) == 1) { print "On the TV, "; switch (self.channel) { 1: switch (random(2)) { 1: "the senator continues her argument.^"; 2: "the assembled parliament grumbles.^"; } 2: switch (random(2)) { 1: "the canned laughter approves of some quip from one of the scheming apartment dwellers.^"; 2: "the prerecorded crowd gasps at some sudden twist in the plot.^"; } 3: switch (random(2)) { 1: "eerie music, perhaps played on a saw, heightens the tension of the moment.^"; 2: "the scientist postulates something dramatically.^"; } } } } ], make_noise [index; if (self hasnt general) { print "^Meanwhile, the TV continues its pleasant drone of background noise...^"; give self general; } print "^"; switch (self.volume) { 0: return; 1: print "("; 3: style bold; } switch (self.channel) { 1: switch (index) { 1: print "~Ladies and gentlemen, may I humbly suggest that this nation has, time and again, flagrantly ignored all international human rights agreements. Our patience wears thin.~"; 2: print "~Despite all our best diplomatic efforts, the ruthless despot Ricard Joribungalo continues his cowardly and unacceptable stance.~"; 3: print "~It is time that we use the resources available to us in order to remind that country of its place in the world, and its dependence on others.~"; 4: print "~I propose nothing less than a full trade embargo.~"; 5: print "The gathered senators mumble at the bold statement."; 6: print "The senator continues her soft-spoken diatribe against whoever-that-is."; } 2: switch (index) { 1: print "~I tell ya Marv, I've had it up to here with those nosy neighbors of ours. I swear I'm gonna teach them a lesson!~"; 2: print "~Oh yeah, smartypants? Whattayagonna do, sic the Mob on them?~ (laughter)"; 3: print"~I know the one thing she hates more than anything else.~"; 4: print "~Saurkraut!~"; 5: print "~Whaaaat? (laughter)~"; 6: print "~Yeah! I baked 'em a special surprise... and you're gonna help me!~ ~Me?!~ (laughter)"; } 3: switch (index) { 1: print "~No, no, I've double checked all my calculations. The monster will attack tonight. Right here, in town square. We have to be ready.~"; 2: print "~Oh doctor! What can we possibly do?!~"; 3: print "~The monster has but one weakness.~"; 4: print "~Yes, sweetheart: I'm talking about... bombarding it with deadly Delta-rays!~"; 5: print "~But doctor, contact between those and human flesh is fatal!~"; 6: print "~I know, cupcake, I know. BUT ITS A CHANCE WE'LL HAVE TO TAKE.~"; } switch (self.volume) { 1: print ")^"; 2: print "^"; 3: print "^"; style roman; } return; } ]; ! Game things Object corner "Pool Room" has light, with name "corner", description "You stand on the beautiful mosaic floor surrounding the large pool which fills most of this room. It seems to radiate a faint light by itself, throwing playful shimmers over every nearby surface, including yourself.", e_to vestibule; Object game_player "gamer" corner ! General == It's chapter two, and I've made the muse babble already, ! thank you. has animate, with name "gamer" "qqq", description "As buggy as ever.", orders [; if (random(3) == 1) { ! Chaos Engine override!!!! Whee! living_room.grumble=5; switch (random(4)) { 1: print "You can't go that way!^"; return true; 2: "Nothing to do!"; 3: print "You see nothing special about the "; print random(200); print ".^"; return true; 4: "The water dryad smiles at you."; }; }; ], each_turn [; if (living_room.chapter == 2) { muse.babble(living_room.game_turn); give self general; } print "^>_^"; ChangePlayer(selfobj); hr(); font on; living_room.print_random_stuff(); ]; Object punchbowl "shimmering pool" corner with name "pool" "shimmering" "water" "styx" "river", description [; if (location==vestibule) { living_room.grumble=2; } "The water ripples softly and silently, occasionally stirred by the Oracle's gestures."; ], found_in corner vestibule, before [; ! Do 'enter' and 'swim' and stuff too. and 'Take' Drink: "Your advance towards the pool is met with a disapproving look from the Oracle, and you can't help but step back. Clearly, the mystic water is not yours to sample. At least, not while anyone's looking."; ]; Object vestibule "Bank of Styx, East End" has light, with name "vestibule", description [; if (self hasnt general) { give self general; living_room.grumble = 3; } "The treacherous river Styx continues its course through this bleak area, flowing east to west."; ], w_to corner, e_to marketplace; Object marketplace "Crowded Marketplace" has light, with description [; if (self hasnt general) { give self general; living_room.grumble=4; } "This is a crowded room, blah blah, etc."; ], s_to [; switch (random(2)) { 1: return corner; 2: return vestibule; } ]; Object random "mighty Hercules" corner has animate male proper, with name "man" "heracles" "hercules" "herc" "mighty" "friend", initial "Mighty Hercules is here, flexing in a manly way.", description [; living_room.grumble=1; "It's your good friend, the mighty Hercules. Not too brainy, but his great strength, coupled with his constant need to prove it, could prove quite useful for the trials ahead."; ], life [; "Hercules shrugs helplessly."; ]; ! Silly Places ! The fantasy-world player. A sloppy way to cache the 'real' player's ! inventory. Object fantasy_player; Object lab "Laboratory" has light with description "This is your secret lab, deep beneath the city, where you and your faithful, unquestioning assistant, Cupcake, are attempting against all hope to find a way to destroy the Horrible Nameless Horror From The Stars that threatens to crush the city and all its inhabitants in a matter of hours.", before [; Listen: ! Sorry about duplication... <> caused a ! runtime stack overflow?! Oh well... "The scope's regular beeping as it tracks the course of the creature reminds you of a metronome, timing what very well may be the world's last sonata."; ]; Object newspaper "newspaper" ! general = folded-up has general legible supporter with name "paper" "news" "newspaper" "daily" "times" "photo" "picture" "photograph", description [; print "Today's copy of the Daily Times, the city's finest newspaper. "; if (self has general) { "Presently, it's folded up and bearing the body of the fly you just crushed after it made its ill-fated way into the lab. Really, you shouldn't have lost your calm scientific demeanor like that(especially in front of Cupcake), but perhaps it is understandable, considering the circumstances."; } ], before [; Read: if (self has general) { "Now is not the time to leisurely parouse the news, sir! But wait... there's something about the photograph under the fly's body that catches your attention. It's hard to say why, exactly, while the paper's still folded up."; } else { print "Once unfolded, a small feature on front page's lower corner catches your attention through a photograph; it seems an old colleague of yours is in town, as half the shot is dedicated to his beaming face, as he stands before his latest invention, a Cosmic Ray Repulsor Beam, about which he will lecture at--^^You whirl around. ~Cupcake, get your coat on. We've got to get the museum in the next--~ You check your watch. ~Ten minutes.~^^~But, Doctor!~ protests Cupcake, ever innocent, God bless her. ~The museum's open until five!~^^You look at her seriously. ~No, Cupcake. I'm afraid it will be closing early today. Unless we can do something about it.~^^ "; ! Shee-shee, need a subroutine to get things ready for ! next chapter. Leave_Dream(); rtrue; } Unroll, Open: if (self has general) { give self ~general; "Frowning, you unfold the paper back to a flat, readable state."; } Roll: if (self hasnt general) { give self general; "You fold the paper back up and tuck it under your arm."; } Rub: "Oh, have some dignity. You are a scientist."; ]; ! Hum de hum... Object cupcake "Cupcake" lab has proper female animate with name "girl" "woman" "lady" "chick" "cupcake" "assistant", description "Your lovely assistant is always by your side, even in times of global peril such as these, and no amount of panic that might beset her ever manages to upset her perfect coiffure or smear her makeup.^Currently, she is the very portrait of feminine fragility, trying not to tremble and looking up at you, trusting you to save the world. By god, you will, too.", life [; "Cupcake giggles despite herself. ~Oh, doctor!~"; ], each_turn [; switch (random(6)) { 1: "Cupcake files her nails."; 2: "Cupcake squeals, ~Doctor, what will we DO?~"; 3: "Cupcake furrows her little brow and stares intently at the radar scope, obviously trying to show her willingness to help. Awww, cute."; 4 to 6: return; } ]; Object radar "radar scope" lab has static with name "scope" "screen" "radar", description "This marvel of modern technology has, in the last few minutes, become a countdown timer to Doomsday, as it tracks the entry of the dreaded world-devouring space beast, represented as a horrifyingly large blip, into Earth's atmosphere. Soon, unless the impossible can be achieved and the monster can be stopped, all of man's striving over the centuries that made possible inventions like this will have been for naught!", before [; Listen: "The scope's regular beeping as it tracks the course of the creature reminds you of a metronome, timing what very well may be the world's last sonata."; ], each_turn [; switch (random(4)) { 1: "The radar scope makes futuristic beeping noises."; 2: "The radar scope continues to track the path of the monster, emitting realistic beeping sounds as it does so."; 3 to 4: return; } ]; Object blip "giant green blip" lab has static scenery with name "blip" "monster", description "For now, all you can see of the horrible menace is the abnormally large blip on the lab's radar scope, and when you try to imagine what it looks like, you can only shudder."; Object lab_stuff "racks and tables of equipment" lab has static scenery with name "stuff" "equipment" "lab" "racks" "tables" "rack" "table", description "All this equipment is useless, useless against such an unimaginably huge horror that now threatens the entire planet!"; !-------- Object apartment "Mary's Apartment" has light with description "This is the living room of your good friend Mary Levinsky's apartment. Its three walls are decorated in a most unassuming fashion, so as not to distract viewer attention from the characters.^Mary's coffee table has some sort of a gift basket on it.^", cant_go "You'd better find out what Mary wants, first."; Object flyswatter "cheap plastic flyswatter" has legible supporter with name "cheap" "plastic" "swatter" "flyswatter" "writing" "message", description "This is just an ordinary platsic flyswatter that you picked up off of Mary's table. The fly you just whacked is still stuck to it. Hmm... it looks like there's some writing on it, too.", before [; Read: print "You squint at the tiny raised lettering, and read aloud: ~Made in Peoria.~ You giggle. ~Hey Mary, ain't you got relatives there? How about that!~^^Mary snorts derisively, "; if (basket in player) { print "shoves the gift basket into your arms, "; } print "and shoos you toward the door. ~Never mind that! You just rememeber: You're just gonna apologize for 'forgetting' to return that flyswatter of theirs for so long, and offer the basket as a make-up gift! AND DON'T SAY WHERE YOU GOT THEM!~^^Unsure of how you let yourlself get talked into yet another of her birdbrained schemes, you stumble into the hallway...^^"; Leave_Dream(); rtrue; ]; Object audience "studio audience" apartment has scenery with description "You mug at the camera, and are rewarded you with a burst of canned laughter. Mary rolls her eyes impatiently."; Object basket "gift basket" apartment has container openable with name "gift" "basket" "picnic", description [; print "A small wicker basket lined with cloth, "; if (self hasnt open) { "folded in to conceal its contents."; } else { "folded back to reveal some doughnuts."; } ], after [; Open: "Mary cackles wickedly at the sight of the doughnuts."; Take: "Mary grins encouragingly at your apparent willingness to help carry out her scheme."; Drop: "Mary frowns at your indecisiveness."; ]; Object table "coffee table" apartment has scenery supporter with name "table" "coffee", description "Oh, if only you had such impeccable taste in furniture!"; Object doughnuts "doughnuts" basket has pluralname with name "doughnuts" "doughnut" "donut" "doughnut", description "Gee, they look like ordinary doughnuts.", before [; Take, Eat: "Mary hisses, ~Those aren't for you!~"; ]; Object mary "Mary" apartment has proper female animate with name "girl" "woman" "mary" "lady" "chick", description "Perhaps the strongest single bond of friendship between you and she is your mutual loathing for your eternal enemies, those annoying neighbors, the Levinskys.", life [; Attack: "Mary is your only ally in this apartment building of malevolent lunatics!"; Kiss: "An interesting idea, but with heavy plot complications. Maybe for another episode."; Order: "Mary scowls at your uncharacteristic bossiness."; Ask: switch (second) { 'basket': if (basket has open) { "Mary grins. ~Well? Go on, have a look inside!~"; } else { "Mary grins. ~Well? Go on, open it, carefully, though!~"; } 'doughnut','doughnuts','donut','donuts': print "Mary grins ferally. ~Aren't they beautiful? I baked them myself, using an old family recepie: salt, baking powder, molasses, and my own special touch: five pounds of "; style bold; print "raw sauerkraut!"; style roman; "~ She cackles at her own genius."; } "Mary stares at you uncomprehendingly as you swerve away from the script. ~Eh?~"; ]; !------- Object forest "Rainforest, near the road" has light with description "You continue to lie low, blending in perfectly with the heavy vegetation along the roadside. You've certainly been here for hours, but you can't tell how many; you have summoned all of your warrior training to set aside hunger and weariness as you wait for the moment when the ruthless despot Ricard Joribungalo's caravan passes through. You have sworn it will be his last moment alive.", before [; Listen: "The sounds of the jungle surround you."; Hide: "You're doing that fine enough already."; ]; Object tree "tree" forest has scenery supporter with name "tree", description [; print "It's just another of the dense forest's unremarkable trees"; if (knife has general) { print ", other than the fact it's currently sheathing your hunting knife.^"; } else { print ".^"; } ], before [; Go, Climb: "No, there's no need to survey the area -- you spent days carefully choosing it among possibile ambush spots -- and your position hidden in the low brush is perfect."; ]; Object knife "hunting knife" forest has general legible with name "knife" "hunting" "blade" "writing" "words" "message" "scratched", description [; print "Your trusty hunting knife. "; if (self has general) { print "Currently, it's right where you threw it after losing patience with that jungle fly (which, naturally, now exists in two pieces, stuck to the tree by its own juices). This wasn't a good move; you've got to keep your cool if you're to succeed in your mission.^^"; } else { "Eight inches long, serrated, and deadly. For all the other deadly tools you've mastered, this remains your favorite, for reasons you can't quite name.^^"; } "Some words are scratched into the blade, on either side."; ], initial [; if (self has general) { "Your hunting knife is embedded in a nearby tree."; } ], before [; Drop, Insert, PutOn: "You're not letting go of this again, until you have good reason."; ThrowAt: if (self has general) { "Shouldn't you retreive it from the tree first?"; } else { "Now is not the time!"; } Read: if (self has general) { "You can't read it while it's still stuck in the tree."; } else { print "A brief message, hand-scratched on either side of the silver blade: "; style underline; print "FEAR NOTHING"; style roman; print ". You don't know exactly why or when your brother made this addition to his knife, and you never will, since he was cut down down by Joribungalo's own hand before you knew how to read. How you came to possess this knife, with the only words of his that you can still carry with you, is another story, but you know how it must end.^^Your pondering is stopped short automatically as your hear the noise you've been waiting for all this time: car engines. Many of them, still rather distant. Getting closer.^^You change your grip on the knife.^^"; Leave_Dream(); rtrue; } ], after [; Take: if (self has general) { give self ~general; "You pluck your knife from the tree. The fly stays stuck to the bark. So be it."; }; ]; ! NPCs Object live_fly "buzzing housefly" ! general == airborne has animate general with name "fly" "housefly" "buzzing", description [; print "Normally a peaceful sort, you wouldn't mind the presence of this little animal if not for its mindless insistence to buzz around noisily and erratically, making concentration of anything else difficult. "; if (self has general) { "Currently the little beast is buzzing erratically in and around your personal airspace, deepening your frustration with each random zigzag."; } else { "Currently the vile creature has set itself upon your @00, rubbing its filthy forelegs together."; } ], pick_surface [; switch (random(5)) { 1: string 0 "desk"; 2: string 0 "chair's armest"; 3: string 0 "monitor"; 4: string 0 "wall"; 5: string 0 "television"; } return 1; ], time_left 3, time_out [; move self to living_room; startdaemon(self); "^A housefly buzzes in from the room behind you, and commences a holding pattern in the airspace immediately surrounding your head. Ugh."; ], daemon [; if (self has general) { if (random(2) > 1) { self.pick_surface(); give self ~general; "^The housefly lands on the @00 and commences to explore its surface."; } else { "^The housefly continues its loud, annoying flight."; } } else { if (random(2) > 1) { self.pick_surface(); give self general; "^The housefly decides to take wing, and it resumes its painfully distracting course around the room, and your head."; } else { "^The housefly continues to crawl around erratically on the @00."; } } ], before [; Take: <>; Catch: if (second == coffee) { "Perhaps, but that would mean a) doing something about the remaining coffee inside the mug and b) extending some sort of humane treatment to the fly. You are unprepared to accomplish either."; } else { "Oh, if houseflies could laugh..."; } Receive: "More force than that is required, surely!"; ThrownAt: move noun to living_room; if (noun == manual) { give manual ~general; } "The fly easily loops around your makeshift missile, which bounces off the wall and onto the floor."; BareHandAttack: if (self has general) { "The fly's God-given evasive abilities render your clumsy bare-handed flailing utterly ineffective."; } else { give live_fly general; "You bring your palm down on the @00 a split second after the fly buzzes back into the air. Clearly, you'll need some sort of weapon do deal with this situation properly."; } Attack: switch (second) { manual: if (manual hasnt general) { if (self has general) { "You don't even come close to striking the fly with the floppy manual."; } else { give live_fly general; "The manual's clumsy aerodynamics lend a huge advantage to the fly's early-warning systems, and it buzzes into the air long before the paper flops onto the @00."; } } else { if (self has general) { "You swing mightily at the housefly, but its unpredictable flight pattern makes it an elusive target."; } else { remove live_fly; stopdaemon (live_fly); ! We need to give locationability to the fly. living_room.chapter = 4; print "SLAP! You manage to catch the fly just as it attempts to take off from the @00, instantly pasting it.^^Such a small victory does little to change the overall situation you've been involved in. Just look around:^^"; ChangePlayer (fantasy_player); switch (tv.channel) { 1: playerto (forest); move dead_fly to tree; 2: playerto (apartment); move dead_fly to flyswatter; move flyswatter to player; 3: playerto (lab); move dead_fly to newspaper; move newspaper to player; } starttimer(dead_fly,7); rtrue; } } book: if (live_fly hasnt general) { give live_fly general; "Gripping the thick book as you might hold a brick, you try to crush the fly where it sits, but it takes wing long before you connect with the @00."; } else { "You clumsily swat at the insect with the thick book."; } coffee: "With your favorite coffee mug? Good heavens, no!"; selfobj: <>; default: "That's hardly a suitable weapon against such an adversary."; } ]; Object dead_fly "dead housefly" has scenery with name "fly" "dead" "smeared" "killed" "crushed" "swatted" "housefly" "corpse" "wings" "oily" "black" "mess" "smeared" "irridescent", description [; "Stuck to ",(the) parent(self),", it's now just a mess of smeared black, but for its oily, irridescent wings."; ], initial "The smeared corpse of a housefly lies right where you just whacked it.", found_in [; if (living_room.chapter >= 4) { return true; } else { return false; } ], before [; Take: "Eeew. No thanks."; Ask, Tell, Order: "Alas, it's too late for diplomacy now."; ], time_left 7, time_out [; switch (tv.channel) { 1: if (knife has general) { "^You really should retrieve your knife from that tree."; } else { "^For a moment, the rustling canopy overhead parts enough to let some light shine down, glinting off your blade, and the writing on it."; } 2: "^Mary glares at you and gestures fidgetingly at the flyswatter you're holding, in an attempt to jog your memory."; 3: "^Cupcake nervously gestures at the newspaper you're holding. ~So, uh, what's in today's paper, Doctor?~ God bless her, trying act so nonchalant with all that's going on."; } StartTimer(self,7); ]; ! Desc'll also be different depending upon the fly's location. ! Also need to have it buzz annoyingly, move around on top of things ! (good use of surfaces and stuff), and be killable (necessitating a ! dead_fly object. Object game_idea "the beginnings of a new game idea" with name "idea" "game" "new" "beginnings" "beginning" "ideas", description "The longer you hold onto it, the larger it seems to grow, already sprouting new ideas and what-ifs.", before [; Make, Compile: deadflag=2; "You open a fresh window, and smile as the ideas -- no code, none of that yet, just raw, pure ideas -- start to fill the screen. There's little hope you'll have this ready in time for the competition (indeed, you'll probably still be asleep within the hour).^^But that doesn't seem so important now."; Smell: "It reeks of genius."; ThrowAt: "Better to juggle it around in your head for a bit, first."; Taste, Touch: "How will you know what it feels like until you try it out?"; ], after [; Drop, Insert, PutOn: deadflag=3; "Eh. On second thought, that's a pretty lame idea, at least as lame as this mess in front of you. Which, you can't help but note, has not fixed itself, while you've been wasting the little time left to you napping, daydreaming and even sinking so low as to heartlessly destroy one of God's creatures. The most creative thing you could possibly manage right now is sleeping in until noon. So let do that instead."; ]; Object remote "remote control" with name "remote" "control" "tuner" "clicker" "changer" "zapper", description "This is the remote that came with your television, possessing a compact lozenge shape that makes it conveniently easy to lose, even on your own desk. It's most especially gone during those times when you grow weary of your limited channel range and want to reverse the modifications upon the set's reception abilities you wreaked earlier with the help of this device.^The biggest buttons on it mimic those on the set itself, and others allow you to attempt more esoteric functions."; Object mess "junk on desk" desk ! general == searched has scenery legible concealed with name "junk" "doodles" "paper" "stuff" "notes" "trash" "garbage" "wrappers" "gear" "cabling" "odd" "assorted" "drifts", description "Mostly odd cabling and assorted trash lying amidst drifts of loose paper containing notes and doodles, some on the upper strata relevant to your present work, but most of it is merely accumulation since the last time you organized this stuff. Who can say when that might have been.", before [; Read: "Once again, you look over your more recent notes, and recall the excited state of mind that led you on as you scribbled down these ideas weeks ago, after a sudden burst of happy insight that seemed to lead the way to a truly glorious and unique hack of an IF game. And it still does, you're sure of it, but if only you could have stayed in that mood, and kept working on it, instead of letting the mood fade, and drop you back into your more procrastinative mode!"; Rub, Take: "Yeah, this stuff really could use some organization, but right now, you'd sooner sleep than start such a task."; Search: if (self hasnt general) { give self general; "You uncover some junk food wrappers and bottlecaps before succumbing to the futility of the labor. Anything that might get you through tonight won't lie in this junk."; } else { "You spend a moment harmonizing your thoughts with the drifts of paper. You fail."; } ]; Object muse "Calliope" has animate female proper with name "muse" "calliope" "woman" "lady" "chick" "greek" "girl", description "She appears as a statue come to life, a beautiful young woman in flowing white robes. She carries a large, rolled-up scroll of some kind, but leaves it tucked under one arm, making slow, dramatic gestures with the other, as she speaks to you.", babble [game_turn; if (game_turn ~= 1 && player == selfobj) { print "The strange, apparently untriggered output continues...^^"; } if (player == selfobj) { font off; hr(); } switch (game_turn) { 2: print "~Gentle Artist!~ Her voice seems strangely familiar, yet... distant, hard to place.^"; 3: print "~No amount of honeyed words can soothe the bitterness borne of frustration. "; switch (tv.channel) { 1: print "As the pigheaded dictatorship has thus far ignored all attempts at reasonable, diplomatic negotiations, "; 3: print "As the earth's combined military might is powerless to stop the nameless menace from outer space, "; 2: print "As the Levinskys have foiled our plans in the past time and again, "; } print "so are poets left nothing but their own teeth to gnash when their ideas abandon them, and they can do nothing but burn over trifles, stirring cold, decayed ideas that have lost their spark.~^"; 4: print "~Gentle artist! The World is great, far more vast than thy dreams, and always able to replenish even the most embittered mind with new life and fire.~^"; 5: switch (tv.channel) { 1: print "~As the might and influence of one nation must descend upon another, "; 3: print "~As the horrible space monster even now descends upon the hapless earth, "; 2: print "~As the swift hammer of justice shall soon descend upon those nosy neighbors of ours, "; } print "So will Inspiration descend upon you, aloft on irridescent wings. If you will but let it.~^"; } if (player == selfobj) { print ">_^"; hr(); font on; } ], life [; Ask, Tell, Order: "Before you can even open your mouth to interrupt her monologue, Calliope has already pressed her finger, very delicately, across your lips. After a moment, and smiling softly, she draws back her hand."; Kiss, Attack: "Her beauty makes her utterly unapproachable to a mortal such as yourself. Besides, it sounds like she's trying to tell you something important."; ]; ! Subroutines [ ScreenAttack; if (fingerprint notin monitor) { move fingerprint to monitor; "Absurdly, you poke at the text on your screen, as if a solid 'love tap' would exorcize the bugs from ", (the) self,". Naturally, all you manage is a smear of oil on the monitor's surface."; } else "You continue to paw angrily at your screen, but it's just less funny this time."; ]; [ AboutSub; "My prime goal in writing Calliope was to get comfortable with the Inform programming language, and I believe I succeeded that much. Originally, I meant to accomplish this merely by painting a (somewhat self-deprecatory) autobiographical portrait of myself hacking confusedly away at a going-nowhere Inform program, making a silly little diorama which, once complete, I might have shown a couple of friends before setting it aside and probably forgetting about it, but enough ideas for expanding this into a dippy little quote-unquote 'interactive' tribute to text adventure programming in general fell into my head to move me to expand this bloated exercise from pastiche to short story. I then submitted the whole mess to the 1999 IF Comp, partly to make good on my never-canceled entrance request from the beginning of this year (When I had a vague idea about a game I wanted to make, which I then let lie fallow for some months, poked at a little, and then abandoned), but mostly for the same reason most people probably have when they enter the Boston Marathon. It's a fun lark!^^While I can't expect this little trifle to score very well in the competition, I hope that you get a smile or two from it anyway. I had enough fun writing it, learning as I went, to want to dig immediately into making a 'real' text adventure game, so, as far as I'm concerned, it's a smashing success.^^Special thanks to betatesters Leah Bonistalli, Jordan 'Greywolf' Peacock, Jeff Pitrman, and Andy Turner.^^You may send comments and criticism to me at jmac@@64jmac.org.^^ --Jason McIntosh"; ]; [ Initialise; location=chair; print "^^You've been hacking at this silly game for weeks, and now that the pressure's on, with the competition deadline only a few days away, you figured an all-nighter would be just the thing. But as the bugs pile up, and the clock ticks on, the notion of completion looks more and more distant...^^"; move player to chair; startTimer(living_room,15); startDaemon(tv); startDaemon(living_room); startDaemon(game_player); selfobj.orders = dark_death; ]; [ dark_death; if (location == thedark) { deadflag = 3; "Perhaps you were hoping to think more clearly by removing all visual distraction, but the total darkness only reminds you of your fatigue, and sap you of any will to turn anything back on again. Instead, you crawl your way into bed."; } else { rfalse; } ]; ! Huh? Why can't I declare an array inside a function? Array insert_this string "self,"; Array new_buffer string 60; ! This entire routine is very, VERY kludgey. But boy, did I learn a ! lot about Inform while making it! :) [ BeforeParsing i; if (NextWord() == 'type') { if (monitor hasnt on || NextWordStopped() == (-1) || live_fly in location) { return; } if (TestScope(keeyboard) == 0) { return; } ! Two more on-deadline kludges. :b if (live_fly.time_left == 0 && living_room.chapter == 3) { print "Your typing is suddenly interrupted by a most unwelcome noise.^"; rfalse; } if (living_room.game_turn == 5 && living_room.chapter == 2) { print "Your typing is interrupted by the odd output.^"; rfalse; } wn = 2; ! Please cover your eyes now... if (NextWord() == 'quit' or 'restart' or 'restore' or 'verify' or 'save' or 'scripton' or 'scriptoff' or 'pronouns' or 'score' or 'fullscore' or 'lmode1' or 'lmode2' or 'lmode3' or 'notifyon' or 'notifyoff' or 'version' or 'places' or 'objects') { print "A teeth-grinding amount of meaningless text spills across the game window. You seem to have uttery fragged the system's metaverbs, along with everything else that's going wrong. Ouch.^"; rfalse; } new_buffer->1=(buffer->1); for (i=2:i<=(insert_this->0)+1:i++) { new_buffer->i=insert_this->(i-1); } for (i=1:i<=(buffer->1)-(insert_this->0):i++) { if (buffer->(i+5) == ',') { print "You wince as more garbage dances across the output window. Add the parser's conversation system to the list of things you've accidentally nuked tonight.^"; rfalse; } new_buffer->(1+i+insert_this->0)=buffer->(1+i+insert_this->0); } new_buffer->1=(i+insert_this->0)-1; buffer->1=new_buffer->1; for (i=1:i<=new_buffer->1:i++) buffer->i=new_buffer->i; Tokenise__(buffer, parse); give game_player general; ChangePlayer(game_player); font off; hr(); } ]; [ InScope; if (actor == player && scope_reason == TALKING_REASON) PlaceInScope(game_player); rfalse; ! Just coz' Graham does it ]; [ ParserError; if (player==game_player) { ChangePlayer (selfobj); print "[The screen fills with garbage. Joy.]^"; hr(); font on; rtrue; } else rfalse; ]; [ RollSub; "That's, um, rolled-up enough already."; ]; ! The channel- and volume- changing subroutines used to be more ! general and elegant, with checks to see if the noun, if it's not the ! volume object, provides volume or channel, but since the only thing ! thing in the game that possessing such attributes now is the tv, ! that's hardcoded now. [ TurnDownSub; if (noun has switchable && noun hasnt on) { "Not while it's turned off, you won't."; } if ((noun == tv) || (noun == tv_volume)) { if (tv.volume > 0) { tv.volume--; print "You turn down the set's volume level a notch."; if (tv.volume == 0) { "The TV is now as silent as it gets, which is somewhat disappointing, really; the thing continues to make noise at a subliminal level. You've really got to replace this thing someday."; } return; } else { "You can't turn down the set's volume level any further."; } } else { "Alas, it seems to lack volume controls."; } ]; [ TurnUpSub; if (noun has switchable && noun hasnt on) { "Not while it's turned off, you won't."; } if (noun == tv || noun == tv_volume) { if (tv.volume < tv.volume_max) { tv.volume++; "You turn up the set's volume level a notch."; } else { "You can't turn up the set's volume level any further."; } } else { "Alas, it seems to lack volume controls."; } ]; [ ChannelDownSub; if (noun has switchable && noun hasnt on) { "Not while it's turned off, you won't."; } if (noun == tv_channel || noun == tv) { if (tv.channel > 1) { tv.channel--; } else { tv.channel = tv.channel_max; } tv.channel_change(); } else { "Alas, it seems to lack tuning controls."; } ]; [ ChannelUpSub; if (noun has switchable && noun hasnt on) { "Not while it's turned off, you won't."; } if (noun == tv_channel || noun == tv) { if (tv.channel < tv.channel_max) { tv.channel++; } else { tv.channel = 1; } tv.channel_change(); } else { "Alas, it seems to lack tuning controls."; } ]; [ChannelFailSub; "You'll have to specify a direction, either up or down."; ]; [ Hr i width; ! Prints a horizontal rule ! The width is arbitrary for now width=40; for (i=1:i<=width:i++) print "-"; new_line; ]; [ CompileSub; "Wow, you really have been programming too long."; ]; [ RepairSub; "That's not what needs debugging tonight."; ]; [ DeathMessage ; if (deadflag==3) print "There's always next year"; ]; [ ShakeSub; ! Sigh... I can't just synonymize this? <>; ]; [ ReadSub; <>; ]; [ MakeSub; "But you've already got one. See?"; ]; [ PlaySub; "Ever the neophile, you start to invent a little game involving ", (the) noun,". The immediate benefits for the computer game you're trying to make, though, are obscure at best."; ]; [ FindSub; "You smile, dreaming of a world where things can be found at will."; ]; [ NoScoreSub; "Nah, you're too busy programming. Ha Ha! Um. Boy, it is pretty late, isn't it."; ]; [ BareHandAttackSub; if (noun has animate) { "The moral implications of throttling ",(the) noun," with your bare hands are too great to contemplate."; } else { <>; } ]; [ UseSub; "You'll have to be more specific regarding what you'd like to do with ",(the) noun,"."; ]; [ TypeSub; ! Much of this verb is a sick, sick kludge, done 2 hours before comp99 ! deadline. See also the BeforeParsing routine. if (live_fly in location) { "The fly's presence distracts you from further attempts at game input. You find yourself refocusing all your frustration at the miserable creature, almost to the point of obsession."; } if (TestScope(keeyboard) == 0) { "Nothing in your immediate environment seems to invite typing."; } if (live_fly.time_left == 0 && living_room.chapter == 3) { rtrue; } if (living_room.game_turn == 5 && living_room.chapter == 2) { rtrue; } if (monitor has on) { "You type randomly on the keyboard, and enjoy similar results on the screen."; } else { "While the monitor's turned off?"; } ]; [ PourSub; "Uh... yeah."; ]; [ HideSub; "Now, now."; ]; [ UnrollSub; "That's flat enough already."; ]; [ Leave_Dream; living_room.chapter = 5; ChangePlayer(selfobj); ; move game_idea to player; move dead_fly to desk; move manual to desk; give manual ~general; print "^Whoa.^^You drop the manual back onto the desk and rub your eyes. How long "; style underline; print "have"; style roman; print " you been putting off sleep?^^But actually... you know? Whatever that is that just wormed its way out of your brain to present itself as an insomaniacal vision... it has merit. It's pursuit certainly seems more interesting than continuing to hack on the mess polluting your Mac at the moment.^^You actually might have a genuine new idea in your possession."; StopTimer(dead_fly); rtrue; ]; [ CatchSub; "No need, I'd say."; ]; [ ScoreSub; return; ]; ! Grammar and Verbs include "grammar"; Extend 'read' first * legible -> Read; verb meta 'info' 'about' 'xyzzy' * -> About; Extend 'attack' replace * noun -> BareHandAttack * noun 'with' held -> Attack; Verb 'swat' * 'at' creature -> BareHandAttack * creature -> BareHandAttack * 'at' creature 'with' held -> Attack * creature 'with' held -> Attack; Extend 'turn' * 'up' noun -> TurnUp * 'down' noun -> TurnDown * noun 'volume' 'up' -> TurnUp * noun 'volume' 'down' -> TurnDown * 'up' noun 'volume' -> TurnUp * 'down' noun 'volume' -> TurnDown * noun 'up' -> TurnUp * noun 'down' -> TurnDown * 'up' noun -> TurnUp * 'down' noun -> TurnDown; verb 'slap' * noun -> BareHandAttack; verb 'smack' 'smear' 'whack' = 'swat'; Verb 'make' * noun ->make; verb 'program' 'create' = 'make'; Verb 'shake' = 'wave'; Verb 'change' * noun 'channel' 'up' -> ChannelUp * noun 'channel' 'down' -> ChannelDown * noun 'up' -> ChannelUp * noun 'down' -> ChannelDown * noun -> ChannelFail; Extend 'switch' * noun 'channel' 'up' -> ChannelUp * noun 'channel' 'down' -> ChannelDown * noun 'up' -> ChannelUp * noun 'down' -> ChannelDown * noun -> ChannelFail; Verb 'roll' 'fold' 'crease' 'bend' * held -> Roll * 'up' held -> Roll * held 'up' -> Roll * 'down' held -> Unroll * held 'down' -> Unroll; Verb 'unroll' 'flatten' 'straighten' 'unfold' * noun -> Unroll; Verb 'compile' * noun -> Compile; verb 'recompile' = 'compile'; verb 'play' * noun -> Play * 'with' noun -> Play; Extend only 'fix' replace * noun -> Repair; Extend 'go' * 'to' noun -> Go; verb 'find' * -> Find; Extend 'score' replace * -> NoScore; verb 'repair' 'debug' * noun -> Repair; verb 'help' = 'pray'; ! Har har verb 'spin' = 'turn'; ! I made the addition of 'use' and the extension to 'look' due to the ! reactions of confused betatesters who were unfamilar with the ! 'traditions' of Infocom-style text adventures. I begin to wonder why ! these aren't part of the standard library. verb 'use' * noun -> Use; Extend 'look' * noun -> Examine; verb 'type' * topic -> Type; verb 'pour' 'spill' * -> Pour * noun -> Pour; verb 'hide' * topic -> Hide; verb 'catch' 'capture' 'trap' * noun -> Catch * noun 'with' noun -> Catch; end;