Genre: | Utility: Database/Filing |
Publisher: | Your Computer |
Machine Compatibility: | Dragon 32, Dragon 64 |
Release: | on Cassette |
Available For: | Dragon 32 & Spectrum 48K |
Compatible Emulators: | XRoar 0.33.1 (PC (Windows)) |
Original Release Date: | 1st June 1984 |
Original Release Price: | Unknown |
Market Valuation: | £2.50 (How Is This Calculated?) |
Item Weight: | 64g |
Box Type: | Cassette Single Plastic Clear |
Author(s): | John Nash |
There are 0 other items featuring this same game (that we know about!). Click any of them for their details.
Unfortunately no-one is currently selling this item.
Worried you're being ripped off? Closing prices on eBay can help you decide what a reasonable price is for a particular item.
Kart was originally published as a type-in game in the magazine Your Computer. The following is the article which accompanied the code.
John Nash raises the chequered flag on a fast machine-code racing game.
I have been surprised at the apparent lack of car simulators for the Dragon. True, there are a number of race-circuit programs, but I have yet to see one which gives you the driver's view through the windscreen. I adopted the principle: "If the program you want does not exist, write it yourself!", and set to work.
The assembler routine to move the display was the first and most important task, and after experimenting with a high resolution routine - listing 2 - I decided this was too slow, although it did produce a very nice display. The hex dump and Basic driver are included in case any readers want to experiment with it.
I then wrote a text screen display routine - listing 1 - which is very much faster, and able to take a variable delay loop without becoming absurd! To load this version of the program, first type in the Basic listing 1 and then Save this to tape or disc without trying to RUN it. If you RUN it, it will crash due to calling non-existent code routines. Next, type New, and then load the hexadecimal bytes from the hex dump. A suitable loader is:
10 FOR N= &H7000 TO &H71A3:READA$:POKE N,VAL("&H"+A$):NEXT
20 DATA C5,45,8E,5,60 etc
for as many data statements as you need. It is often convenient to put 10 bytes in a line as in the hex dump. Next do a:
CSAVE"CODE",&H7000,&H71A3,1
to store the code on tape. Now you can reload the Basic program and Run to start it. Future loading can be done by loading the code and Basic programs in either order from the tape, and then typing RUN.
The right-hand joystick gives steering control, moving the road in the correct sense, i.e. opposite to the stick. If you have a 100K ohm potentiometer with a knob that twists, this would give a more realistic control movement.
Your accelerator and brakes are controlled by the left-hand joystick, forwards to go faster, backwards to slow down. In the exact central position, you will coast. Don't worry if you don't have joysticks, as you can control the program from the keyboard. The listing below shows which lines to add/alter, and you will then use the arrow keys for turning and speed control. The Shift key gives a sharper turn. You will probably also want to alter line 250 - instructions - to read more appropriately.
On both versions of the program the kart has a very flexible engine, giving you a speed range of 8-100mph with no gear changes. You will find that the faster you go, the less cornering ability you have, so you may well crash off the side of the road, to the accompaniment of a suitable display and sound.
Also, your fuel will only get you to the end if you drive at a moderate speed. Watch the fuel gauge. When you crash, stall or finish, you are given a readout of distance and time. Should you actually finish, you will see a chequered flag and hear a suitable tune.
You can design your own course by altering the data statements in lines 120-170, and adding more if necessary. Value 0 gives straight ahead, +1 to +3 gives various degrees of right turn - 3 is the most - and -1 to -3 various degrees of left turn. Do not exceed 3 either way, as your kart cannot turn more sharply than that. When you have put in the data for your new course, type:
RESTORE:GOTO390
which will stop with an O/D ERROR. If you now type:
POKE&HFFD7,0
from line 180.
The entry is at line 790 (Choose), with the right road edge stored in JStore. Choose selects the appropriate routine from five alternatives according to the position of the road. OLHS is when the road is off the left-hand side of the screen, so only a single black square and road edge character is printed.
LHS is when the road is partly off the left-hand edge, so less than the full width will be printed. The stored value is used in line 1050 to count how many squares should be printed. If the edge is more than four spaces into the screen, we require a white centre line, so this is printed in line 1180.
Mid achieves the printing when the whole road width is within the screen, and again a white line is needed. All these routines use accumulator offset indexed addressing - for example line 1470 - and most use the stack as a temporary store - for example line 1200.
RHS and ORHS do the same tasks for road positions partly and completely off the right edge of the screen. Note that these routines have to avoid generating any wrap-around, which would spoil the display.
Now we have printed the black line in the middle of the screen, we need to copy it down the screen, widening the road as it comes towards us. We cannot just copy each line downwards with one more black square in the centre, as this would destroy any curves and perspective effects. We need to pull the screen downwards by starting at the bottom and copying each line down into the one below, widening the road as we go. We will work our way up the screen one line at a time until we reach the horizon.
This is done by Start in line 160. This seeks the edge of road characters, 136 and 132, and uses two flags to keep track. Flag 1 is set for road, clear for grass, while Flag 2 is set for right hand grass area, and clear for left hand grass area. The routine then uses LCopy and RCopy to copy the grass verges downwards with outward shift by one square. The edge routines, LEdge and REdge copy the edge characters downwards and outwards, and place a black square just inboard of them. Finally, the Road routine merely does a straight downward scroll, keeping its eye open - line 320 - for the right-hand edge.
When all this scrolling has finished, the white line character is placed in the centre of the road by WhiteL - line 1820. This ensures that a 130 character and a 128 - black - character are printed alternately.
The remainder of the routines at the end of the listing store the text screen contents for instant replay in the event of a crash and a win. They are fairly self-evident.
The Basic program is fairly straightforward, using a loop between lines 20-110 which I have kept as simple as possible for speed. the throttle setting alters the speed, which in turn affects a delay loop in line 80. The steering control merely alters the value passed to the machine code by line 50; all the hard work is done in assembler, in which, paradoxically, it is easier to write this sort of routine than in Basic. Probably, the options and thus possible errors are fewer in assembler, so you have to break the process down into simpler logical steps.
The remainder of the program is initialisation routines, titles and frills! The crash sequence and chequered flag are drawn on the screen and then stored by small assembler routines when the program is first run. These displays are then copied onto the screen when needed, by two more small assembler routines in lines 340 and 360.
This game was originally published in Your Computer Vol. 4 No. 6 (Page 142).
The following utilities are also available to allow you to edit the supplied screens of this game:
A digital version of this item can be downloaded right here at Everygamegoing (All our downloads are in .zip format).
Download | What It Contains |
---|---|
A digital version of Kart suitable for XRoar 0.33.1 (PC (Windows)) |
We thank you from the bottom of our hearts if you report something wrong on our site. It's the only way we can fix any problems!
You are not currently logged in so your report will be anonymous.
Change the country to update it. Click outside of this pop-up to cancel.
If you auction an item, it will no longer show in the regular shop section of the site.