|★ AMSTRAD CPC ★ GAMESLIST ★ COMMANDO JUMP (c) AMSTRAD COMPUTER USER ★|
|Amstrad Computer User|
Commando Jump is a game written in Basic which is intended to serve a dual purpose - amusement from playing the game itself and improvement of your programming skills from understanding the techniques it uses. Typing in games for yourself is a good way to absorb Basic.
If you are a beginner you will soon become familiar with its syntax and structure. If you already have some experience you will pick up tips you can incorporate into your own programs.
This game, a test of both reaction time and dexterity, is quite compulsive to play. It can be modified to make it suitable for young children who find it a good introduction to using a computer keyboard. A bright red wall of varying height appears with a little man figure beside it. A countdown "Ready ... Steady . . . GO" is flashed on the left of the screen and on the word "GO" the man has to jump as high as possible and then scramble up the remainder of the wall. Your success depends entirely on your quick wits and nimble fingers. Details of how to play the game are given later.
This is a fairly straightforward application of low resolution dynamic graphica. It runs in Mode 1, a four-colour mode, and takes advantage of the Amstrad's flashing colours. The words "Ready", "Steady" and "GO" are made to flash on and off by making them alternate between magenta and cyan -they disappear as cyan is used as the background colour. The choice of colours takes account of the fact that some Amstrads will be connected to green screens.
The wall is drawn using a brick character defined in line 1120 (as SYMBOL 240) with the top row of dots left in the background colour to give the effect of mortar. The man character is defined in line 1130 as SYMBOL 241 so the man is being drawn wherever you see a reference to CHR$(241).
A realtime program
An important feature of Commando Jump is the way in which it tests your reaction time by using the Amstrad's internal timer to see how quickly you press a key after the word "GO" appears on the screen. The faster you press the key, the higher your initial jump is.
The timer counts in units of 1/300ths of a second and in this game is scaled to count in seconds. The variable STIME is used to hold the value of the internal timer just before the word "GO" appears on the screen (line 4130). This is used to calculate the elapsed time since the start of the jump. A very difficult problem in writing animation games of any sort is in synchronising sound and vision. Two methods have been used here. The first is a simple delay loop (as in line 5070) which makes the upward jump of the man occur roughly in step with the rising tones produced in line 5060. The second method is more sophisticated and is used for the fall down the far side of the wall once a successful jump has been made.
Play would lose a lot of its challenge but for the fact that the repeat key feature of the keyboard is disabled, so that the player has to hit a key repeatedly in order to make the man climb higher up the wall. Switching off the repeat key is achieved in line 1530 with the command: SPEED KEY 1,200 and restoring it at the end of the game is done in line 7810 by the command: SPEED KEY 30,2.
While testing the program, it is suggested that you type in KEY 0, "SPEED KEY 30,2",+CHR$(13). This resets SPEED KEY to its default values when key 0 on the numeric keypad is pressed. The reason for this is that if you have to break out of the program during its development while the keyboard is set for instant response you will find it is very difficult to type.
Because of its complicated logic, subroutine 3000 is worth looking at in more detail.
Scope for alteration
You might like to make this game easier so that it could be played by small children - or more difficult for computer whizz kids with exceptionally well tuned reaction times. The most straightforward way to change it is to alter the number of keypresses needed to scale one brick higher, set in line 3190. The value is currently 0.25, which means that it takes four keypresses for the man to climb each brick.
How to play
Now that you've understood the program the only information you still need is the rules for playing the game. On the word "GO", and no sooner press any key to make the man jump. The height of the initial jump depends entirely on the delay between the signal appearing and your key press. The quicker you react, the higher the man will jump. The time left to scale the wall is displayed on the screen and while the rest of your five seconds tick away you must keep on pressing any key to get the man over the wall. Only complete keypresses (that is press and release) count, so just keeping your finger on a key will not help.
Amstrad User September 86
L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!
CPCrulez[Content Management System] v8.7-desktop/cache
L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.