Problem with Cloak of Darkness specification

I have a problem with the Cloak of Darkness specification that I’m reading from here. Firstly, is this spec correct?

My problem is that, in my world model, i have correctly made the cloak light absorbent (as required). Consequently everything is dark and i can therefore not initially see things in the bar, the foyer or the cloakroom. Specifically, i cannot see the brass hook in the cloakroom. This would indeed be the case if the cloak is light-absorbent!.

If i make my world “lit”, then dropping the cloak anywhere allows everywhere else to be also lit. So i don’t even need to go into the cloakroom. I can just drop the cloak and go south to win.

The spec claims the bar is “unlit”. If i make this also the case, the bar is still dark even without the cloak, unless a light is introduced somewhere. Where is this light?

So there seems to be, at least, three serious problems with the spec here. Perhaps it should be revised??

The point of the scenario is that all rooms are lit unless they contain the cloak.

Updating the spec is a bad idea at this point, since most of the implementations would never be changed, and new parser IF systems are only rarely created any more. It is a historical artifact now.


Agreed. It’s of historical significance only. COD is contraindicated for new systems, parser or otherwise.

Did you have some remaining questions about COD? It was successfully implemented a lot in the 90s, so it can’t have been too obscure.

No, but thanks. COD is really a retro spec. I’m putting forward an idea for making a new spec for modern systems.

I have implemented a CoD version a few month back, so my memory might be a bit fuzzy, but as far as I understood the spec, only the bar is unlit. The way I treated it is that in every room there’s a source of light, but in the bar the only light is coming in through the open doorway. And so in my version, since the cloak is absorbing some light but not all, the player cannot see a thing in the bar, but can see things in the far better lit rooms. Does that make sense? Maybe I misunderstood the spec or just implemented it in a way that made more sense to me, but that’s how I did it.

But I do agree, the spec is a little cumbersome to wrap your head around and it might seem a little contrived.

It is “contrived” to make sure your IF engine can do the “standard” things IF authors expect an IF engine to do…

I would agree that it’s fine to have special factors for a “magic cloak”, but if so, this needs to be explained in the spec.

I think the idea of having the cloak be able to absorb “some” light but not necessarily “all” is a bad concept for, what should be, a specification for people making system tests.

There are many other points that also make COD a bad idea for new engines;

For example, if you’ve got pictures, what do you show at the start in the foyer. A light room, a darkened room, nothing, blackness or what? The point is that, whatever you choose, it starts the user experience wrong.

Now i know this is meant to be just a test game concept, but i think just because it’s small doesn’t mean it has to be lame or bad. I’m sure it’s possible to design and spec something small and sweet, that’s easy to understand and more suitable for modern, media-based IF.

Something I’m, suggesting in my “standard demo kit” thread.

@howtophil; i think it’s contrived to support darkness in the same way existing engines do, and i think it shouldn’t make that assumption.

Why would one want it to be this contrived though? Who’s going to make a game like this? Wouldn’t it be better to demonstrate the regular stuff people actually use in their games? I’m not saying that CoD is bad – it certainly served its purpose for many years – but if people have a hard time even understanding how it’s supposed to work, it’s probably not an optimal spec and we’re using it just because it’s there and kind of a tradition. So if jkj is able to draft a spec that is both simple enough to understand and able to show off that an engine is capable of the things most authors expect, I’d say more power to him.

Hi, I’ve been lurking for awhile, but I’m finally taking my cloak off…

You are right, the logic is a little faulty, but, hey, it’s a magic cloak and so maybe logic doesn’t apply.

I think the benefit of Cloak of Darkness spec is that it allows you to compare source code across languages/systems, which helps to inform your decision regarding choice of development tools.

At this point changing the spec doesn’t really help because nobody is going to go back and rewrite their COD implementations. Also, just because a system can produce a working COD doesn’t mean that it can do everything you might want to do with Interactive Fiction.

Conversely, if a system can’t produce a working COD, it’s probably a sign to look for something else.

So, I think COD is somewhat useful. The beauty of spec is not that it’s perfect, but that it is standard.

It would also be helpful to have a laundry list of standard verbs for Infocom-style games with a definition of their standard (expected) behavior. That probably exists somewhere, but I don’t know where to look.

It’s really not meant to be fun. It’s meant to check that darkness, switches, game state based on possessions, etc all function. It’s not meant to be played. It’s meant to test your new engine… It’s a way of ticking off all the boxes in a list of “things every IF engine should be able to handle” not a fun game to showcase the engine. It’s for debugging engines under development…

The spec hasn’t stuck around “because of tradition” but rather because it is a proven method for checking to make sure new IF engines have these “bare minimum” functionalities that IF authors expect and have proven to use often…

In short, Cloak of Darkness is a development and debugging tool, not a “game” or a “demo.”

Right. I’d say it’s not even meant to test darkness. It’s meant to test that a moderately complicated core feature (containment, darkness) can be customized with game-specific logic.

In addition, as the original web page says, it demonstrates to a new author what it’s like to add game-specific logic. Different languages have different coding models, so it’s good to be able to see an example.

I’d also say that COD is meant to complement the “standard” test case, which is implementing Colossal Cave. A new parser IF system should definitely be able to handle Colossal Cave, which covers your basic world model, NPCs, and a few extras. But of course CC is enormous, so a tiny example case is valuable.

That said: there’s nothing wrong with creating an alternative spec – perhaps to demonstrate something different.

However, there’s a lot less IF development activity going on these days. So I don’t think you’ll see a lot of people following up on a new spec, any more than they would for a change to the COD document.

@bikibird, i agree that changing the COD spec is not a good idea. I was not actually suggesting that we do. I think a much better idea would be to have a new engine test game aimed at more modern, graphical systems and leave COD as it is.

@howtophil, yes COD is a “test spec”, but my point is that it fails at that purpose. If it’s dark whilst wearing the cloak, how can you see the brass hook in the cloakroom? If you’ve correctly implemented darkness, your engine fails. COD isn’t a test, it’s a contrived case that forces you to implement darkness wrongly!

@zarf, Aha “cloak of darkness” does indeed NOT test darkness! That’s the point. I would go along with your idea of it being a way of testing that you can customise darkness & containment. In other words, it checks that a game story can override any system world model of, day, darkness and make it work the bizarre logic of the COD spec. I do,. however, think that is a bad idea.

Anyway, I’m not suggesting that COD be updated, because it’s served its purpose. But i DO think that COD is highly misleading and BOGUS. It should be contraindicated for new systems and instead there should be a new, and totally, different test spec.

An appropriate micro game idea would be something really small, but whose world makes logical sense. It would have one puzzle which would involve story code overriding things (in a sensible way), and it would not start off in the dark before the player has even got used to the basics.

Although this would be a test game intended for system development testing, it could still be a tiny game that works well. It could be used not only for testing systems but for showcasing them.

Regarding people following up on a new spec. I agree things are bad. I don’t mind making the the debut “kit”. Does anyone know if there any open source or freely available small games that might make good initial material for such thing.

Alternative: programmers write the text :slight_smile:

I think it’s far more likely that your understanding the spec is flawed, not that the spec is flawed. Darkness, and the rest of COD, have been implemented time and time again by programmers.

It’s because they didn’t really implement darkness. they just made hooks that make the game work without contravening the spec.

If the spec is not flawed, can you explain how it is that darkness doesn’t apply to the cloakroom whilst wearing the cloak? but yet it does elsewhere?

Can you also explain the purpose of the cloakroom. why not just “drop cloak”, “go south” to win?

There are times you want your items to not function based on certain locations. There are times you want the world state to change based on what you’ve done or items that change your abilities. You want your engine to allow players to move from room to room and have checks possible to make state changes based on actions you’ve taken, items you have, or locations of items in your overall world.

It really sounds like you had trouble implementing the spec and so you want to make a new spec so you “meet spec.”

You are, of course, welcome to design a new spec, but you’re not going to see a lot of support for “COD is so flawed, old and bad” because it’s not. It’s a solid spec that helps in designing and testing. It can be hard to understand because it is designed to test a complex set of standard capabilities in a small space. It’s proven, useful, and solid.

Bars are already dark. Maybe the cloak of darkness just makes something a little darker.

This spec doesn’t seem relevant for narrative-focused engines. Although I would love to see a Choice if Games release called Cloak Of Darkness that’s a buddy cop comedy about a crime fighter and her/his lovable sentient cloak of darkness.

I’m actually developing a new authoring system and would be interested in a new mini-spec that would test more features than COD does. Part of my plan is to eventually do a port of Colossal Cave to help find issues I may have overlooked. A spec based on Colossal Cave, but with fewer rooms and objects would be a welcome alternative. Really, any specification that’s relatively small and covers familiar puzzles/activities from the standard canon of interactive fiction would be very helpful. I would use it.

@phil, No, it’s a dreadful spec. Zarf was correct in saying all it does is check your story code can override everything.

As an example of a puzzle game, it gives a terribly bad example of making a puzzle that does not make any sense at all when you think about it.

You think the spec’s solid; should “drop cloak”, “go south” win the game? I don’t think this is clear from the spec. what’s your view?