“Changing room descriptions” gave me an idea for something I wanted to try; apologies for taking some liberties with the original prompt. Here’s a short tribute to a classic piece of IF (I won’t name it, because it’s a spoiler if you haven’t played).
Sample transcript
Office
Your office contains a filing cabinet, a water cooler, a desk chair, and a desk. On the desk are a mobile phone, a paperback novel, and a satchel. Outside the window, you can see the snow.
A basketball lies on the floor.
> TAKE BASKETBALL
You take the basketball.
The paperback novel gives a soft sigh and falls apart into a pile of powdery white snow.
> OPEN FILING CABINET
You open the filing cabinet, revealing a manila folder.
The filing cabinet gives a soft sigh and falls apart into a pile of powdery white snow. The manila folder falls onto the floor.
> LOOK
Office
Your office contains a water cooler, a desk chair, and a desk. On the desk are a mobile phone and a satchel. Outside the window, you can see the snow. There are flecks of snow inside the office as well.
You see a manila folder here.
The desk chair gives a soft sigh and falls apart into a pile of powdery white snow.
> EXAMINE SATCHEL
It seems to be harmless.
A scientific calculator is in the satchel.
The mobile phone gives a soft sigh and falls apart into a pile of powdery white snow.
> TAKE FOLDER
You take the manila folder.
The water cooler gives a soft sigh and falls apart into a pile of powdery white snow.
> LOOK
Office
Your office contains a desk. On the desk is a satchel. Outside the window, you can see the snow. There are large piles of snow inside the office as well.
The basketball gives a soft sigh and falls apart into a pile of powdery white snow.
> INVENTORY
You have a manila folder.
The manila folder gives a soft sigh and falls apart into a pile of powdery white snow.
> LOOK
Office
Your office contains a desk. On the desk is a satchel. Outside the window, you can see the snow. There are great snowy hills inside the office as well.
The desk gives a soft sigh and falls apart into a pile of powdery white snow. The satchel falls onto the floor.
> TAKE SATCHEL
You take the satchel.
The satchel gives a soft sigh and falls apart into a pile of powdery white snow. The scientific calculator falls onto the floor.
> LOOK
Office
Your office is devoid of furniture. Outside the window, you can see the snow. There are vast mountains of snow inside the office as well.
The scientific calculator gives a soft sigh and falls apart into a pile of powdery white snow.
*** SNOW ***
Source code
(intro)
(try [look])
(current player #player)
(#player is #in #office)
#office
(room *)
(name *) Office
(look *)
(collect $F)
*($F is #in #office)
~(item $F)
~($F = #player)
(into $Furniture)
(if) (nonempty $Furniture) (then)
Your office contains (a $Furniture).
(else)
Your office is devoid of furniture.
(endif)
(collect $Obj)
*($Obj is #on #desk)
(into $DeskThings)
(if) (nonempty $DeskThings) (then)
On the desk (is $DeskThings) (a $DeskThings).
(endif)
Outside the window, you can see the snow.
(snow level is $S)
{
($S > 0)
There are
(if) ($S < 3) (then) flecks of snow
(elseif) ($S < 5) (then) drifts of snow
(elseif) ($S < 7) (then) large piles of snow
(elseif) ($S < 9) (then) great snowy hills
(else) vast mountains of snow (endif)
inside the office as well.
(or)
}
#cabinet
(name *) filing cabinet
(openable *)
(container *)
(* is #in #office)
(snowable *)
#folder
(name *) manila folder
(item *)
(* is #in #cabinet)
(snowable *)
#phone
(name *) mobile phone
(item *)
(* is #on #desk)
(snowable *)
#book
(name *) paperback novel
(dict *) book
(item *)
(* is #on #desk)
(snowable *)
#satchel
(name *) satchel
(item *)
(container *)
(* is #on #desk)
(snowable *)
#calculator
(name *) scientific calculator
(item *)
(* is #in #satchel)
(snowable *)
#cooler
(name *) water cooler
(* is #in #office)
(snowable *)
#ball
(name *) basketball
(dict *) basket ball
(item *)
(* is #in #office)
(appearance *) A basketball lies on the floor.
(snowable *)
#chair
(name *) desk chair
(heads *) chair
(* is #in #office)
(snowable *)
#desk
(name *) desk
(heads *) desk
(supporter *)
(* is #in #office)
(snowable *)
%% Give all the portable items their default appearance
($Obj is handled)
(item $Obj)
(can crumble $Obj)
(snowable $Obj)
~($Obj is nowhere)
%% Don't crumble things inside closed containers
(if) ($Obj is #in $Parent) ~(room $Parent) (then)
(open $Parent)
(endif)
(choose crumbling item $Obj)
(collect $Candidate)
*($Candidate is in scope)
(can crumble $Candidate)
(into $List)
(length of $List into $NMax)
(random from 1 to $NMax into $N)
(nth $List $N $Obj)
(on every tick)
(choose crumbling item $Obj)
(par) (The $Obj) gives a soft sigh and falls apart into a pile of powdery white snow.
(collect $Child)
*($Child has parent $Obj)
(into $Children)
(if) (nonempty $Children) (then)
($Obj has parent $Parent)
(if) ($Parent = #player) (then)
($NewParent = #office)
(else)
($NewParent = $Parent)
(endif)
($Obj has relation $Rel)
(The $Children) fall(s $Children) onto
(if) (current room $NewParent) (then)
the floor
(else)
(the $NewParent)
(endif).
(exhaust)
{
*($Child is one of $Children)
(now) ($Child is $Rel $NewParent)
}
(endif)
(now) ($Obj is nowhere)
(if) (snow level is 10) (then)
(game over { SNOW })
(endif)
(snow level is $N)
(accumulate 1)
*(snowable $Obj)
($Obj is nowhere)
(into $N)
Actually, the biggest time sink here was getting the contents of the room to display properly without the player having to examine everything. I’m loving working with Dialog, but I do generally prefer the Inform default of telling the player about everything in sight to Dialog’s assumption that you’ll write carefully-crafted (appearance $) predicates for everything, especially when dealing with a bunch of supporters and containers. (I might start a further thread on this at some point, since I’m interested to know how others are handling it, but I don’t want to derail this one.)