Canyon RacerAround late 2001 the writer was 'polishing up' the physics and realism of flight in a simulator of radio controlled model flight. A DB stealth bomber was used to play with parameters of weight and drag , to imitate at extremes, a heavily loaded plane, a fighter, or ultra light glider. Shortly after, a brief experiment in speed comparisons with blitz, pointed to a 'game' with some potential in which Harrier jets raced around a roughly circular canyon. The potential to be in the way time can be gained and lost through subtle control and direction over the various curves and intrusions of the course.
release Jan. 2002
last page update dec 03
Two months after that, the 'canyon racing' game reached a working prototype stage.
Reduced views of the prototype.
The program includes a demo replay so that anyone without a joystick may get the general idea, and play about with the various views and the lighting.
The pilot has a slight speed edge over the others ... but I am not sure how difficult people will find the flying to be .. the control style is realistic, not 'arcade'. Some sort of 'easy fly' option may be added.
The lowest level is meant to allow time for steering a secure course and still keep up with the competition.
A boost appears under the 'finish line' when you have got too far behind - otherwise it's hopeless when you slow on hitting something , or get too high and into the 'drag zone. Note that there are deliberate shortcuts ... just for fun rather than serious racing.
In the highest level the other planes fly a more ideal course and will catch up if left behind.
The maximum speed in the time trial is faster, - approx. the same as when the plane picks up a speed boost in the demo. Check the alternate route shown ... it is possible then to maintain an optimal route at the highest speed . A lap around 16 secs is possible.
Note for flight experts ... the flight, though basically realistic, is not a complete version. It obtains vertical hover by simply omitting gravity ! There is some simple speed change on elevator since this usually corresponds to extra drag and slowing on a hard turn, or speed change with climb/ dive.
Soon after it was first made public, comments by other programmers made me upload a new version with texture added to the aircraft models, which now also displayed a jet exhaust effect.
You can select between the 'Harrier' type and an imaginary VTOL modified DB 'F 18 Hornet'. You can set their colour schemes ... or load a colour scheme of your own. Screen shot below.
Here is the link to the zip file for Canyon Racer >> ( 1.6 megs )
An apologetic note ... I have recently acquired a new monitor and it may be that the canyon scenery is much duller on other computers than I intended . Sorry.
NOTES on 'canyon racer' for D.B. programmers .
1. The whole thing was started so as to make a comparison with a 'blitz basic' canyon demo. My (matrix) canyon has perhaps slightly more vertices, and has 3 planes instead of two bird objects. After a lot of experiments to remove slowdowns , the two run at pretty much the same fps when I remove sync limits. ( up to about 39 max and down to 30 in a few parts )
( My oldish computer then:- 350mhz , viper V550 card.- thanks again Aaron! .. ........ now replaced 2003, with AMD duron 1.3 and gforce2 )
So this person feels no need to deal with the structure of 'blitz' - and presumes the speed match is because this program consists mostly of 3d drawing which is done by the hardware anyway, and there's no other heavy processing needed.
For consistency of control, the fps is limited to 25 for the low level and 28 for higher.
This means there is speed available for effects - I eventually added an exhaust effect .
2. Text is set on the top of the screen, which is outside the "set camera view" area. It is written just once at the point of change and causes no slowdown at all. (Compare with the slowdown at the end when the results are put across the main screen.)
3. The landscape is one matrix 50, 50, surrounded by a D.B. sphere, textured with sky and cloud. Not ideal, since the cloud detail is in a very narrow part of the whole image. However, it was a pleasant surprise so see how the right colour of 'distant land' blended in with the matrix landscape. I hadn't expected just one matrix would work.
There are 8 matrix textures ( all much modified from DB media 'moss' and 'rock' to get intermediate faded rock /moss in various patterns) No mipmapping is used since DB versions with mipmapping do not have the easiest to use angle reading. Besides, since you can't set the distance at which the textures are reduced, nothing appeared different or speeded up, when I did try it later.
When changing the light direction right to left, it was necessary to redo the matrix normals as well with a 1 step grid offset away from the light, otherwise the shadows were concentrated on the top of the slopes and looked unnatural. Light colour and contrast is also changed.
4. The biggest problem has been the paths of the competitors. If anyone wants to make a race game ( car or plane) I seriously suggest they forget the landscape and everything else until they have a 'path' system that works perfectly, with good variation. I was mostly interested in the sensation of flight through the canyon ( which was easy) and the competitors were just afterthoughts . A mistake!
Currently, pre-recorded laps are mixed together into a course after menu selection. But the joining/blending of them in three dimensions is harder than I thought ... and more difficult because I partly obtained variation in the flight paths by 'moving' the planes separately forward and backward on top of the standard positions. This 'projection' magnifies greatly any unevenness.
At which point one announces, that a few experiments have made it clear how to make planes smoothly turn and fly around a series of points. The relief !! ( apart from a depressing re-writing of a fair bit of the program to come ... perhaps .. groan ... )
5. The jet sounds are from synthesizers .. the result of applying filters and phasing to analogue and digital 'white noise'. I am impressed that the 3d sound in DB actually functions - though there is a curious effect, not true doppler, when the planes pass the view point. The pilot plane uses a programmed doppler effect.
6. The matrix for this (and for the 'endless scrolling' landscape of the 'combat sim.') was shaped with a simple editor.
I found the most 'stable' and easiest to use approach was a constantly level view ( but height adjustable), simple y rotations of the viewpoint, and only a single indicator sphere moving directly ahead over the matrix grid intersections which were to be altered.
Movement and turn were done with acceleration/deceleration so that simple keyboard control gives both fine movement and high speed with good manoeuvrability.
7. There is no midi music. Partly because most sound cards are so bad the sound is not worth the effort. High grade wave table cards have indeed become cheap enough to be included as a matter of course -- but they are not always set realistically. Apart from that, I have mixed feelings about the common atmosphere music. It adds something all right, but it overrides something else which I think more important.
8. The source code will be kept safely out of sight. Though it is fairly neatly arranged, it is not exactly optimal (!!) with helpful notes to the author all over it. (And there were therefore hidden bugs in counters and checks which each took days to find .. *@#! )
Also, the program uses at various points, the read of the y rotation angle as it is implemented by the earlier DB versions. i.e. it would need some different code to work with versions after 1.08 . But see notes on rotations and source code now added further down this page.
9. Improvements to make ....... MANY !!!! including ....
a. It would be necessary for a proper, satisfying game, to be able to choose from well textured planes of interesting design, some futuristic, - or perhaps old fashioned? ( the red baron or spitfires and all that) I find it hard to adapt to the awkwardness of the 3d design programs I have tried , but may have another attempt soon. Perhaps there could be a graphically interesting and atmospheric 'line up' of designs which you can walk around in first person ?
The problem is download size. If one was a game designer with a CD in mind , one would throw in as many quality graphics as possible, but some internet connections will always be slow.
b. Hopefully also, there will be some more adventurous landscapes and courses to come. I particularly want a desert landscape with incredible rock spires and 'american mesa' style of plateau. And man made or natural tunnels ? The landscape itself is easy - and fun, it just takes time ...
c. better flight paths or intelligence for competitors are VITAL .. and now possible!
d. additional trimming or modification of planes ? This is used by car games, but I am not sure if flight control is of enough interest to people to bother with. Perhaps just make the different designs fly with different limitations.
e. amazing drawn out explosions and disintegrations along the canyon on hard impacts?
f. rockets to shoot down competitors will NOT appear .. it is too frustrating when they shoot you down instead .. Unless it is made totally one sided?
g. multi player sounds fun, but I don't know about using the later DB versions, or how common it is to find another player with the time and interest.
h. It would be good if there was someway to get more direct sense of flight - in the same way as a car skids and responds in a car game such as the playstation GT2 . Have to think about that though. Perhaps a clearly visible 'artificial skid' in the air, with the plane at abnormal angle and on the verge of stalling, which allowed one to slide into the canyon wall?
Link back to dark basic page