★ AMSTRAD CPC ★ GAMESLIST ★ TREASURE HUNT (AMSTRAD ACTION) (c) AMSTRAD ACTION ★

Amstrad Action
★ 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 ★ 

Anatomy of a type-in

Writing games is not just a matter of capable programming: it requires good ideas oil which games can be based to make them fun to play. Each game needs a good "story" to illustrate it.

Td long been trying to produce a maze-based, Pacman-style game, but couldn't solve the problem of collision detection (i.e. how to stop my controlled character walking through maze walls). Then I spotted a short machine-code routine by RpM (that's Richard Monteiro, of sainted memory, and it was in AA22 -ed.). This identified characters printed on the screen. I was away!

I incorporated RpM's code, using it to stop the characters falling through barriers and to detect collisions between the character and spikes or gems. Using the INKEY command to detect key presses and joystick movement I gave the player control, positioning the character with the LOCATE command.

As the computer scans the keyboard fifty times every second to see whether a key is being pressed, each key has two states: pressed and not pressed, represented by 0 and -1 respectively. Each key also has a number identifying it.

So INKEY (47)=0 THEN... to the com puter means, If key number 47 (space bar) is being pressed then...'

The character's position is determined by two variables, x and y. In response to the player's control the character can be deleted, its co-ordinates (x and y) changed, and the character reprinted in a new location. For instance, LOCATE, x.y:?" " deletes the character; x=x+l changes its position (in this case, moves it right); LOCATE x,y:? reprints the character.

The treasure hunter itself (don't ask me what kind of a beast it is!) is composed of graphics characters which I designed myself using the SYMBOL AFTER and SYMBOL commands. (It's a pity these aren't clearly explained in the User Instructions, by the way - you'll have to look them up in books and mags.)

'The characters are printed alternately in the same location (x.y). giving a near animation effect. This uses the NOT command (based on the electronics not gate), working on the principle that NOT 1-0) and NOT 0-1.

'I gave the variable 'a' an initial value of 0 (line 310), and included the command a=NOT a (line 660} in the pro gram. The value of 'a' alternates between 0 and -1, and the character printed depends on these values (lines 510 and 520).

'I added some sound commands to produce short notes as the character falls or rises, the tone depending on the position of the character (variable y).

'Then I added colour using then INK, PEN and BORDER commands, all of which are well explained :n the User Instructions. I had to exercise great care over my choice of colours since I was working with a green screen monitor.

'Hope you enjoy playing Treasure Hunt as much as I did writing it!'

AA

TREASURE HUNT (AMSTRAD ACTION)
(c) AMSTRAD ACTION

AUTHOR: BENEDICT GARRETT

★ NOTE: Benedict Garrett, 16, is a sixth former at Launceston College, Cornwall, studying A level maths, physics and chemistry. He hopes to study computer science at university.

★ YEAR: 1988
★ LANGUAGE:
★ GENRE: BASIC
★ LiCENCE: LISTING

 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» Treasure  Hunt    (Amstrad  Action)    ENGLISHDATE: 2018-08-03
DL: 269
TYPE: ZIP
SiZE: 5Ko
NOTE: Uploaded by CPCLOV ; Extended DSK/40 Cyls
.HFE: Χ

» Treasure  Hunt    (Amstrad  Action)    LISTING    ENGLISHDATE: 2018-08-03
DL: 199
TYPE: text
SiZE: 4Ko
NOTE: Uploaded by CPCLOV ;

Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce jeu ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 273 millisecondes et consultée 952 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.