★ AMSTRAD CPC ★ GAMESLIST ★ COMMANDO JUMP (c) AMSTRAD COMPUTER USER ★

Amstrad Computer User
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

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.

Progam details

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.
This method involves making sure that the sound queue is empty before the man's next position is plotted. The check is made at line 6140 using the keyword SQ to check on channel 1 which is used to produce the notes.

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.

Subroutine structure

  • 20 Main program 1000 Sets the colours and initialises graphics characters.
  • 1500 Initialises program variables.
  • 2000 Prints the wall.
  • 3000 Jump logic.
  • 4000 Countdown.
  • 5000 Jump up the wall.
  • 6000 Prints the man over the wall.
  • 7000 Ends game.

Because of its complicated logic, subroutine 3000 is worth looking at in more detail.

  • 3000-3080 Prints initial messages and calls the countdown routine.
  • 3090 Initial jump logic.
  • 3100-3240 Scramble over remainder of wall.
  • 3250-3315 Fall back down wall.
  • 3320-3999 Updates the jump counter and tests for loop end.

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.
You could also change the effect of the initial keypress by altering the amount that T is multiplied by in line 5010. Increasing the value of the constant T is multiplied by (currently set to 28) means that more notice is taken of the speed of the initial reaction.

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.
If the man is not over within the time limit he will slither back down the wall and you can have another go. In all you have a total of 10 tries and at the end of the game your score is displayed. Even if you are very slow off the mark, do press a key - until you do you cannot move on to the next try.
If, on the other hand, you hit a key just before the "GO" signal the computer will accuse you of cheating and you will lose that turn. Have fun.

Amstrad User September 86

COMMANDO JUMP
(c) AMSTRAD COMPUTER USER

AUTHORS: Kay Ewbank and S.M. Gee

★ YEAR: 1986
★ LANGUAGE:
★ GENRE: BASIC
★ LICENCE: LISTING

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» Commando  JumpDATE: 2013-08-30
DL: 60 fois
TYPE: ZIP
SIZE: 20Ko
NOTE: 40 Cyls
.HFE: OUI

» Commando  Jump    LISTING    ENGLISHDATE: 2016-10-26
DL: 30 fois
TYPE: text
SIZE: 4Ko
NOTE: Uploaded by hERMOL

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)

QUE DIT LA LOI FRANÇAISE:

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
Page créée en 147 millisecondes et consultée 763 fois

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.