← Home

oubliette

Source code — Play

"Oubliette" by Wiley Wiggins.

Part - The World

A memory is a dark room. "A narrow stone cell. The walls are close enough to touch on both sides. Far above, a square of gray light marks the hole you fell through. It is too high to matter."

[That light vanished long ago but sometimes the prisoner still sees it.]

Part - On Knowing

A thing can be unfound, found, or known. A thing is usually unfound.

A thing has a text called the felt name.

A person can be awake or half-dreaming. A person is usually half-dreaming.

Rule for printing the description of a dark room:
	if the player is half-dreaming:
		say "It's been dark for so long that you can't stop seeing, even with eyes tightly shut. [line break]At intervals you remember to count the things you know to be real.[paragraph break]";
		now the player is awake;
	otherwise:
		say "[one of]You see a field of sunflowers. Every head is turned toward you. Then it is dark again.[or]For a moment you are standing in a lit corridor that stretches in both directions forever. It collapses.[or]You see your own hands in front of you, clearly, in detail. They are not your hands. Then nothing.[or]A bright room. A table set for dinner. Someone is sitting across from you. You almost see their face. Gone.[or]Suffocating absence of light. Wet stone hurts bones you thought were numb. Still air.[purely at random][paragraph break]";
		if the number of known things enclosed by the location is greater than 0:
			say "You blink it away. What is solid, persistent: [the list of known things enclosed by the location]. The dark.";
		otherwise if the number of found things enclosed by the location is greater than 0:
			say "You blink it away. Your hands remember: [the list of found things enclosed by the location]. That is all.";
		otherwise:
			say "You blink it away. Nothing is real but the stone in the dark, gravity, and time, which you know as hunger and as dripping."

Feeling is an action applying to nothing. Understand "feel" and "feel around" and "feel room" as feeling.

Carry out feeling:
	let the next thing be nothing;
	repeat with item running through unfound things enclosed by the location:
		if the item is not a person and the item is not scenery and the item is not the carcass and the item is not the bone pile:
			now the next thing is the item;
			break;
	if the next thing is nothing:
		if the number of found things enclosed by the location is greater than 0:
			say "Nothing new. But you can still feel [the list of found things enclosed by the location].";
		otherwise if the number of known things enclosed by the location is greater than 0:
			say "Your hands find nothing new. You share this cell with [the list of known things enclosed by the location].";
		otherwise:
			say "Your hands find nothing.";
	otherwise:
		if a random chance of 1 in 2 succeeds:
			now the next thing is found;
			say "Your fingers find [a next thing].[no line break]";
			if the number of known things enclosed by the location is greater than 0:
				say "[line break]You know now that you share this cell with [the list of known things enclosed by the location].";
		otherwise:
			say "[one of]Your hands find only stone.[or]You reach further. Nothing yet.[or]Your fingers trail across the floor. Grit, dampness, nothing else.[purely at random]".

Part - The Chain

[The chain was here first. Sometimes the prisoner forgets if they are also the chain, and if they(?) have always been here]

A cold ring is in a memory. The description of a cold ring is "Iron, stinging cold, un-negotiable, circling your ankle. It is connected to something — a heavy link trails away from it into the dark."
The felt name of a cold ring is "shackle".
Understand "shackle" as a cold ring when a cold ring is known.
Understand "cold ring" and "ring" as a cold ring when a cold ring is not unfound.

A heavy chain is in a memory. The heavy chain is fixed in place. The description of a heavy chain is "Iron links, each one as thick as your thumb. It runs from the shackle on your ankle to a bolt in the floor. Long enough that the walls stop you before it does."
The felt name of a heavy chain is "chain".
Understand "chain" and "links" and "bolt" as a heavy chain when a heavy chain is known.
Understand "heavy chain" and "link" as a heavy chain when a heavy chain is not unfound.

Part - The Bowl

A shallow dip is in a memory. The description of a shallow dip is "[if the shallow dip is full]A clay bowl, chipped at the rim. There is water in it. Cool and clean.[otherwise]A clay bowl, chipped at the rim. Empty. The clay is still damp inside."
The shallow dip can be full or empty. The shallow dip is empty.
The felt name of a shallow dip is "water bowl".
Understand "bowl" and "water bowl" as a shallow dip when a shallow dip is known.
Understand "shallow dip" and "dip" as a shallow dip when a shallow dip is not unfound.
Understand "water" and "drip" as a shallow dip when a shallow dip is not unfound.

Part - The Marks

[The last prisoner cut these with a sharpened coin
The marks stop at
forty-seven. ]

A rough pattern is in a memory. The rough pattern is fixed in place. The description of a rough pattern is "Scratches in the stone. Regular, grouped in fives. You count them with your fingertip. Forty-seven."
The felt name of a rough pattern is "tally marks".
Understand "marks" and "tally" and "tally marks" as a rough pattern when a rough pattern is known.
Understand "rough pattern" and "pattern" as a rough pattern when a rough pattern is not unfound.

Part - The Stone

[A loose stone, pushed inward by a root that was once fed by the drip that the prisoner now steals.]

A wobbling surface is in a memory. The wobbling surface is fixed in place. The description of a wobbling surface is "One stone in the wall shifts when you press it. Just slightly. It is the only thing in this room that gives."
The wobbling surface has a number called the work. The work of the wobbling surface is 0.
The felt name of a wobbling surface is "loose stone".
Understand "stone" and "loose stone" as a wobbling surface when a wobbling surface is known.
Understand "wobbling surface" and "surface" as a wobbling surface when a wobbling surface is not unfound.

Part - The Cell Itself

The cell walls are scenery in a memory.
Understand "walls" and "wall" and "ceiling" and "stones" and "cell" as the cell walls.
Understand "stone" as the cell walls when the wobbling surface is not known.
Understand "hole" and "light" and "grate" and "square" as the cell walls.

Instead of touching the cell walls:
	say "[one of]Your palms flat against the stone. Slick and cold and close.[or]You press both hands to the wall. The stone is alive with damp. Somewhere behind it, the earth.[or]Your fingers trace the joints between stones. Mortar crumbles under your nail.[purely at random]".

The cell floor is scenery in a memory.
Understand "floor" and "ground" and "mud" and "grit" and "dirt" as the cell floor.

Instead of touching the cell floor:
	if the carcass is in a memory and the carcass is floor-hidden:
		now the carcass is floor-found;
		say "Your hand finds something on the floor. Fur — or feathers. Small, cold, dead. [A carcass].";
	otherwise if the bone pile is in a memory:
		say "[one of]Cold stone. Your fingers come away wet.[or]The floor is slick in places. Water pools where the stone has worn.[or]Damp stone, rough under your palms. The cold comes up through it.[purely at random] Scattered among the grit — small bones.";
	otherwise:
		say "[one of]Cold stone. Your fingers come away wet.[or]The floor is slick in places. Water pools where the stone has worn.[or]Damp stone, rough under your palms. The cold comes up through it.[purely at random]".

The close dark is scenery in a memory. The printed name of the close dark is "dark".
Understand "dark" and "darkness" and "shadows" and "shadow" and "air" as the close dark.

Instead of touching the close dark:
	say "[one of]Your hands pass through nothing. The dark is not a thing. But it presses down on you like a heavy mass.[or]You reach out. There is only space, then stone.[or]You hold your hand in front of your face. You cannot see it. You are not certain it is there.[purely at random]".

Part - The Feeding

The carcass is a thing in a memory.
The carcass can be floor-found or floor-hidden. The carcass is floor-hidden.
Understand "carcass" and "rat" and "pigeon" and "bird" and "dead" and "animal" as the carcass.

The bone pile is a thing in a memory. The bone pile is fixed in place.
The bone pile has a number called the bone count. The bone count of the bone pile is 0.
The description of the bone pile is "Small bones. [if the bone count of the bone pile is 1]A tiny ribcage, a skull no bigger than your thumb.[otherwise]They have accumulated. Tiny ribcages, skulls no bigger than your thumb. You have lost count.[end if]".
Understand "bones" and "bone" and "pile" as the bone pile.

The player has a number called the nutrition. The nutrition of the player is 200.

Instead of eating the carcass:
	now the nutrition of the player is 200;
	now the carcass is off-stage;
	if the bone pile is off-stage:
		now the bone pile is in a memory;
	increase the bone count of the bone pile by 1;
	say "[one of]You eat. You do not care what it is. Your teeth crack through small bones and thin skin. You swallow. The bones you leave on the floor.[or]You eat and are thankful for the dark. When you are done you wipe your mouth on your arm and set the bones down carefully, to appease the other small things that feed in the dark.[or]You eat because you must. Your shriveled tongue cannot taste, it numbly prods its way through the matter. The bones join the others on the floor.[purely at random]".

Instead of touching the carcass:
	say "[description of the carcass][paragraph break]".

Instead of eating the bone pile:
	say "You put one in your mouth. It splinters. There is nothing left on it."

Instead of eating something:
	say "You can't eat that."

Part - Adjustments


After deciding the scope of the player:
	repeat with item running through not unfound things enclosed by the location:
		place item in scope;
	repeat with item running through scenery things enclosed by the location:
		place item in scope;
	if the carcass is in a memory and the carcass is floor-found:
		place the carcass in scope;
	if the bone pile is in a memory:
		place the bone pile in scope.

Instead of touching a found thing (called the subject):
	say "[description of the subject][paragraph break]";
	if the subject is found:
		now the subject is known;
		if the felt name of the subject is not "":
			now the printed name of the subject is the felt name of the subject;
			say "You know this now — [printed name of the subject].";

Instead of touching a known thing (called the subject):
	say "[description of the subject][paragraph break]".

Understand "feel [something]" as touching.

Instead of touching the player:
	if a cold ring is unfound:
		now a cold ring is found;
		say "You clasp your hands and then let them trace back to your icy, damp body, then down the bones of your legs. There is something around your ankle — [a cold ring].";
	otherwise if a cold ring is found:
		say "Your ankle. The cold ring is still there.";
	otherwise:
		say "You are here. The shackle. The walls. You.".

Understand "feel body" as touching.
Understand "body" as yourself.

Following the link is an action applying to nothing. Understand "feel link" as following the link.

Carry out following the link:
	if a heavy chain is unfound:
		now a heavy chain is found;
		say "You follow the link trailing from the shackle. Your fingers close around cold iron — [a heavy chain], running away from you into the dark.";
	otherwise if a heavy chain is found:
		try touching the heavy chain;
	otherwise:
		try touching the heavy chain.

Rule for printing a parser error:
	say "[one of]That means nothing here.[or]The dark doesn't understand.[or]You try. Nothing happens.[purely at random]" instead.

Instead of listening: say "A slow drip argues that time still passes and drags your body with it back towards the dark."
Instead of smelling:
	if the carcass is in a memory:
		say "Stone, damp, and something else — the sweet, thick smell of something dead.";
	otherwise:
		say "Stone, damp, and something faintly metallic. The vinegar of your own filth."
Instead of taking inventory: say "How could you possess anything?"
Instead of waiting: say "[one of]You wait. Time passes, or doesn't.[or]You hold still. The dark holds still back.[or]You count breaths. You lose count.[or]Nothing changes. You are not sure anything was going to.[purely at random]".

Shouting is an action applying to nothing. Understand "shout" and "scream" and "yell" and "cry out" and "call out" and "hello" as shouting.
Carry out shouting: say "[one of]Your voice hits the walls and comes back wrong. Then silence, deeper than before.[or]The sound fills the cell for a moment. Stone swallows it. No one answers.[or]You scream until your throat burns. The dark absorbs it like it absorbs everything.[purely at random]".

Instead of pushing a wobbling surface:
	increase the work of the wobbling surface by 1;
	if the work of the wobbling surface is 1000000000:
		say "The stone comes free. It falls behind the wall and you hear it break on something far below. There is a gap now. Cool air moves through it. You reach inside and your fingers close around something — a root, thick and alive, pushing through the earth. It does not belong here. Neither do you.";
		now the printed name of the wobbling surface is "gap in the wall";
		now the description of the wobbling surface is "A hole where the stone was. Earth behind it, and a root growing through. Cool air.";
		now the felt name of the wobbling surface is "gap in the wall";
	otherwise:
		say "[one of]You press the stone. It shifts. A scrape, a tiny give. Then nothing more.[or]You push harder. It moves — barely. Grit falls somewhere behind it. The gap is not big enough for anything.[or]You throw your weight against it. It rocks and settles. [or]You can't tell if the stone has moved or not.[purely at random]".
Instead of pulling a wobbling surface: try pushing a wobbling surface.
Instead of turning a wobbling surface: try pushing a wobbling surface.
Instead of attacking a wobbling surface:
	increase the work of the wobbling surface by 1;
	if the work of the wobbling surface is 100000000000000000000000000000000000000000:
		try pushing the wobbling surface;
	otherwise:
		say "You strike the stone. You feel it radiate through the bones in your fingers, despite the numbing cold".

[A tiny droplet of gray condensation forms on the stone ceiling directly above a shallow clay bowl.]

Every turn:
	if the remainder after dividing the turn count by 5 is 0:
		if a shallow dip is unfound:
			say "[line break]Somewhere nearby, a drip. Then silence.";
		otherwise if a shallow dip is found:
			say "[line break]A drip strikes the shallow dip near the wall. A pause. Then another.";
		otherwise:
			if the remainder after dividing the turn count by 10 is 0 and the shallow dip is empty:
				now the shallow dip is full;
				say "[line break]A drop falls from the ceiling into the bowl. The water trembles and goes still. The bowl is full again.";
			otherwise:
				say "[line break][one of]Drip. You have stopped counting them.[or]Your weak heartbeat and the soft tap of the drip seem in sync.[or]A drop strikes the bowl. The sound is the only clock you have.[purely at random]".

Every turn:
	if the remainder after dividing the turn count by 40 is 0:
		if the carcass is off-stage:
			now the carcass is in a memory;
			now the carcass is floor-hidden;
			if a random chance of 1 in 2 succeeds:
				now the printed name of the carcass is "dead pigeon";
				now the description of the carcass is "A pigeon. Its neck is broken. The feathers are damp and matted. It is still faintly warm.";
			otherwise:
				now the printed name of the carcass is "dead rat";
				now the description of the carcass is "A rat, stiff and cold. Its fur is coarse under your fingers. The tail curls like a question.";
			say "[line break][one of]Something strikes the floor from above. A dull, wet sound.[or]There is a grinding sound somewhere in the dark over head and then something hits the floor near you.[or]You hear something small and soft fall from the opening above. It hits the stone and does not move.[purely at random]".

Every turn:
	decrease the nutrition of the player by 1;
	if the nutrition of the player is 100:
		say "[line break]Your stomach clenches. You had almost forgotten that part of yourself.";
	if the nutrition of the player is 50:
		say "[line break]Your hands are shaking. It is harder to think.";
	if the nutrition of the player is 20:
		say "[line break]You are becoming lighter. The edges of your body are dissolving into the dark.";
	if the nutrition of the player is 0:
		say "[line break]The hunger has eaten everything. There is nothing left to feel with. The dark pours in through the spaces where you used to be.";
		end the story saying "The dark takes you".

Instead of drinking the shallow dip:
	if the shallow dip is full:
		now the shallow dip is empty;
		say "[one of]You greedily suck at the damp puddle. It changes nothing.[or]The water is cold. You drink it all. The bowl is empty again.[or]You bring the bowl to your lips. It tastes the way the cell smells. You drink it anyway.[purely at random]";
	otherwise:
		say "The bowl is empty. You wait."

Pouring is an action applying to two things. Understand "pour [something] in [something]" and "pour [something] into [something]" and "pour [something] on [something]" as pouring.

Check pouring:
	if the noun is not the shallow dip:
		say "That is not something you can pour." instead;
	if the shallow dip is empty:
		say "The bowl is empty." instead.

Carry out pouring:
	if the second noun is the wobbling surface and the printed name of the wobbling surface is "gap in the wall":
		now the shallow dip is empty;
		increase the waterings of the wobbling surface by 1;
		if the waterings of the wobbling surface is 100000:
			say "You pour the water into the gap. You hear it trickle down through earth and stone. Then a sound — a slow, deep cracking. The root has been growing. You feel it now, thicker, forcing the stones apart. A section of wall shifts and falls outward. Cool air rushes in. There is a space beyond. You could fit through it.";
			now the wobbling surface is breached;
		otherwise:
			say "[one of]You pour the water into the gap. It trickles away into the earth behind the wall.[or]The water disappears into the crack. You imagine the root drinking it.[or]You empty the bowl into the gap. Somewhere behind the stone, water meets earth.[purely at random]";
	otherwise:
		now the shallow dip is empty;
		say "You pour the water out. It runs across the stone and is gone."

The wobbling surface has a number called the waterings. The waterings of the wobbling surface is 0.
The wobbling surface can be breached or unbreached. The wobbling surface is unbreached.

Escaping is an action applying to nothing. Understand "go through gap" and "escape" and "leave" and "go out" and "climb out" and "go through hole" and "enter gap" as escaping.

Check escaping:
	if the wobbling surface is not breached:
		say "There is nowhere to go." instead.

Carry out escaping:
	say "You move toward the opening. Cool air on your face, the smell of earth and rain. You reach through — and the chain pulls taut against your ankle. You strain against it. The iron does not give. You can feel the outside but you cannot reach it.";
	end the story saying "You are still here".

When play begins:
	now the carcass is off-stage;
	now the bone pile is off-stage;
	say "I tremble at each breath of air [Line Break]And yet can heaviest burdens bear.[paragraph break]"

Test me with "feel self / feel ring / feel ring / feel shackle / feel / feel heavy chain / feel heavy chain / feel chain / feel / feel dip / feel / feel pattern / feel / feel surface / feel / feel walls / feel floor / feel dark / feel stone / feel water / feel hole".