For those fluent in inform7, how long would it take you to implement Cloak of Darkness?

Ah, okay! Drop/take/wear all work in mine, and the hook can’t be taken, but I don’t have the scoring system. I’ll have to add that.

while you can win both ways, because of the better, most let you win with 1 point if dropped, and 2 points if on the hook. In either case, the cloak can be hung (on the hook), dropped to the floor, or be taken/worn.

1 Like

I’ve never played or written a version of this game, but my instinctive reading of the specification is that “or better” just means that it’s better for an author to be able to implement putting the cloak on the hook (not that the player should be rewarded for doing it).

I also think maybe the first part of the sentence means that the only place in which the player should be able to drop the cloak is the Cloakroom.

1 Like

Most feel, that it gives the player a choice. The sprinkle of items for the writer to solve include a cloak, and a hook. It also says, as long as you are not wearing the cloak, you can win. Why have the hook at all if one can just drop the cloak? The hook is the central description of the cloakroom. I am certainly no judge, but I try to write this in any “new” language I try.

In some cases (not to publicly mention them by name) , some “basic” languages can’t do this. In fact I have told others, don’t send me a manual or a great story, just the source of Cloak of Darkness is good enough for me to get an idea.

PS I realize that there are some languages that are more GUI/IDE based than source so the entire game has to be looked at.

1 Like

The hook (in my mind at least) is there to demonstrate supporter objects. Some systems with a world model handle this naturally, others might require extra coding for how objects need to interact.

1 Like

Agreed, it is placed there on purpose, just like the blocked exit to the north. IMHO, in a very small IF, there is enough here to solve as a starting point. Everything in the spec, is there for a reason.

2 Likes

[291]ExampleCloak of Darkness*]
Implementation of “Cloak of Darkness”, a simple example game that for years has been used to demonstrate the features of IF languages.In Inform 7 documentation, and is fully commented and written in a precise manner.

1 Like

I’m not sure if I picked up on the nuances of the two different scoring possibilities when I looked at it myself.

We try and keep our list of versions up-to-date; although it doesn’t include links currently and I’m sure there are more versions to add…
http://solutionarchive.com/game/id%2C7393/Cloak+of+Darkness.html

Obviously will depend on how neatly polished and extensively tested and debugged, but, for rough reference it took me:
30 mins to successfully implement the basic scenario, including all descriptions, messages, scoring etc.
30 mins to test and debug
30 mins to polish and refine

EDIT: with result:
EDIT2: inserted some explanatory comments

"Cloak_Of_Darkness" by PB


The Foyer of the Opera House is a room. "An echoing, empty space with doors leading west to the cloakroom and south to the dimly lit bar. To the north, the grand entrance leads back onto the street." ['dimly lit'-a feeble justification for why the cloak makes the bar dark but not the foyer or cloakroom] The Bar is a dark room. "Rows of gleaming glasses and  bottles line the polished mahogany [bartop].". The Cloakroom is a room. "The walls of this small anteroom are bare, apart from [a small brass hook].". The Bar door is an open scenery door. It is south of the Foyer and north of the Bar.  The Cloakroom door is a scenery door. It is west of the Foyer and east of the Cloakroom.

The bartop is a supporter in the bar. Understand "rows/-- of/-- gleaming/-- polished/-- mahogany/-- drink/drinks/bottle/bottles/glass/glasses/bar/bartop" as the bartop. Understand "get drink/bottle/glass/-- of/-- [text]" or "buy drink/bottle/glass/-- of/-- [text]" or "drink drink/bottle/glass/-- of/-- [text]"as a mistake ("[remark_sawdust]") when the player is in the Bar and the Bar is lit. [announce the sawdust and allow the player to mess about in the bar a bit if they choose to ignore it]
Rule for clarifying the parser's choice of the bartop while drinking: do nothing.  [avoid (the bartop) in response to 'drink']

Understand the command hang as "put".

Instead of going nowhere in the Cloakroom, say "The only exit is east, back to the Foyer."

Instead of going north in the Foyer, say "It's too early in the evening to be leaving without a drink!". [suggest what the player needs to do to win]
Instead of dropping the cloak in the Foyer,say "There surely must be somewhere more appropriate to leave it?". [not part of the spec, but would be a better game if an alternate solution was to leave the cloak in the foyer and close the bar door]
Instead of dropping the cloak in the Bar, say "There surely must be somewhere more appropriate to leave it?".

The small brass hook is a scenery supporter in the Cloakroom.

The player wears a black velvet cloak with description "The dense velvet of this unusual garment seems almost to suck the light from its surroundings."

The sawdust is ambiguously plural scenery in the Bar with description "[say_sawdust]". ['ambiguously plural' so that if the player types 'examine them', referring to the markings (understood as the sawdust) 'them' is recognised as referring to the sawdust]
To say say_sawdust:
	if the disturbance of the sawdust is at least 3:
		say "In the sawdust is scrawled the timeless epigram 'You have lost!'";
	else:
		say "In the sawdust is scrawled the timeless epigram 'You have won [if the cloak is on the hook]magnificently[else]mundanely[end if]!'";
	end the story finally.
	
The sawdust has a number called disturbance. Understand "markings in/on/-- the/-- sawdust/floor/--" or "floor" as the sawdust.

Taking inventory is non-disturbing behaviour. Examining the player is non-disturbing behaviour. Examining a thing which is enclosed by the player is non-disturbing behaviour. Examining the sawdust is non-disturbing behaviour. [allow the player to examine some things when the bar is lit without triggering the mention of the sawdust]Going north is non-disturbing behaviour. Dropping the cloak is non-disturbing behaviour. Looking  is non-disturbing behaviour. Waiting is non-disturbing behaviour. [allow some actions without disturbing the sawdust]

Instead of doing something other than non-disturbing behaviour when the player is in the Bar and the Bar is dark:
	increment the disturbance of the sawdust;
	say "Scuffling around in the dark is not going to further your cause!";
	
Instead of doing something other than non-disturbing behaviour when the player is in the Bar and the Bar is lit: say "[remark_sawdust]".

To say remark_sawdust: say "Your attention is [one of]suddenly and [or]rather [or]now [bold type]irresistably and [stopping]inexorably [roman type]drawn to the markings in the [sawdust] on the floor..."; [announce the sawdust once the player starts to try doing stuff in the bar] set pronouns from the sawdust. [allow the player to refer to 'it' when we announce the sawdust]

	
Every turn:
	if the cloak is enclosed by the Cloakroom: [not part of the spec, but would be a better game if an alternate solution was to leave the cloak in the foyer and close the bar door]
		now the Bar is lit;
	else:
		now the Bar is dark.
		
Test winning with "n/s/i/x cloak/w/turn on light/drop cloak/n/x cloak/drop cloak/w/hang cloak on hook/l/w/e/s/drink/x gleaming glasses/get drink of whiskey/x it".
Test mundanely with "n/s/i/x cloak/w/turn on light/drop cloak/n/x cloak/drop cloak/w/drop cloak/w/e/s/drink/x gleaming glasses/drink glass of beer/x it".
Test losing with "n/s/i/x cloak/w/jump/wave/turn on light/drop cloak/n/x cloak/drop cloak/w/hang cloak on hook/w/e/s/buy bottle of scotch/x it".
2 Likes

I’m not saying that “I picked it up from the spec” either. I just check so many in so many different languages, I see how others interpret it.

Wow, nice !!

This comparative exercise is very interesting to me, mainly because there are several (probably intentionally) ambiguous requirements in the scenario’s specification. This gives some leeway regarding completeness of implementation, but it also makes it something akin to a Rorschach test for the author because, as a consciously minimal scenario, anything over the absolute minimum presumably qualifies as a “necessary and sufficient” implementation detail in the author’s mind.

Some brief notes on each found in this thread:

Emily Short?
  • “Cloak of Darkness” / RB Ex 271 (Emily Short?, development time unknown, 591 words)
    – implements scoring as a way of addressing ambiguous adjective “better” in requirements: one point for hanging cloak (motivating a hung property for the cloak to prevent infinite score increases), one point for examining sawdust message
    – has brief room descriptions
    – omits door objects
    – hook is scenery supporter mentioned in room description, has own situational description but no initial appearance
    – sawdust message is scenery thing mentioned in room description
    – handles light status of Bar in response to actions involving the cloak: leaving the cloak in a “good” place (on hook or floor of Cloakroom) sets lighted status, while taking the cloak removes it
    – uses an enumerated value property to track “neatness” level of the sawdust message, with three states (neat/scuffed/trampled)
    – allows only going north action to avoid disturbing the message, with two rules governing: test 1 Instead of doing something other than going in the bar when in darkness: conducted via compound conditional (excepted described action && test for darkness) and provides single warning before loss, test 2 Instead of going nowhere from the bar when in darkness: conducted via compound conditional (described action && test for darkness)
    – issues two different warning messages: first version applies to disallowed non-movement and allows one warning before loss, second version applies to disallowed movement and allows loss simultaneous with first warning
    niceties added: story headline, when play begins rule for introductory text, additional synonym for hook, additional synonyms for cloak, additional synonyms for sawdust message, grammar line for >HANG linked to built-in putting it on action, test me defined for winning the game with maximum score, explanatory comments in source code
    design choices suggesting anticipation of future changes: rules that light bar check putting the cloak on something in the Cloakroom so that other supporters would qualify, rule preventing putting the cloak on any supporter outside of Cloakroom, different ending states (normally/finally)
    high-efficiency implementation details: relies on default “You have won” text instead of specifying it, single rule prevents both dropping and putting cloak on supporters outside of Cloakroom, relies on built-in describe what's on mentioned supporters in room descriptions rule to announce hung cloak in room description for Cloakroom, relies on scenery designation for hook to imply fixed in place
    potential beta tester gripes: >X DOOR (no such thing) // >HANG CLOAK (tries to put cloak on itself) // >HANG CLOAK ON HOOK. X HOOK. (repeats detail of hanging cloak due to built-in rule)
Draconis
  • “Cloak Speedrun” (Draconis, 4 min 16 sec, 228 words)
    – has minimal room descriptions
    – omits door objects
    – hook is fixed in place supporter, appearing in “You can see…” output and relying on that to indicate when cloak is hung on it
    – sawdust message is a generic fixed in place thing, appearing in “You can see…” output
    – handles light status of Bar via single rule: Before going to the bar:, rule body checks worn status of cloak and sets lighted status to logical NOT of result
    – uses binary property (scuffed) to track disruption of the sawdust message
    – allows only going north action to avoid disturbing the message; test Before doing anything except going north when the location is the Bar and in darkness: conducted via compound conditional (excepted described action && (test for location && test for darkness))
    – does not issue warning message; allows instant loss without warning
    niceties added: (no time for niceties when setting world record!)
    design choices suggesting anticipation of future changes: (none observed)
    high-efficiency implementation details: use of “it” to refer to last defined object in object declarations
    potential beta tester gripes: >X DOOR (no such thing) // >HANG CLOAK (unrecognized verb) // >REMOVE CLOAK. S. (bar is lighted)
Zed
  • “(Unnamed)” (Zed, about 90 minutes, 671 words)
    – has minimal room descriptions
    – implements doors as fake doors (a kind of privately-named backdrop) to allow player reference without normal door function
    – hook is a scenery supporter with minimal description; room description of Cloakroom does not mention it when something is on it
    – sawdust message is scenery thing in Bar, with binary situational description based on disturbance level > 0
    – handles light status of Bar via single rule: Carry out going when the room gone to is the bar:, rule body checks player encloses cloak and sets lighted status to logical NOT of result
    – uses number property (of Bar) called disturbance to track disruption of the sawdust message
    – allows any action except going unavailable direction to avoid disturbing the message; test Instead of going nowhere when the location is the bar and the bar is dark: conducted via compound conditional (described action && (test for location && test for darkness))
    – always issues same warning message; allows instant loss simultaneous with first warning
    niceties added: additional synonyms for sawdust message, additional situational direction-based synonyms for doors responsive to location, situational description of bar-door when in dark Bar, special darkness description in Bar to encourage immediate departure, verb “return” added to support provided hint from special darkness description, situational naming of hook as “bare” when applicable
    design choices suggesting anticipation of future changes: message indicating can’t leave the area makes use of description property of unusuable exit (described as a blocked tunnel – a scenery thing, not a fake door)
    high-efficiency implementation details: use of “it” to refer to last defined object in object declarations, relies on compiler to assign naked text as description of unusuable exit, relies on scenery implying fixed in place for several items, relies on built-in describe what's on mentioned supporters in room descriptions rule to announce hung cloak in room description for Cloakroom
    potential beta tester gripes: >X DOOR (printed name of cloakroom-door repeats “the”) // >X DOOR. BAR-DOOR. (no such thing) // very patient player can cause overflow of disturbance to reverse loss state
drpeterbatesuk
  • “Cloak_Of_Darkness” (drpeterbatesuk, about 90 minutes, 575 words)
    – uses unscored but differentiated winning messages as way of addressing ambiguous adjective “better” in requirements
    – has minimal room descriptions
    – omits unusable entrance/exit door; implements others as functioning scenery doors, described in invariant manner by room description of Foyer only
    – hook is a scenery supporter without description; room description of Cloakroom mentions it using name substitution with indefinite article
    – sawdust message is a scenery thing in Bar, with trinary variable description (lost/won mundanely/won maginificently)
    – handles light status of Bar via single rule: always executed Every turn:, rule body checks cloak is enclosed by Cloakroom and sets lighted status to logical NOT of result
    – uses number property called disturbance to track disruption of the sawdust message
    – allows taking inventory, examining <player>, examining <things in inventory>, going north, dropping the cloak, looking and waiting to avoid disturbing the message; test Instead of doing something other than non-disturbing behaviour when the player is in the Bar and the Bar is dark: conducted via compound conditional (excepted kind of action && (test for direct containment && test for lighted status of Bar))
    – always issues same warning message; allows warning to be displayed twice before loss
    niceties added: verb word >HANG made synonym of >PUT, minimal attempt to explain why cloak only affects lighting status of Bar, bartop added as supporter in Bar to embody elements of room description, uses understand ... as a mistake mechanism to redirect attempts to interact with bar to sawdust message, suppresses disambiguation messages involving the bartop to prevent player distraction, uses Instead rule to hint how to end scenario, brief comments in code summarizing design motivations, test commands for all three possible endings
    design choices suggesting anticipation of future changes: uses object names in room description to ensure consistency in presentation of words associated to objects, sets up kind of action to allow easy addition to list of actions exempted from disturbing the sawdust message
    high-efficiency implementation details: use of “it” to refer to last defined object in object declarations, relies on built-in describe what's on mentioned supporters in room descriptions rule to announce hung cloak in room description for Cloakroom, complex topic supports many ways for player to reference unimplemented objects in Bar (routing the action to bartop), relies on scenery implying fixed in place for several items
    potential beta tester gripes: >HANG CLOAK (tries to insert cloak into itself) // >HANG CLOAK ON (translates to wearing cloak action) // very patient player can cause overflow of disturbance to reverse loss state
otistdog
  • “Cloak” (otistdog, 59 minutes, 587 words)
    – improperly prevents dropping cloak in Cloakroom in response to ambiguous adjective “better” in requirements
    – omits room descriptions
    – implements unusable main entrance as one-sided door with initial appearance property; implements others as functioning doors with situational printed name properties listed in “You can also see…” output
    – hook is a fixed in place supporter with situational initial appearance to indicate hanging cloak
    – sawdust message is a fixed in place thing with situational initial appearance to indicate disruption
    – handles light status of Bar via pair of rules: First carry out going to the Bar while the player encloses the cloak: removes lighted status immediately prior to movement of player into Bar when player possesses cloak, Last carry out going from the Bar while the Bar does not enclose the cloak: restores lighted status immediately after movement of player out of Bar when cloak is not in that room
    – uses binary property to track disruption of the sawdust message; uses separate binary property to track status of warning
    – allows only going north to avoid disturbing the message; test 1 Before doing something other than disturbless behavior (this is the Bar warning rule): conducted via excepted kind of action and subsequent test within rule body via (test of pre-warning property && test for direct containment by dark Bar) with rule stopping action, test 2 Before doing something other than disturbless behavior (this is the Bar consequence rule): conducted via excepted kind of action and subsequent test within rule body via (test of warning-related properties && test for direct containment by dark Bar)
    – issues only one warning message; allows loss only after warning has been displayed
    niceties added: additional synonyms for unusable entrance/exit, additional situational direction-based synonyms for doors responsive to location, situational direction-based printed name of doors responsive to location, grammar line for >HANG requiring hook as second noun linked to built-in putting it on action, minimal attempt to explain why cloak only affects lighting status of Bar, brief comments in code summarizing design motivations
    design choices suggesting anticipation of future changes: use of standalone rule by other rules to avoid multiple instances of message preventing use of entrance/exit, sets up kind of action to allow easy addition to list of actions exempted from disturbing the sawdust message, different ending states (normally/finally)
    high-efficiency implementation details: (none observed)
    potential beta tester gripes: [provided courtesy of drpeterbatesuk] >HANG CLOAK (can’t see any such thing when outside of cloakroom) // >X SAWDUST (no such thing)
FLACRabbit
  • “Cloak” (FLACRabbit, 11 min 4 sec, 487 words)
    – has minimal room descriptions
    – implements unusable main entrance as scenery fixed in place thing with rules to handle door-like interaction; other doors are scenery doors
    – hook is a scenery supporter without description, mentioned in invariant manner in room description
    – sawdust message is a scenery thing, with binary variable description
    – handles light status of Bar via single rule: Carry out going south in the Foyer:, rule body has separate if statements checking player encloses cloak (removing lighted status) and player does not enclose cloak (setting lighted status)
    – uses binary property (pristine/disturbed) to track disruption of the sawdust message
    – allows only going north to avoid disturbing the message; test Instead of doing anything other than going north when the player is in the Bar and the Bar is dark: conducted via compound conditional (excepted described action && (test for direct containment && test for lighted status of Bar))
    – always issues same warning message; allows instant loss simultaneous with first warning
    niceties added: verb word >HANG made synonym of >PUT, additional synonyms for sawdust message
    design choices suggesting anticipation of future changes: different ending states (normally/finally)
    high-efficiency implementation details: use of “it” to refer to last defined object in object declarations, relies on built-in describe what's on mentioned supporters in room descriptions rule to announce hung cloak in room description for Cloakroom, rule governing lighted status of Bar relies on automatic rulebook sorting for placement
    potential beta tester gripes: >HANG CLOAK (tries to insert cloak into itself) // >HANG CLOAK ON (translates to wearing cloak action)

Lessons I draw from the above:

  1. Attention to requirements related to minutiae of world model details is inversely correlated with the author’s record of releasing games.
  2. There should be DTPM rules in the Standard Rules to make putting something on itself or inserting something into itself unlikely.
5 Likes

Very interesting! Might interpretive flourishes also come about if there are special features in the engine that make these easy or at least accomplishable (for non-Inform examples?)

Has there been a Cloak of Darkness Jam? Or is it the compulsory Olympic test of IF?

2 Likes

The most striking observation from my viewpoint is that only one of 5 versions implements doors as standard Inform doors- 2 versions omit them altogether, 1 implements complex code to enhance them and one uses more than half its code to reimplement them entirely, as backdrops, that still lack functions of a default standard door (they’re fixed openings that can’t be closed- like an open unopenable standard door)

Doors (although mentioned in the spec) play no real role in the scenario (that said, the game might be more interesting if there was a requirement for a closed door between the cloak and the Bar, for instance*) so one could argue the designers who omitted doors (just implementing mapping connections as doorways) had a point***- but I’m fascinated by this apparent aversion to standard Inform doors, which are not difficult to write in. Do players/playtesters spend a lot of time trying to interact with door objects in peculiar ways rather than just typing ‘n’, ‘s’ etc? Even ‘enter door’ / ‘go through/-- door’ strikes me as a likely-to-be-largely-unused nicety of implementation for most players/situations.

It would be relatively unusual for a story to make a narrative or functional point of whether a door is open or closed** (locked or secret doors are a different matter) so implementation of ‘straightforward map-connections as doorways- with no door implemented’ seems to have merit for most situations, with doors of any kind reserved for more particular circumstances? Unless playtesters/players really want to be able to open, close and reveal interesting details when examining every door/doorway?

*EDIT a sneaky enhancement to the puzzle would be to make the bar door glass, so that only leaving the cloak in the cloakroom and closing the cloakroom door on it would work

**EDIT2 the starting room of ‘Curses’ is a canonical and very sneaky exception

***EDIT3 ‘don’t simulate what doesn’t need simulation’ :slight_smile:

most implementations (in other languages) don’t open and close doors. They are merely connections. Interesting.

1 Like

Yeah, I put them in essentially only because the spec mentioned them as ‘doors’ rather than ‘exits’.

My understanding is that the whole scenario is intentionally designed to evoke a reference example showing how to implement “the basics” in each system. Here “the basics” mean:

  • separate rooms and moving between them
  • doors governing movement between rooms
  • implementation of a supporter object
  • the possibility of darkness and its effect on scope and basic actions
  • conditional logic that is responsive to the modeled world state
  • ending the scenario

I took it as implicitly being about demonstrating all of the above using the most elegant possible implementation, where “most elegant” means:

  • shortest
  • easiest-to-comprehend
  • showing comparative advantage for the author over other systems
  • showing comparative advantage for the player over other systems

So, yes, I think that the interpretive flourishes are directly motivated by the “elegance” criterion, but I also think that elegance is subjective, and that’s where it takes on aspects of a Rorschach test. For example, a cryptic I6 inclusion to enable direction-described doors takes a huge penalty in ease of comprehension but delivers (what I perceived as) a good demonstration of comparative advantage for the system.

3 Likes

Here is my chain of thought about the doors, as best as I can reconstruct it:

a very typical experience using Inform (for me)
  1. “The requirements say there are doors.”
  2. “Doors are a built-in object type that are easy to implement, and part of the point seems to be to demonstrate language features and affordances, so it is worth half a minute to put them in.”
  3. “Oh, but there will be two doors in the same room only named 'door', so I will need to do something about that to prevent a disambiguation problem.”
  4. “What about giving them additional names like ‘pine door’ and ‘oaken door’, ‘plain door’ and ‘ornate’ door, or even ‘door to the cloakroom’ and ‘door to the bar’?” [Note to self: The Infocom style really is the best choice here. Keep it simple, stupid – this is a speed run!]
  5. “… but I’m not really doing any descriptions or anything for this speed run, and if I add special door adjectives then everything else needs them.” [Note to self: Don’t let this become a rabbit hole – this is a speed run!]
  6. “… but I can just differentiate by their direction with a simple substitution in their printed name, which also demonstrates built-in affordances. Perfect!”
  7. “… except the doors will have different directions depending on the location… but there’s also a built-in best route routine that makes this super easy. Perfect!”
  8. “… but it doesn’t work because… why? Oh, yeah – doors are handled specially so you need to use a phrase option. Still perfect!”
  9. “… but the compiler doesn’t accept it because of the comma needed by the phrase option can’t go in a text substitution. Wait, didn’t the docs just show that in an example?”
  10. “Yes. Yes, they did.” [Note to self: documentation lie N+1 logged.]
  11. “Oh, well. I hate using phrases to output text this way, but it’s really unavoidable in this case. Good enough!” (As a side note, the phrase I wrote at this point doesn’t actually produce text, it decides on a direction. I’m still reflexively aversive to substitutions invoking phrases because way back I experienced issues with stray line breaks doing that when first trying them out. I’ll have to take another look – as drpeterbatesuk’s example shows, they are perfectly serviceable if used correctly.)
  12. “And now, since I’m displaying the doors that way, the laws of player fairness mean that I should accept the same phrasing as a name for the door… which is easy enough to do using Understand. Another superb affordance to demonstrate in this minimum scenario that is supposed to be taking as little time as possible to prove how much better I7 is than other languages. Perfect!”
  13. “… except it doesn’t work because… why again?” [Note to self: the proper ratio of time spent to utility gained for this feature was exceeded five minutes ago.] [Supplemental note to self: Shut up. This is the fun part!]
  14. “Oh, yeah – even though the documentation seemed (on first and probably insufficiently-attentive reading) to imply that you can use Understand ... when ... that way, you can’t because the noun isn’t set that early in the parsing process… but didn’t I once find some internal parser variable that would work here?”
  15. (Some digging through past tinkering projects to find the working example.) “Done! Totally worth it! … Oh, wow, that took longer than I thought.” [Supplemental note to self: Rabbit hole mode was worth it! See? See!!!] [Note to self: So you’re proving that Inform is the best language if you spend years poring over all of the complexity that has been intentionally hidden so that it will ‘just work’?] [Supplemental note to self: … Yes?] [Note to self: *sigh*]

Arguably smarter (and objectively more accomplished) authors seem to have thought that the doors were irrelevant and implementing them demonstrated no comparative advantage whatsoever. I won’t contest the viewpoint, but (as explained above) I think that the spirit of the exercise calls for some level of implementation as a “basic” feature.

EDIT: To my embarrassment, it turns out that RB Ex 319 Whither? implements exactly this functionality in a way that involves no I6.

2 Likes

That’s a very fair point! My philosophy is that doors that aren’t important to the game (i.e. whether they’re open/closed/locked/unlocked matters for narrative or puzzle reasons, they’re not just annoyances requiring an >OPEN DOOR or (first opening the door) to navigate through) should be implemented as simple connections.

But they are indeed included in the spec, and the point of this exercise isn’t to make a fun or satisfying game, it’s to show off the language.

3 Likes

Okay, it took me 33 minutes, but I think I got it!

"Dork of Clockness" by Mathbrush

Section 1 - The player

Darkness-thing is a man. The player is darkness-thing. The printed name of darkness-thing is "darkness". Understand "darkness" or "disturbing" as darkness-thing. The description of the darkness-thing is "You are darkness, and disturbing things occur in you."

Section 2 -Cloak

Cloak is a room. The description of cloak is "You are currently in a black velvet cloak, a light-absorbent one, in fact. There is a hook to the [bold type]east[roman type] and a sawdust floor to the [bold type]south[roman type]."

The abstract-inventory is a thing in cloak. The printed name of the abstract-inventory is "inventory". Understand "inventory" as the abstract-inventory. The description of the abstract-inventory is "This is carrying you."

Before taking inventory:
	if abstract-inventory is in the location:
		say "(first taking the inventory)";
		silently try taking abstract-inventory;
	otherwise if abstract-inventory is not held by the player:
		say "You can't take inventory as the inventory is not here.

But if you could this is what it would say:[paragraph break]";

Foyer is an open unopenable container in Cloak. 

The southern door is in Foyer. The western door is in Foyer. The northern exit is in Foyer.

The eastern door is a thing. The northern door is a thing.

Instead of doing something with the northern door:
	say "Sorry, this door is unusable."

Instead of entering the southern door: 
	say "[if the southern door is held by the player]You drop the door, then [otherwise]You [end if]open the door and go through it.";
	now the southern door is nowhere;
	now the northern door is in the location;
	try looking;

Instead of entering the northern door: 
	say "[if the southern door is held by the player]You drop the door, then [otherwise]You [end if]open the door and go through it.";
	now the northern door is nowhere;
	now the southern door is in the location;
	try looking;

Instead of entering the eastern door: 
	say "[if the eastern door is held by the player]You drop the door, then [otherwise]You [end if]open the door and go through it.";
	now the eastern door is nowhere;
	now the western door is in the location;
	try looking;

Instead of entering the western door: 
	say "[if the western door is held by the player]You drop the door, then [otherwise]You [end if]open the door and go through it.";
	now the western door is nowhere;
	now the eastern door is in the location;
	try looking;

Section 3 - The sawdust floor

Sawdust floor is south from cloak. "This is a sawdust floor with a message which currently says '[one of]You have won[or]You have lost[or]You have really messed up[or]Geez man, this is really bad[or]Ash Nazg Dubatuluk[or]This floor brought to you by NordVPN[or]Diese Inschrift stand auf die Glastuer eines kleines Ladens[or]Now is the winter of our discontent made glorious by this son of York[then at random].'"

The message is scenery in sawdust floor. 

Instead of examining the message:
	try looking;
	
The dork of clockness is a man in sawdust floor. "A nerdy-looking young man covered entirely in clocks is walking around blindly[if the player is in sawdust floor], messing up the sawdust floor[end if]." Understand "clock" or "man" or "clocks" or "nerd" or "nerdy" or "young" as the dork of clockness. The description of the dork of clockness is "While others mock him for his blind devotion to clocks and timepieces, the dork of clockness pays them no heed."

The can't take other people rule does nothing.

Section 4 - Hook

Hook is east from cloak. The description of hook is "You are currently in a small brass hook."

The cloakroom is supporter in hook. The description of the cloakroom is "The cloakroom is a small room in the hook. It looks like you can put things on it."

Understand "hang [something] on [something]" as putting it on.

Instead of putting the dork of clockness on the cloakroom:
	say "On the cloakroom, hanging on the hook, the dork of clockness realizes in triumph that he is in the perfect place to display himself. He has become a clock. His happiness knows no bounds.";
	end the story finally saying "He has won.";

Section 5 - Testing

Test me with "x me/take inventory/enter western door/s/take dork/n/e/put dork on cloakroom"

Dork of Clockness.gblorb (605.2 KB)

7 Likes