BLAZON
Charles Francis takes you back to the days of yore with this fascinating heraldic pattern maker
BLAZON is a charming, gentle graphics program that produces a series of beautiful and strangely peaceful patterns.
It works by drawing four concentric discs made up of concentric spokes. In each consecutive disc the radius is reduced and the angle between the spokes is increased, thus creating striking screen patterns.
The Electron's palette is then randomised, producing a series of different "heralidic shields" on the screen - hence its name.
Both the mode and the angle between the spokes are also random, so a wide range of patterns is displayed.
The program can be stopped at any stage using SPACE and restarted using the S key.
Program structure | |
40 | Randomises mode selection (1 or 5) |
50 | Gets rid of cursor |
70-160 | Randomises the palette, subject to the condition that the first colour is not the same as the background or the second colour |
180,190 | Selects the angle between the spokes |
200 | The origin is set to the centre of the screen |
210-310 | Draws the concentric set of spokes |
300, 350 | Ensures the program stops if the Space bar is pressed and stars when the S key is pressed. |
330-390 | Flashes the different colour shields |
CEDRIC'S LOST TOYS
By Steve Lucas
Poor old Cedric has lost his toys. Can you help him find them?
They are all hidden in boxes which are labelled 1 to 8 across and A to E down. There are 2 pairs of these toys to find.
When you run the program you'll both be asked to type in your names. Then you must take turns to try to find a matching pair.
Type in the coordinates of the two squares you want to look at (number first). If the two toys that are revealed are identical, the computer increases your score by one and lets you have another turn.
If they're not identical, the toys disappear and the next player has a turn.
The winner is the one who finds the most toys at the end of the game.
Variables | |
name1$, name2$ | Names of the players |
s1%, s2% | Scores of the two players |
j% | Number of pairs of toys found |
z% | Used as a flag |
a$(x) | Graphics for toys |
ob%(x,y) | Arrays to hold toys |
a, b | Random numbers to hide toys |
x, y | Coordinates for graphics |
t$, s$, t, s | Input squares |
fa% | Check for match |
qa, qb, pa, pb | Coordinates of the toys displayed |
Procedures |
|
PROCguess | Input coordinates |
PROCsound | Plays tune |
PROCcheck | Checks contents of array and selects coordinates |
PROCinstructions | Gives instructions |
PROCscore | Sets scores |
PROCdisplay | Display graphics for titles |
LIFE
By Roland Waddilove
LIFE is a program which simulates the growth of a colony of cells.
In effect it's a one player game invented around 1970 by John Conway of Cambridge University. It is basically a pattern generating program.
The growth of the colony is based on a few very simple rules - explained in the program - but the pattens produced can be quite spectacular.
In the version there is a colour option and either you can set up the parent generation yourself or there is a demonstration pattern which runs for about 100 generations!
Variables | |
top, bottom, left, right | Only the area within these limits is looked at increases as program proceeds. This speeds up first few generations |
C% | How many neighbours a cell has |
D% | Colour of cell being looked at |
G% | Number of generations |
M% | Mode selected |
X%, Y% | Coordinates of cursor in PROCsetup |
K% | Key pressed in PROCsetup |
A%, B% | Coordinates of cell to be plotted |
Procedures |
|
PROCinitialise | Switches off cursor keys, set flash rate for colours 8-15, define character 224 |
PROCinstructions | Prints instructions and rules |
PROCchoice | Selects Mode 1 or 4. You can change mode within a procedure |
PROCscreen | Switches off cursor, draws borders of graphics windows, sets limits for size of parent generation |
PROCdemo | Draws demonstration pattern |
PROCsetup | Allows you to set up initial pattern yourself |
PROCstart | Sets variables |
PROClife | Pattern generating program. It looks at the last generation and draws the next according to the rules of LIFE. |
PROCplot (A%,B%,Z%) | Draws a small square using triangles |
PROCwindow(N%) | Sets up graphics window selected |
PROCassemble | Assembles a machine code routine to count number of neighbours a cell has (much simpler in Basic but twice as slow) |
SHEEP NIM
No room for woolly thinking in Rog Frost's game
In this version of the ancient two-player game of Nim you must pit your wits against your Electron.
The game starts with three rows of sheep displayed on the screen. You and your micro take it in turns to remove as many sheep as you like, but you may only disturb one row per move.
The object is to force your opponent to take the last sheep.
The micro keeps the score and lets you know the winner after a series of games.
Don't be sheepish - type in the program and see how NIMble-brained you are.
Variables | |
howmany% | Equals number of games requested |
xpos%, ypos% | Screen coordinates of the arrow |
top%, bottom% | Set limits to positions of arrow |
jump% | Gives the vertical distance the arrow moves |
pass% | Set to 0 to get the correct colours initially set to 1 to allow player to move |
G$ | Key pressed by player |
remove$ | Section of row to be removed |
mem% | Temporary memory to help micro make decision |
Colours | Set up by VDU19 commands at line 350. If you use monochrome, you may want to change them |
Arrays |
|
pos%(3) | Contains the number of characters in each row |
change%(3), flag%(3) | Temporary stores used by the micro when making ts move |
score%(2) | Holds player's and micro's score |
pos$(3) | String containing pos%(3) characters |
Procedures |
|
PROCinit | Sets up arrays, defines sheep and arrow characters, gives instructions and obtains players' names and number of games required |
PROCsetup | Decides on the length of each of the three rows, creates the strings of characters, defines the game variables |
PROCscreen | Draws the three rows of sheep |
PROCplayer | Makes sure the arrow can only point at a aplce where there are still sheep. It allows the player to move the arrow and delete sheep |
PROCcomp | Allows the micro to take sheep |
PROCscore | Keeps and displays a record of scores |
PROCend | Displays a final message |
ERROR HANDLER | Returns to Mode 6 when ESCAPE is pressed and sets the keyboard auto-repeat back to normal |
SKRAMBLE!
Roland Waddilove presents an action-packed machine code game for Electron arcade addicts
Here is another high speed action packed machine code game for all arcade addicts. Your objective is to fly your X1 fighter fast and low over a rolling landscape, penetrating deep into enemy territory.
Destroy as many enemy planes, saucers and missiles as you can, but watch out for the exploding wreckage as you fly past - one touch and you've had it!
The further you progress the harder it becomes as the number of enemy craft increases at an alarming rate.
There is a high score table, selectable start speed and level options, sound on/off and you can use joysticks if you have a Plus 1.
The whole of the game is in machine code for speed and multicoloured graphics.
The screen memory is accessed directly rather than using the Operating System, so it nips along at quite a rate of knots on level 9.
Basic is used for the instructions and high score table, as speed is not essential here. If you have the January Electron User's SPACE BATTLE somewhere on tape or disc, then you can save yourself a lot of typing. Several procedures from this have been taken from this and tagged on to the end of SKRAMBLE so delete the lines you don't need and renumber the rest.
PROCanother, PROChi_score, PROCinitialise, PROCpause, PROCscroll, PROCbig(string$) and PROCtune have been used. Most of the lines are the same but there are one or two minor changes.
There are very few variables as it's machine code; joy is a flag to show whether the joystick option has been chosen, scores%(10) and name$(10) are used in the high score table. S% is the start speed and L% is the level.
Procedures | |
instructions | Prints the instructions, sets the start level and speed, joystick and sound on/off options |
game | Resets the variables, set up the tables used and calls the machine code |
assemble | Assembles the machine code |
another | Calls PROChi_score if the best so far. Prints the high score table |
big | Prints double height letters |