Tunnels in pseudo 3D racing game
Posted
by
Nicholas
on Game Development
See other posts from Game Development
or by Nicholas
Published on 2014-06-13T00:07:19Z
Indexed on
2014/06/13
3:42 UTC
Read the original article
Hit count: 258
perspective
How would one go about doing tunnels in a pseudo 3D racing game ? The main problem I have at the moment is perspective - I cant think of a way, beyond having to Z sort the sprites and tunnel coordinates, so that vehicles are displayed in front of the tunnel entrance and somehow block the display when out of site. I would like my tunnels to be used on both flat, curved and hills and slopes.
The tunnel enterance/exit is made up of 3 separate graphics, (left, right and top), whilst inside the tunnel it is just one line graphic along the top (the idea being its supposed to be a set distance above the current vertical road position).
As you can see from the picture, the vehicles are still being rendered whilst in the tunnel.
I've converted the Code Incomplete road system to GLBasic.
© Game Development or respective owner