1984 · 4Mation Educational Resources

Flowers of Crystal

This minisite was contributed by air. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/bbc/flowers-of-crystal with me to Gold.

Flowers of Crystal was still on sale on 24 October 2026, 42 years after it was written. 4Mation sold the BBC Micro original, set up to run on Windows, as Retro Flowers of Crystal: a CD-ROM for £15.50, with the story book and the teacher's guide as PDFs.

Buy Retro Flowers of Crystal from 4Mation

A school adventure written in BBC BASIC. The program restarts itself after every journey, and it remembers the player's progress in the only 26 variables a restart does not wipe. Its final picture, the Crystal Flower, is drawn by six small machine-code programs, one for each part of a dream the player collects.

01 · The game

The game

4Mation describes Flowers of Crystal as an adventure about ecology and conservation. The player helps young Jim save the planet Crystal from greedy Mr Grubble.

Super Jim, a figure in red and blue, standing at the Centre

Super Jim at the Centre, where part 1 starts and where he brings the player back after every rescue.

The Face, a yellow face with red eyebrows, a blue nose and a magenta mouth

The Face, who keeps the way into the Danger Area in part 2.

The story book that came with the game tells how, long ago, Rumala hid four things: a bag of soil, a sack of fertiliser, a bottle of magic spell water and an enchanted gold pot. Rumala also hid the Crystal Flower, in the place that later became the Danger Area. Now Mr Grubble runs a bubble-gum factory and a gum forest on Crystal, and his guards, Grubble's Grabbers, patrol it.

Part 1 is about travelling between eight places on Crystal. At the Centre the player hears a weather report and picks equipment: one of a warm coat, a raincoat and a drink; one of four testers; and two of a fright stick, a radio, bubble-gum and a disguise kit. Every journey needs a travel permit from Jim, and on the way the player meets a hazard, something that can go wrong. Seven treasures are hidden in the other places. Bringing all seven back to the Centre ends part 1 with a hint: When you are asked your age you must say 197.

Part 2 is the Danger Area. The Face asks the player's age, and only 197 gets them in. Inside, the player uses spells against the dangers. There are four kinds of spell: moving, vanishing, flower and lucky dip. Flower spells give the six parts of a dream of the Crystal Flower, and the game ends when the player finds the castle's part while holding the other five.

The disc's menu offers the story, the two parts of the adventure, and a program that prints three worksheets for the classroom: Crystal Log, Crystal Notes and Grubble's Gum Forest Grid. Everything on the disc is written in BBC BASIC, eight programs in all, plus fifteen pictures drawn by machine code. Mike Matson wrote it a year after Granny's Garden.

On this page, a name starting with PROC is one of the program's procedures and a name starting with FN is one of its functions. A number like &0E00 or $0E00 is an address in the computer's memory, written in hexadecimal.

02 · The Crystal Flower

Six small machine-code programs draw the Crystal Flower

Each part of the flower dream the player finds in the Danger Area adds a piece to one picture. Each piece is a short machine-code program that prints a list of teletext codes, and the six pieces together make the Crystal Flower.

The Crystal Flower: two red bells on green stems, yellow tassels and green leaves and curls, with Not a Dream in a red label

The emulator's picture of the end of the game, with all six parts found.

Left, the picture as the page makes it. The page reads each piece's list of codes from the game's listing, runs the codes through its own copy of the BBC's screen printing, and draws the result with BBC.drawTeletext. In the jsbeeb emulator, each piece run alone, and all six run together, left exactly the same 1,000 characters on the screen as the page does. So did the whole picture at two moments in the game: Flower Dream 3, with the first and third parts held, and the end.

The BBC Micro's Mode 7 screen is teletext: 40 characters across and 25 rows down, where special codes change the colour and turn letters into chunky block graphics. Every time the player finds a part, a procedure called PROCfl clears that screen and redraws the picture ($6090). It goes through the parts in the order F, L, O, W, E and R, and for each part the player holds it calls that part's program: $0900, $0C00, $0AA3, $0995, $0C8E and $0A19. The variables that record the parts are F%, L%, O%, W%, E% and R%, so in drawing order they spell FLOWER. The game numbers the parts in a different order, the order of the buttons: W%, from the Horror, is part 1, and F%, from the sixth of Rumala's Wisdom Stones, is part 6.

All six programs are the same eleven instructions, each with its own list. A program stores 0 at memory addresses &70 and &71, sends every byte of its list to OSWRCH, the operating system's routine that prints one character, and then jumps over the list to the RTS, the return instruction, placed after it. The jump's distance is the list's length, 127 bytes for F. The list holds exactly what a PRINT statement would send: cursor moves (VDU 31 followed by a column and a row), colour codes and block-graphics characters. Nothing in either adventure reads &70 or &71.

Two pieces need help from BASIC. The F and E pieces each have a row or two that BASIC prints after the machine code has run. W's list prints its rows 5 and 6 twice, and the first copy of row 6 holds row 4's bytes, which the second copy of row 6 then covers up.

The programs sit in memory at &0900-&0AFF and &0C00-&0CFF, just below the BASIC program, which starts at &0E00. The operating system keeps that memory for the cassette and RS423 (serial port) buffers and for redefined characters, and a Mode 7 game that loads nothing from tape needs none of them. The sound program puts the pieces there before it loads and runs the adventure.

03 · The map

Super Jim's map scrolls inside a text window

Typing Map at any place in part 1 shows a Super Jim special: a map 42 rows tall, of which the screen shows 16 at a time. The arrow keys scroll it a row at a time, and the BBC's operating system does the scrolling for the game.

The top of the map: DANGER AREA in a red frame, magenta mountains, the yellow Desert and the blue Lake

The emulator's picture of the map as it opens, with the game's instructions under it.

The map as the page prints it, from the DATA at $39DA in the listing, through the same copy of the screen printing as the flower. Click the map and use the arrow keys, or press the buttons. The page's window matched jsbeeb's after every key press, all 680 characters of it, on 32 screens: the map opened, scrolled south with 28 presses of the up arrow (the last two at the end of the map), and scrolled north with 3 presses of the down arrow.

When the program starts, line 100 builds the map's rows as strings of text from the DATA at line 5140. DATA lines are where a BASIC program keeps fixed lists of values. Each row starts with a marker. A row marked 0 is one plain string. A row marked 1 is squeezed into three strings and a count: a first string, then the second string repeated count times, then a third. The repeated string is usually one character, a space or a solid block, so a long stretch of ground takes only a few bytes. Two rows repeat the six characters of a mountain instead. Twenty-eight of the 42 rows are stored the squeezed way.

A text window is a box on the screen that printing and scrolling stay inside. PROCmap uses VDU 28 to set one over screen rows 0 to 16, and prints the first 16 map rows into it. Pressing the up arrow prints the next map row on the window's bottom line, and the new line at the end of that PRINT pushes everything in the window up one row. So the map slides north and shows more of the south. The down arrow puts the cursor on the window's top line and then moves it up once more (VDU 30, then 11), which pushes the window's contents down, and prints the row above. The game never moves a character itself. Each row begins with code 157, new background, which makes the ground white from there to the right-hand edge.

04 · The journeys

Whether there is a path depends on how far apart two places are

A journey follows a path, has no path, ends in the river, or is sent somewhere else first. The game does not keep a table of which is which. It works the answer out from where the two places are.

a paththe riversomewhere else firstno path

From each place down the side to each place along the top, with the distance in each square, as the game's PROCp and FNl decide it ($2528, $6E2B). The page runs its own copy of their rules on the positions in the listing. Every one of the 56 journeys was made in jsbeeb, and each went the way the table says.

Line 55 reads each place's position from the DATA at line 20000 ($6B96). A function called FNl measures the distance between two places: a straight line, with the left-to-right part counted at two thirds of its size, rounded down to a whole number. The plot draws the places that way, so its distances are FNl's before the rounding. Choose two places, or click them on the plot.

Then PROCp decides, using the distance and the places' numbers, which run from the Centre (0) to the Mountains (7). It checks for the river first. A distance of 6 between places whose numbers add up to 9, or a distance of 7 between places that add up to 10, drops the player in the river, and Super Jim fishes them out, back at the Centre. Only Forest to Desert and Forest to Mountains do that. A distance of 10 between places that add up to 4, which means the City and the Forest, sends the player to the Hills first. A distance of 9, the Centre and the Forest, sends them to the Factory first. After those checks, there is a path for a distance of 3, 4 or 6, for a distance of 5 when the two numbers add up to an even number, and for a distance of 10 when they add up to 5. Anything else has no path: the game asks Are you sure?, and the journey meets two hazards instead of one.

These rules leave the Mountains with no path from anywhere, and the Desert with only one, from the Lake. The Lake is 10 from the City and 10 from the Factory, but only the City gets a path, because the rule for 10 picks out the City and the Lake by the sum of their numbers. Typing River or Danger Area as a place to go is refused, and Danger Area gets It is FORBIDDEN. flashing.

05 · Weather and hazards

Only the weather in the report can happen

Every visit to the Centre gives a weather report of sun, snow or rain. Until the next visit, a journey can meet only that weather, never the other two. The player can carry only one of a warm coat, a raincoat and a drink, so the report says which to take: the warm coat for snow, the raincoat for rain and the drink for sun.

The page's copy of PROCw and PROChaz ($2B2E, $27FD), with the report's words from line 20100 ($6D6F) and each hazard's first warning from the DATA from line 3020 ($2C10), read from the listing. The game's own PROChaz, run in jsbeeb 2,000 times on a path and 2,000 times without one for each of the three kinds of weather, chose only the hazards the page chooses, never the same one twice on a journey, and each about as often as the others.

PROCw picks one of six reports with RND(6), a random whole number from 1 to 6. Two reports are for sun, two for snow and two for rain. PROCw then sets one of three variables: M% for sun, H% for snow or R% for rain. These are resident integers, the 26 variables A% to Z% that BBC BASIC keeps even when a program restarts. PROChaz picks each hazard with RND(9), trying again until it gets one not yet picked on this journey. Snow is thrown back unless H% is set, rain unless R% is, and sun unless M% is, and a thrown-back hazard counts as picked. So each hazard of a journey is one of seven, all equally likely, and the forecast weather is one of the seven. A journey on a path meets it one time in seven, and a journey with no path two times in seven. Over a game all nine hazards come up, because each kind of weather has two of the six reports.

HazardThe two choicesWhat decides it

The hazards of lines 3020-3100. The choices are the game's own words; what happens is from the code that follows each line of DATA.

The equipment decides most hazards, and the rest come down to RND(4), a 1-in-4 chance. One time in four the snow gets the player lost, the sun swells their tongue, the Blids capture them, or the Fright Freak ends the game. Three outcomes tell the player that some of their belongings are gone, and then take every one (all of the belongings).

06 · Fibber of the Lake

The lie detector reads Fibber's own answer sheet

At the Lake, Fibber gives six instructions, and the player has to do the opposite of each one that is a lie. The lie detector, found in the City's yellow building, answers TRUTH? for each instruction.

The page's copy of FNLake's questions ($51CF, $52DE, $53FB), with the five instructions, their choices, and which ones are lies, read from the DATA at $56BE. In jsbeeb the detector answered NO to the cave, the steps and the mist, and YES to the fence and the hill, and answering by it beat Fibber.

The first instruction is always You will have to leave my lake., and Stay is the right answer. The other five come from line 12280 in a random order, each stored with a 1 for a lie or a 2 for the truth. For a lie the second choice is right, and for the truth the first. The detector's TRUTH? shows NO or YES from that same number, so the detector reads the answer straight from Fibber's list. A wrong choice gets Caught you out! That was a fib! and the visit ends. Getting all five right gets Clever you! You've beaten me., and the special water, if the player brought the water tester.

Before the questions, Fibber says that three of his six instructions will be the opposite of what they should be. Four of them are lies (Fibber's warning).