I'm not entirely sure this is working as a game. I don't think limiting everything to a tube makes for particularly good handling. I really need to get some outside opinion on this though; the only person who's tested this other than me was Arcadian at the most recent ABUG, and the fact that he struggled with the controls isn't filling me with optimism. Maybe I need to step back from it for a bit?
In any case though, I made some changes pre-ABUG. Namely computer-controlled opponents :
Getting multi-coloured opponents on screen involved some sprite code changes. There isn't enough RAM to have multiple sets of vehicle sprites, so everything is now plotted via colour translation tables. In addition, I've dropped sprites to 2 bits per pixel, with the colour translation expanding back up to 4. This obviously complicates the sprite code a bit; the inner plotting loop now looks like this :
Code: Select all
sta (scraddr),y ;2+5+2+2+5+4+4+6+2+5+4+4+6 = 51 cycles, 30 bytes
The addresses to the ortables are modified at the start of a plot, based on the sprite colour set.
AI is implemented through the old fashioned method of sticking lots of arrows on the map :
The direction determines what angle the vehicle should be accelerating in, and there's code to slow down if the current direction is completely wrong. There are also directions for braking, and just continuing regardless of the current heading.
This is far from perfect, but the opponents currently do a reasonable job of moving round the track.
Video : https://www.youtube.com/watch?v=VjYKYvaWgVg