speedometer and other stuff

Started by
1 comment, last by Thaumaturge 17 years, 4 months ago
Hey... I'm looking to implement some kind of speedometer in my 2D racing game...however im unsure how to do this, i tried drawing it jsut before actually drawing the 2D world, however didnt work. What i want to achieve is to have a speedometer in the bottom left corner of the screen, which is not affected by anything else in the game world. Any help would be fantastic, thanks
Advertisement
It sounds like your on the right track, try drawing the speedo as the very last thing to be drawn. Not sure what kind of setup your using and if you have depth testing. But your speedo needs to be on top, so drawing it last makes more sense than first.
I'd agree with Honayboyz - draw the speedometer last (unless of course you have other things that you want drawn in a similar manner, which could be drawn before or after it).

I'd simply add to that the suggestion of turning off anything that might interfere with the speedometer being displayed as you want it to be - disable lighting and depth testing, for instance, if either is being used (as I imagine the latter, at least, is). Don't forget to turn them on again once you're done!

Finally, I'd suggest resetting your viewing matrix to something simple, in which you can place the speedometer somewhere similarly simple, such as (0, 0, -2).

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

This topic is closed to new replies.

Advertisement