the-infocom-files / cutthroats

Cutthroats
3 stars 3 forks source link

Light works strangely under water #65

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>DIVE
Underwater
You are in the sea, completely surrounded by water.

>DOWN
You descend another 50 feet...

It's too dark to see!

>UP
You ascend another 50 feet...

It's too dark to see!

>UP
You get out of the water and reboard your ship...

Aft Deck
The smell of diesel fuel is strong but reassuring here on the aft deck. A ladder
leads below deck, while forward you can see the entrance to the command center
of the boat, the wheelhouse. A huge air compressor is bolted to the deck by the
aft rail.
The Weasel is picking his teeth with a nasty knife, looking around furtively.

Wait a minute. There was enough light to see just below the boat. What happened here?

Actually, UNDERWATER is a dark room. You can also demonstrate that like this:

>DIVE
Underwater
You are in the sea, completely surrounded by water.

>TURN ON FLASHLIGHT
The flashlight is now on.

>TURN OFF FLASHLIGHT
The flashlight is now off.

>LOOK
It's too dark to see!

Well, it seems like the game is "cheating" to achieve this effect. LIT is usually updated by calling <SETG LIT <LIT? ,HERE>>, and one of the functions that does this is GOTO. But for whatever reason, this game seems to have an aversion to GOTO, instead opting to move the player object and setting HERE manually.

Most of the time this doesn't matter, but it does mean that LIT isn't updated. This is what V-DIVE does:

                       <COND (<==? ,OCEAN-BOTTOM 50>
                              <SETG HERE ,OCEAN-FLOOR>
                              <MOVE ,PLAYER ,OCEAN-FLOOR>)
                             (T
                              <MOVE ,PLAYER ,UNDERWATER>
                              <SETG HERE ,UNDERWATER>
                              <UNDERWATER-F ,M-ENTER>)>

Now, the effect is probably what was desired here since it means light penetrates some way beneath the surface. But the illusion does break if you poke at it, so it's not as well implemented as it could be.