Cross The Ferry

Your job as Ferry operator is to safely guide 65 people across the water, the people move on their own free will and you need to move your ferry along with them so they don't fall into the water and die. If 3 people are die in the water it's Game Over. Oh and as Time moves along the People want to hurry along, the game is broken up into 5 stages with the following number of people expected to get across to proceed to the next stage:

Stage 1 : 2
Stage 2 : 3
Stage 3 : 10
Stage 4 : 20
Stage 5 : 30 

Controls: Left <- Right -> Joystick 

Requirements:

Winape 2.0 Alpha 18 or Later
Or other emulator with CDT support.

Loading:

Select "Settings", "Memory" and in the ROMs Column, Lower becomes "OS464" with Upper 0 set to "BASIC1-0", by default Lower is "OS6128" with Upper 1 set to "BASIC1-1" and Upper 7 set to "AMSDOS" or "PARADOS". Loading Cross The Ferry will vary depending on if Upper 7 ROM is or isn't present, an unexpanded 464 for example won't have any ROMs in Upper 7, and it can be selected as "(Emply - Same as Upper 0)".

Loading: Select "File", "Tape" & "Show Tape Control", use "Open" on the Tape Control pannel to select the directory and select the 'Cross The Ferry.cdt' file. Without closing the Tape Control box, Return to the Emulator, if ROMs are present in Upper 7 type |TAPE to switch to Tape Mode, otherwise RUN" or press CTRL+Keypad Enter and press any key, return to the tape control window & click the Black "Play" icon, once the game has loaded the Stop Button Icon can be used and Eject to Eject the CDT image.

Coding:

Cross the Ferry makes use of the Amstrads Control Code set in order to get the game functioning in the PUR-120 category to access MODE, INK, PEN, PAPER, WINDOW & CLS, a number of conditional WHILE statements were also added to fit other code on the same line:

1 - Setup Variables as Integers followed by control codes to setup MODE 0, INK palette, PAPER, WINDOW to draw the game screen, any control codes that couldn't be entered from the keyboard normally represent CHR$(<num>), the 'i' variable controls the movement frequency of the people & 'l' represents the number of lives.

2 - 'w' represents the x-coordinate of the person & 'z' for the y-coordinate with 'x' representing the position of the ferry platform, some data is poked to memory which represents the number of people for each stage. 'a$(n)' array represents the ferry platform - 1 for moving left & 2 when moving right, it is a string 4 characters in length with 1 character either side being used to blank out the platform.

3 -  More variables setup 'u' points to the area below the person to determine if ground or ferry platform are present, 'y' y-coordinate of the person, 's' - which ferry platform to select = 'a$(s)', 'v' = which line of code to use from the 2 routines on Line 10, in this case both routines are used on Line 3 to Print the Person and draw the Ferry Platform. The main loop starts here and continues until lives 'l' = 0 or 65 people 'm' have been rescued. This line also tests to see if the person has a gap under them and if so fall into the water.

4 - carries on with the falling person sequence from line 3, a life if lost and all variables of concerned return to pickup another person. The end of line 4 is used with the 'r' variable holding the Joystick position Movement.

5 - r = 4 when Joystick Left and 8 when Joystick Right, x is check to make sure Ferry platform has reached the left or right bank.

6 - This controls the movement frequency of the person with d performing a counting sequence, when d = mod (21-i), 0 is returned and the person moves to the next position, as 'i' gets larger, 21 is subtracted with 'i' to produce a smaller number and as 'd' gets to those numbers later in the game, the person moves faster.  

7 - This checks when the person has reached the other side of the screen, when it has 'b' which is a subscore is increased with the main person count 'm' also been added, x-coorinate 'w' of the person returns to the start as well as the graphical position 't'. IF the subscore 'b' has been reached with the value position in memory, difficulty is increased with 'i' being increased by 4, the subscore 'b' returns to 0 and 'c' points to the next value position in memory.

8 - 'CALL &BD19' is used to smooth out the Frame Flyback to reduce flicker, followed by the end of the main game loop to either exit the game or return to line 3. IF game end or game over is reached, LOCATE & PEN are used to position the appropriate Text message, a WHILE INKEY$<>"":WEND is used here to clear the keyboard buffer (otherwise known as CLEAR INPUT in Locomotive BASIC 1.1), if people rescued 'm' is 65, PRINT 'WELL DONE' otherwise PRINT 'Game  Over'.

9 - If 65 people weren't rescued print the number, a little sound added onto this line to brighten up the game based on the number of people rescued, clearing the keyboard buffer on line 8 is used to help hold the Key Wait Sequence (CALL &BB18). Pressing any key at that point will RUN a new game.

10 - Is a subroutine used to either Position and Print the Ferry Platform if v=1, otherwise if v=2 then a short walking SOUND is made, along with an update of the persons position.