Programming a HUD

Started by
1 comment, last by MortusMaximus 15 years, 4 months ago
What's the general way of programming a HUD? I just need to display life, score, and other information. I thought it was just images/text blitted as the topmost layer (meaning, the last thing to be blitted onto the screen). Is this right?
Advertisement
If you're using an old fashioned pixel blitter rendering method then yes, simply blitting your HUD graphics last will serve your purposes well. If you're using a 3D API to do your rendering, you need to do a bit more setup in order to ensure you're drawing in the correct coordinate system. It sounds like you're doing the former however, so just stick to blitting the HUD last.
Obviously it will be different depending on your development environment, but doing it as an overlay is generally right.

Unless your HUD is similar to Far Cry 2, which has the map and such completely in game, but that's another story altogether..
Check out the first gameplay video from my javascript/PHP RTS game

This topic is closed to new replies.

Advertisement