Scratchy “Cloak of Darkness” on Scratch

“Scratchy Cloak of Darkness” is based on the “Cloak of Darkness” specification — a very simple pattern, designed to help programmers compare the strengths and weaknesses of various coding environments.

“Cloak of Darkness” is not going to win prizes for its prose, imagination or subtlety. Or scope: it can be played to a successful conclusion in five or six moves, so it’s not going to keep you guessing for long. (On the other hand, it may qualify as the most widely-available game in the history of the genre.) There are just three rooms and three objects.

  • 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.
  • 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.
  • On the wall of the Cloakroom, to the west of the Foyer, is fixed a small brass hook.
  • 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.
  • 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.

And that’s all there is to it…

Below is my Scratch implementation. On the Scratch site, you can see all the code (along with my annotation).

Scratchy “Cloak of Darkness” on Scratch.

There is already a canonical Inform 7 version of Cloak of Darkness (it’s part of the documentation).

Post was last modified on 2 Nov 2022 9:45 pm

View Comments

Share
Published by
Dennis G. Jerz

Recent Posts

There’s No Longer Any Doubt That Hollywood Writing Is Powering AI

Two years after the release of ChatGPT, it may not be surprising that creative work…

1 day ago

The complex geometry on this wedge building took me all weekend.  #blender3d #medievalyork #mysteryplay #cgi #aesthetics #design

The complex geometry on this wedge building took me all weekend. The interior walls still…

3 days ago

Sesame Street had a big plot twist in November 1986

My older siblings say they remember our mother sitting them down to watch a new…

4 days ago

I played hooky from work to see Wild Robot with my family

I played hooky to go see Wild Robot this afternoon, so I went back to…

6 days ago