Jump to content
  • Advertisement
Sign in to follow this  
ov3r_dr1v3

speedometer and other stuff

This topic is 4238 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!