Page 1 of 1

Re: Race games - how is it done?

Posted: Thu Jul 05, 2018 5:29 pm
by Bizzley
spectron wrote: Thu Jul 05, 2018 2:57 pm This is sort of how it was done for Gameboy road rash.
I coded a similar thing for a Gameboy version of Formula 1 for Psygnosis that never progressed past the proof of concept stage. They wanted to see a working 3D road so I used the HBLANK method to slide individual lines into curves etc. I've got a compiled version on a development cart somewhere as well as the source code and it is a really quick and easy way to get an into-the-screen road up and running. To save on in-game processing time I pre-calculated a selection of straights, curves, chicanes etc. at varying degress and built a complete track out of those sections held in tables.

I told Psygnosis that if they wanted to see more details like dips, hills, trackside objects, other cars etc. then they'd have to pay actual money but it never got any further - for "political" reasons it didn't get a green light - but it was a fun thing to code up I remember.

Re: Race games - how is it done?

Posted: Fri Jul 06, 2018 2:32 pm
by spectron
Bizzley wrote: Thu Jul 05, 2018 5:29 pm
I told Psygnosis that if they wanted to see more details like dips, hills, trackside objects, other cars etc. then they'd have to pay actual money but it never got any further - for "political" reasons it didn't get a green light - but it was a fun thing to code up I remember.
It was indeed fun and hills were just a case of taking that extra step of altering VBLANK as well as HBLANK to give the impression of going up and down. It's the sort of thing most of us would have stumbled upon back then given the freedom of experimenting; luckily we were given that time to mess.

Re: Race games - how is it done?

Posted: Tue Aug 07, 2018 11:05 am
by Ralf
[mention]R-Tape[/mention] , did you made any progress with racing game engines? ;)

Re: Race games - how is it done?

Posted: Tue Aug 07, 2018 12:00 pm
by Joefish
If you've ever seen Electraglide on an 8-bit Atari it looks absolutely stunning, with a colourful fast-running road leading to the horizon.
But really it's just a flat picture of a triangular road. The road moving is done by colour-swapping on alternate lines, and the curves are done by scroll-shifting individual pixel rows left and right. And that' all it can do. When objects appear you can see they're crude geometric shapes made of hugely upscaled sprite pixels; it's simply impossible to make it do a racing game with rival detailed vehicle graphics on the track with anything like that slick frame rate.

To do the same on the Spectrum means the hard graft and pre-shifted data to re-draw all the lines of the screen scrolled to different positions horizontally, and re-distributed vertically to make hills, but then you can draw it however you like and add whatever sprites you want. It would be neat to combine a racing game with a multicolour engine to do the roadside strips in colour, but it would take some very clever coding to use the processing time in the wait-periods productively.

Re: Race games - how is it done?

Posted: Tue Aug 07, 2018 7:39 pm
by R-Tape
Ralf wrote: Tue Aug 07, 2018 11:05 am @R-Tape , did you made any progress with racing game engines? ;)
Not yet, I find this quite hard to understand but I just need to set a some time aside with a cold flannel on my head to think it through.

However, current priorities are a laptop free holiday and then finish Bean Brothers!

Re: Race games - how is it done?

Posted: Wed Aug 08, 2018 10:28 am
by Vampyre
Joefish wrote: Tue Aug 07, 2018 12:00 pm If you've ever seen Electraglide on an 8-bit Atari it looks absolutely stunning, with a colourful fast-running road leading to the horizon.
But really it's just a flat picture of a triangular road. The road moving is done by colour-swapping on alternate lines, and the curves are done by scroll-shifting individual pixel rows left and right. And that' all it can do. When objects appear you can see they're crude geometric shapes made of hugely upscaled sprite pixels; it's simply impossible to make it do a racing game with rival detailed vehicle graphics on the track with anything like that slick frame rate.

To do the same on the Spectrum means the hard graft and pre-shifted data to re-draw all the lines of the screen scrolled to different positions horizontally, and re-distributed vertically to make hills, but then you can draw it however you like and add whatever sprites you want. It would be neat to combine a racing game with a multicolour engine to do the roadside strips in colour, but it would take some very clever coding to use the processing time in the wait-periods productively.
I'd never heard of Electraglide before but just seen a vid on YT. That is superbly smooth for an 8-bit game.

Re: Race games - how is it done?

Posted: Wed Aug 08, 2018 11:43 am
by Ralf
I've just had a look on Electraglide too.

Yes, very smooth movement but ultimately boring. No other cars, no hills, very sparse scenery.

Now, Chase H.Q. on Spectrum on the other hand... ;)

Re: Race games - how is it done?

Posted: Mon Oct 01, 2018 8:58 pm
by Dr beep
Here is a pseudo 3D racing game coded for the ZX81 in just 1K and a hires way.

https://m.youtube.com/watch?v=uSPMIidgA18

The game is based on the same track coded for the ZX Spectrum in Grandpr1x, also just 1K of code, but on the ZX Spectrum you have more memory available.