Text and texture rendering

Oct 23, 2007 at 9:24 PM
Edited Oct 23, 2007 at 11:09 PM
Just thought of a suggestion. When the user reqests some text or a texture2D to be drawn, they give the coordinates in the -1 - 0 - 1 coordinate system, and the engine internally converts this into the current screen resolution.

This way, that mini-map the user wanted rendered in the bottom right hand corner doesn't apear in the middle of the screen when the game is running in a higher resolution.

A text and texture render manager would be needed anyway, as to make proper use of spritebatch.
Oct 23, 2007 at 9:50 PM
Not a bad idea. I've also used SCREENHEIGHT and SCREENWIDTH as well. This positions text and images according to the borders.

Whatever we choose should be easy for the user.
Oct 23, 2007 at 10:12 PM
Aphid, same message as for sturm goes for you as well: You seem interested in the engine and it's outcome, if you'd like to participate in its development just let me know and I can add you to the project.
Oct 23, 2007 at 10:24 PM
Personally, I'm a fan of the virtual width/height idea. That's what I'm using for the GUI system in the prototype, currently. The user sets a "virtual" width/height in the window manager, and the GUI elements are scaled accordingly, as if the screen size were the virtual size. This way, the user can always code the GUI to a certain width/height, and the GUI manager internally takes care of the scaling. At the same time, the user can override this, if they wanted, by setting the virtual width/height to the real screen width/height. Take a look at the prototype GUI code to see how its done.
Oct 23, 2007 at 11:09 PM
Sure, LordIkon, I sent you a message earlier :)