Hi folks. What would be the best way to approach the following scenario.
I’m messing about with this test bed, a top down driving game. I decided to try to make the road turn and pass over the top of another part of the road, just to see how this would work in terms of code.
I’ve worked out so far that I need the full background and different textures for the ‘top’ roads, draw then in the correct order and change the car’s draw order depending what part of the road it’s on. I can set the draw order by triggers on a hit map which isn’t drawn. I can also work out the parts of the hit map that should be applied depending if the car is on top or underneath. This is all great stuff and I can see how I can implement this without any headaches.
However… (isn’t there always a ‘however’!) I’m rendering the background so I can apply textures to it before drawing, this is for leaving tyre marks and possibly some other stuff. This is a problem because I can’t add textures to the top roads as they wont be rendered like the background. I guess I could render these textures as well, but how would I decide to draw on the top or the bottom renderer? The roads can cross in any mixture of angles and on curves, so I can’t use simple intersections.
I can’t help thinking there must be a better way to achieve this, but it’s eluding me. I could drop one of the functional points and be away without any problems, but where would be the fun!
Has anyone done the same? Or have any ideas?
Thanks.