Page 3 of 4
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 1:38 pm
by Kilian Hekhuis
The background could be tiled on the back plane, the objects sprites and the road itself in bitmap mode on the foreground plane. You could tune down the resolution a lot to speed it up (doesn't matter if it looks crude, background and sprites will look good). But what do I know, it's a long time ago that I did any kind of game programming ?.
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 2:25 pm
by Guybrush
You definitely don't want to draw the road in bitmap mode. Just create a fixed tile map for the road, a central perspective of the road and make it pretty wide. In the default position (road in the center, a long straight ahead) there will be some amount of horizontal scroll. Then it's just (hehe, just! ?) a matter of calculating the right scroll offset for each screen line, depending on the position on the track. For instance, if the road ahead is turning to the left, the top line of the road will have the smallest x scroll offset, with the scroll offset increasing each line until it reaches the default position at the bottom of the screen. If you're feeling particularly bold, you can also simulate terrain elevation. It's all just a matter of choosing the right line of the tile map with the right scroll. Also, you can simulate texturing either by modifying the palette on each line or (a simpler method) create multiple tile maps with different colored tiles and change the tile map per raster line. You can do all the calculations in vsync interrupt handler. Of course, this all requires a raster interrupt for each line where the road is drawn, but since you've already calculated the scroll, it's only a couple of LDA's and STA's per line.
As for the background (mountains, sky, etc.), you can use another layer, or you can reuse the same layer as for the road, you just need to switch tile maps on the right raster line.
Everything else (cars, signs, trees and bushes) should be done with sprites.
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 5:43 pm
by Kilian Hekhuis
Can the VERA handle offset changes pretty scan line? You could then have a fixed offset line for every possible track line (in bitmap mode), and just select the right offset. And alternate the palette for white or red side-markings.
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 5:46 pm
by StephenHorn
There is a line IRQ feature, and you can scroll tile and text layers, which can produce the effect I believe you're describing. That said, line IRQs are broken on r37. You can build the current source code yourself, though, and get the fix.
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 5:49 pm
by Guybrush
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 6:10 pm
by Kilian Hekhuis
Mmm, that link doesn't seem to open...
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 6:17 pm
by Guybrush
Hmmm... are you a member of the Commander X16 group on facebook?
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 6:19 pm
by Kilian Hekhuis
Yup, but the link just goes to the group main page. I'll try on my pc (on phone now).
Car racing game concept, idea, want, worth a try?
Posted: Wed Aug 05, 2020 7:02 pm
by DusanStrakl
Interesting project. I was actually thinking about putting it on my list of possible future projects but unfortunately that list is way too big already especially considering available free time ?
Considering that sending data to VERA can be a bottleneck some sort of hybrid solution of tile background with hardware scrolling and bitmap road with bending by using scan line shifting might work and leave enough CPU time for manipulating animated sprites that could be used for everything else.
Keep us updated and good luck!
Car racing game concept, idea, want, worth a try?
Posted: Fri Oct 22, 2021 10:04 pm
by Fenner Machine
I’ve made some placeholder/concept art.
I’ve made it in a way to easily encode it and test effects.
Also learning pixel art and animation.
This is a scene with several elements merged.