How to make a 80's 2D racing game?

wonder

Expert
Licensed User
Longtime User
In the 2D realm, I know how to make platformers, beat-em-ups, space-shooters, fighting games, RPGs and real-time strategy.


With this kind of game, however, I have no idea how or where to start.
I understand that the player moves left and right (or either the camera does), but how does the track move in the Z-axis? Is it some sort of pseudo-3D raycasting? Is there a Z-axis at all? No, it must be something simpler!! Any ideas? :)
 
Last edited:

ilan

Expert
Licensed User
Longtime User
about objects that coming from the front.

i would create custom types where each object has a scale factor to 1 so if the size of the object is the size that is in the same line as the motorbike his scale is 1

so the scale starts with 0 that means it is very far away from the player and start growing until it reaches 1 what means now you can check for collision with the player (just check if they collide in the x axis) if scale < 1 then they are not on the same z axis so no collision detecting

try to make the game without curves so only a motorbike that moves left and right and objects comes from the front and check for collision

for the curves you will need lot of math so you should deal with it later when you have a simple racing game.

btw. dont forget the y axis for the coming objects !
 

ilan

Expert
Licensed User
Longtime User
ps. i like this game and i would like to take the challenge and make that game in b4a :) (i need only to find the time for it :p, maybe after i finish my b4i app that i am working on)
 

wonder

Expert
Licensed User
Longtime User
Thanks for the swift reply, @ilan! This could be indeed a very interesting project! :)
I found an online discussion on this subject, I think I'm starting to understand how to simulate the track...
My investigation shall go on... ;)
 

sorex

Expert
Licensed User
Longtime User
as most things in game and demo coding it's all about trickery and cheating the eye because it simply was too slow to do it "the normal way".

the road is like color cycling masked rasterlines.

the bends are offsets added to the masked lines.

SEGA developed special hardware for the sprite scaling back then that's why it looked so good compared to having objects at 3 or 4 different sizes.
 

sorex

Expert
Licensed User
Longtime User
but how does the track move in the Z-axis? Is it some sort of pseudo-3D raycasting? Is there a Z-axis at all?

there's only a fake z axis used for the object scaling, to "draw" the hills and for the main road color cycling.
 

sorex

Expert
Licensed User
Longtime User
by the way the title is wrong ;)

it's mainly 80s games, 3D already entered the arcades for race games in the late 80s.
 
Top