Reality Ends: Text Landscape Generator   Leave a comment

I’m still prodding without much luck at the main game, so I’d rather make a bit more progress before I report on that. However, I worked out how the room descriptions were generated, and I thought it was worth recording for posterity.

The game is entirely on a grid 12 rows high and 18 columns across. You start in the lower left corner and the endgame (the Citadel of Baldir) is 1 room down from the upper right corner. Starting from the beginning and going east, the room descriptions look like this:

YOU ARE IN A FOREST. IT IS MOUNTAINOUS AND VERY COLD. THE AIR IS CRYSTAL CLEAR. PERPETUAL TWILIGHT PREVAILS.

YOU ARE IN A FOREST. IT IS MOUNTAINOUS AND WARM. THE FOG IS VERY THICK. PERPETUAL TWILIGHT PREVAILS.

YOU ARE IN A FOREST. IT IS HILLY HERE AND VERY COLD. THE AIR IS CRYSTAL CLEAR. PERPETUAL TWILIGHT PREVAILS.

YOU ARE IN A FOREST. IT IS HILLY HERE AND WARM. THE FOG IS VERY THICK. PERPETUAL TWILIGHT PREVAILS.

There are some repeating patterns here: the description is really five parts, filled in Mad Libs-style:

YOU ARE {A}. IT IS {B} HERE AND {C}. THE {D}. {E}.

They aren’t filled in at random; it’s based mathematically on where you are in the grid, in a way easy for the computer to calculate.

Position {A}

The grid has a “forest zone”, “grasslands zone”, and “dead place zone” each taking up a third of the map.

Left: YOU ARE IN A FOREST. Middle: YOU ARE ON GRASSLANDS. Right: YOU ARE IN A DEAD PLACE.

This makes a fair amount of sense, giving the impression as one approaches the Citadel of Baldir (the place of dooooooom and all that) the landscape gets steadily worse.

Position {B}

This time the grid is divided into strips two columns wide each, and there is a repeat every six columns.

The blue areas: IT IS MOUNTAINOUS. The pink areas:
IT IS HILLY HERE. The yellow areas: THE LAND IS FLAT.

Perhaps this is meant to suggest some sort of rippling earthquake that originated at the far east of each biome.

Position {C}

The “AND ” that comes after the “level of hilliness” part of the description is a repeat every two columns.

Dark blue: AND VERY COLD. Light yellow: AND WARM. Dark red: AND QUITE HOT.

Even though this one was a regular pattern, during gameplay it was the one I felt most was switching at random due to the asymmetry in placement.

Position {D}

The descriptions of biome, hilliness, and temperature are followed here by air thickness. The pattern repeats every two columns.

Light blue: THE AIR IS CRYSTAL CLEAR. Grey: THE RAIN IS FALLING STEADILY. Black: THE FOG IS VERY THICK. Green: THE WIND IS BLOWING.

Position {E}

This position reflects whether the sun can be seen or not, and is a simple alternating pattern by rows.

Grey: PERPETUAL TWILIGHT PREVAILS. Orange: THE SUN CAN BE SEEN FAINTLY.

Thoughts

The setup here feels related to procedural generation, the algorithmic generation of content. I suppose, technically, it is? — but usually, procedural generation is done in a way that simulates naturalness and hides pattern, and here the intent is to create pattern, and at least some of the patterns are done to provide a logic to the story (progressing from Forest to Dead Place, flickering between visible sun and darkness). You could say this is standard procedural generation, but without the usual addition of a random element to twist things out of place.

Theoretically, really quite something for 1980! In practice … well, the landscape description is unimportant to gameplay, so I fairly quickly started to ignore all the description text. Still, I would call it a worthwhile experiment.

For Further Reading

James Ryan recently posted his dissertation Curating Simulated Storyworlds dealing with the generative world problem in regards to narrative. It’s nearly 800 pages long, but if you’re short on time, jump to Chapter 13 (the Conclusion) which gives a good idea of what both game designers and theoreticians are dealing with.

Posted February 27, 2019 by Jason Dyer in Interactive Fiction

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: