Cloak of Darkness: Quest Implementation Issues

A few days ago The Pixie posted details of a game that has been described as the equivalent of 'hello world' for text adventures ( I have quite a few questions/comments around its implementation in Quest, which I'll post one at a time next week. As preparatory homework for the weekend, why not try implementing it yourself? One of the first challenges is to make sense of what is meant by "disturbing things in the dark" (second and fifth requirement)! The specification is as follows:

  1. The Foyer of the Opera House is where the game begins. This empty room has doors to the south and west, also an unusable exit to the north. There is nobody else around.
  2. The Bar lies south of the Foyer, and is initially unlit. Trying to do anything other than return northwards results in a warning message about disturbing things in the dark.
  3. On the wall of the Cloakroom, to the west of the Foyer, is fixed a small brass hook.
  4. Taking an inventory of possessions reveals that the player is wearing a black velvet cloak which, upon examination, is found to be light-absorbent. The player can drop the cloak on the floor of the Cloakroom or, better, put it on the hook.
  5. Returning to the Bar without the cloak reveals that the room is now lit. A message is scratched in the sawdust on the floor. The message reads either “You have won” or “You have lost”, depending on how much it was disturbed by the player while the room was dark. The act of reading the message ends the game.
Good luck!


One of the first challenges is to make sense of what is meant by "disturbing things in the dark" (second and fifth requirement)!

Very true. The problem is that is not enough in the game to make the player want to spend time in that room.

Very true. The problem is that is not enough in the game to make the player want to spend time in that room.

Okay, let's solve that problem first. To requirement 2, add "There is a mouse in the room, which you can't see, but can hear when the Bar is in darkness."

So I once played this horror game on Quest, and in one room you had to mess with a dead body, and there were lots and lots of objects in one cabinet. I stayed in that room for a very long time until I looked at the guide, and found out the object I needed was hidden somewhere in the body, so I needed another object from a different room!

Anyways, just make a few containers, lots of objects in those containers, and lots of scenery objects!

I got to test play the "Cloak of Darkness" game via Pixie and it was pretty awesome. I liked it a lot in spite of the simplicity. The concept was fun and the coding I think is going to be really helpful for beginners to try if they are new to Quest.

:D Give it a whirl!


Very true. The problem is that is not enough in the game to make the player want to spend time in that room.

Sorry, I replied too quickly to this point yesterday. It isn't really acceptable to mess with the specification! As jmnevil54 implies it is always possible to encourage the player to stay in the room through the room description provided. As it is a bar, there could be some mention of what the player can smell, prompting an investigatation. Forget the mouse :)

Okay, hopefully some of you will have had a chance to think about this micro-game and attempt an implementation. I plan to raise raise a series of issues about its implementation. The first issue (Issue 0) is that the specification is a bit vague in relation to disturbing the message in the sawdust in the bar. Let's assume "the first time you perform any operation in the bar when wearing the cloak, other than leaving, means you receive a warning; any operation after that, other than leaving, means you have caused a disturbance."

Now we are ready to start the implementation in Quest. Creating a basic game raises Issue 1: How should the game panes, hyperlinks and the game map be set by default? At present, game panes and hyperlinks are switched on and the map is switched off, which seems arbitrary and inconsistent. Would it be better to have them all off or all on? All of them can be controlled dynamically (e.g. Would it be better to have dynamic control as a standard part of Quest?

I'm going to keep to my plan to raise a single point each day but will summarise at the end.

Today's post (Issue 2) covers the built in HELP command. In The Pixie's version of Cloak of Darkness the HELP command has been overriden to simply say "Just type stuff at the prompt!". This is 'tongue in cheek' of course and in most games it is likely that "Quick help" will be updated/replaced with a description that identifies all the commands available to a player in that particular game. Perhaps "Quick help" also needs to be kept up to date, however, when changes are made to Quest? This might include, for example, commands such as VERSION and ABOUT that have recently been added.

Tomorrow: Wearables in the Inventory

I can see about works in The Pixie's Deeper 2.0.

I can see about works in The Pixie's Deeper 2.0.

It's in all games published with Quest 5.8.0. Check out those just published on the front page. Surprised that ABOUT doesn't include the game description provided by the developer...and seems to be exactly the same as VERSION?

Today: Wearables in the Inventory

In The Pixie's version of the game, the standard Quest facilities for wearables are not used. Why not? Well, there are several issues here. The first is the way that worn items are described in the inventory. For Cloak of Darkness, the normal inventory description would be:
You are carrying a cloak (worn).

This is obviously not a sentence anyone would use in English but can be improved by replacing 'are carrying' with 'have':
You have a cloak (worn).

Even better, now that wearables are built in, they could be separated from other items:
You are wearing a cloak. You are carrying nothing.

or, as another example, assuming you are holding a sword and wearing a scabbard:

You are wearing a scabbard. You are carrying a sword.
>put sword into scabbard
You are wearing a scabbard (containing a sword). You are carrying nothing.

That seems okay, but leads into another issue with wearables, which I'll cover tomorrow.

Tomorrow: Further Issues with Wearables

Today: Further Issues with Wearables

The way that the cloak is managed in The Pixie's version of the game cannot be implemented with the standard wearable features of Quest. In particular, the illustrated game allows the cloak to be dropped and put on the hook while worn. In Quest, a worn item must first be removed before it can be dropped or put anywhere. This is less convenient, but the corresponding error messages are also misleading (You can't drop it. and You can't put it there.).

For consistency, it would also be useful to allow items to be picked up and worn in one action through the WEAR command, though in this case there is a meaningful error message: You would need to get it before you can put it on.

Tomorrow: Struggling with Dark Rooms

Log in to post a reply.