Sign in to follow this  
ov3r_dr1v3

OpenGL drawing on top of tile

Recommended Posts

Hey... I am making a 2D racing game and so far its going ok, I have drawna track, which is based on a 2D array, and have a car moving around the track... The next stage i am looking to implement is to have little boxes of ammo scattered around the track, that when the car drives through increases the cars ammo count, and then the box of ammo disapears.. I'm having real trouble implementing thsi is opengl... My thinking was that when im searching through the 2D array and drawing the track tiles, if i come across the number 7, which i have assigned to mean 'piece of track with ammo on it', then i would draw the track tile as normal, and then draw a small box in the centre of the track tile.. However, when i tried to do this it seemed to jsut mess up the entire track.. If any one could hepl me id be greatful, thanks very much

Share this post


Link to post
Share on other sites
It's kind of hard to guess what the problem is from your description, so you might post some code (such as where you render the ammo item).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this