| ★ GAMES ★ MAKING OF "BOBSLEIGH" ★ |
| Games - Makingof - Bobsleigh |
Background Noise looks behind the top games of the moment and speaks to the programmers who sweated blood to produce them. Background Noise looks from I the author's point of view — at the particular programming problems and the way they were solved bobsleigh simulation on a Spectrum?It looked impossible at first sight. The main problem was to design a game that looked realistic enough to be classed as a simulation but which would still run fast enough to capture some of the thrill and excitement of hurtling down an ice hard track at over 90 mph. Since none of us had been down a bobsleigh run we enlisted the help of the British Bobsleigh Associatin and Britain's top driver Nick Phipps. A visit to London one cold January morning gave us our first opportunity to meet Nick and pick his brains on some of the techniques involved. “It's simple,” he said. “Hold the sled down, check the height, and let it run out in the middle”. It sounded good but what did it all mean? Eventually we got the idea and set about translating some of the techniques and principles of bobsleigh racing into a computer simulation. Some sketches and flow charts were drawn up and the first of the graphics routines written to see if they would run up to speed. Program development was done on an IBM AT with Z80 coprocessor card. The software development tools included a powerful relocating macro assembler/linker and a sophisticated full-screen text editor. Hex files were down-loaded to the target machine using a fast 38K baud serial interface or a parallel loader. Program debugging was speeded up thanks to an in-house monitor/disassembler especially designed for the Spectrum.
Writing any simulation program breaks down into three bits - the visual display, the instrument panel and the mathematical model. In the case of Bobsleigh there was also the team planning and strategy element which took as much design and coding time as the simulator itself. We decided to use a combination of solid filling and simple line-drawing techniques to build up the display in order to get a convincing looking view which would also run fast. The most time-critical routine to write was the solid colour sky filling. Not only does the routine need to be fast but it also has to cope with some pretty complicated shapes which occur as the bob twists and winds its way down an undulating banked track. Flood filling techniques are far too slow so a fast horizontal line-fill techique was used. The track is built up using full 30 calculated perspective with hidden line removal to prevent being able to look through the walls of the track when travelling round sharp comers. This gives a very solid (eel to the display. The picture is built up on a dummy screen and then copied across on to the real screen during the frame flyback period to avoid flicker. The visual display is deliberately shaken slightly when travelling at high speed to give a greater impression of speed and make it look more like the view seen when a TV camera is strapped on the bob. The only attribute clash problem to solve was on the bridges which need to move smoothly overhead at pixel resolution without large attribute clash problems quite well. The panel displays the race timing information with the clock synchronised to the 50 Hz interrupts for accuracy. The mathematical model has to take into account the banking and steering forces on the bob and check whether the bob has hit the side-walls or travelled so high up the banking that it crashes off the edge. It also takes into account which runner blades are selected and modifies the grip on the ice accordingly. Actually getting a computer model which closely matches the performance of a real bobsleigh proved to be quite tricky. For the planning and strategy part is was decided that all game options would be selected using menu pages and pull-down windows. There were two ways the windows could have been implemented: either draw a window over the menu and then completely redraw the menu to remove the window or cut out the memory underneath the window and save it to the dummy screen -restoring the memory then automatically removes the window. The latter method was chosen as it was faster and looked better. The window parameters were stored on the stack so the last window added is always the first removed. For the intro music we decided to use the theme tune from BBC TV's Ski Sunday programme, and obtained the rights to use it. Although the TV programme is usually about ski-ing rather than bobsleigh we felt it would give the right winter feel. Full use is made of the AY sound chip on the 128K machines to give multi-channel music while 48K owners get just the melody. With the Winter Olympics in Calgary fast approaching Nick Phipps will be training hard. We wish him luck and if all else fails maybe he'll use our bobsleigh simulator to get in peak condition and go for gold!
|