Hello,
After a few attempts at tackling HUD, effects, and fonts - I desperately need some opinions on the best approach for achieving these things. Before I begin, I am using LibGDX with the freetype extension. (Yes, I know how to use it, I’ve looked at the documentation).
Lets start with the HUD. Whenever creating my initial orthographic camera, I set the ortho to a width of 15f, and height of 9f.
//Example
cam.setToOrtho(false, 15f, 9f);
Well, when attempting to do a HUD, it of course is scaled up as well. This leads me to believe I will need a second camera that is not upscaled.
//Example
cam.setToOrtho(false, 800, 480);
Is this safe, or will it cause more harm than good?
As for effects, I am wanting specifically to achieve an effect using fonts. Essentially, when a player picks up a coin, I would like to have the amount appear above the item and slowly fade away. “+5”. This is common in most games at this point. I know how to handle the updating, movement, and fade of the effect, but not the font display. I do not know what the best approach would be. Should I use the free type extension and just load a normal font file, then display it using that? Or should I just use an image with numbers 0 - 9 and handle it that way? (I’ve been told that this is bad practice)
I apologize if this is written a bit sloppy. I have a lot on my mind regarding the issue and do not know how to spill it all out. If you have any questions or need more information, please let me know. & Before I get thrown under a bus about this - Yes, I’ve googled all I can about this. I’ve attempted it on my own several different times. I’ve read the documentation.
Thank you!
-A