Personal Computer News


The Castle

 
Published in Personal Computer News #094

Dodge spears, crevasses and rolling barrels in this entertaining version of the Hunchback, written to Andy Charalambous.

Getting The Hump

Dodge spears, crevasses and rolling barrels iin this entertaining version of the Hunchback, written by Andy Charalambous

The Castle, for the Sinclair Spectrum is a version of the Hunchback arcade game, where you have to make your way through a number of screens to rescue Esmeralda.

In the case of The Castle there are seven screens with varying difficulty levels. You play the part of the hunchback, and you must move along the castle walls, avoiding spears, crevasses and rolling barrels.

You start with three lives, and you're awarded one extra life for rescuing Esmeralda. There's a time limit for each screen, and failure to complete the screen within this limit results in your losing a life.

A super bonus is awarded if you complete five screens without losing a life, but you'll have trouble doing this.

The game is written in Basic, but is quite fast enough to keep you busy - the animation of the hunchback is particularly worth watching.

Variables Used

h Jump variable. When h=0 the Hunchback jumps up, when it's 1 he goes down
q$ Instructions
t Time left
sb Number of screens cleared without losing a life
Li Lives left
Sc Score
p Direction Hunchback is facing in
j,b Coordinates of Hunchback
x,y Coordinates of obstacles
Wa Screen
l Position of rope (screen 2)
No Horizontal position of guard with spear up

Program Notes

2-30 Prints instructions
50-80 End of game routine
90 Set up UDGs
100-111 Data for graphics
150 Sets up screen attributes
200-299 Subroutine for screen 1
300-370 Subroutine for screen 2
410-415 Subroutine for screen 3
420 Fall routine
500-599 Subroutine for screen 4
640-699 Subroutine for screen 5
700-799 Subroutine for screen 6
800-849 Subroutine for screen 7
850-897 Rescue Esmeralda subroutine
850 Defines graphics for heart and makes border flash
860 Data for heart
870 Prints heart on screen
890-896 Play tune
897 Awards extra life, extra bell towards super bonus and restarts game from screen 1
905-910 Set up variables
911 Checks to see if super bonus has been won
912-920 Set up more graphics and goes to subroutine to draw current screen
930-935 Print score, lives left
942-944 Print bell
945 Sets up variables
946-947 Draw castle on lower part of screen and shows position of Hunchback
950 Prints Hunchback on left hand side of screen
1000-1999 Main loop
1100 Checks if key 1 has been pressed, and moves Hunchback to the left
1200 Checks if key 0 has been pressed, and if so jumps
1400 Checks to see if Hunchback has reached the bell, and if so, increases score by the amount of time left
1450 Time countdown routine
1500-1511 Animate Hunchback's legs and arms
2000-8999 Set up screens
2000-2999 Screen 1
3000-3999 Screen 2
4000-4999 Screen 4
6020-6999 Screen 5
7000-7999 Screen 6
8000-8999 Screen 7
9000-9020 Award super bonus

Andy Charalambous