Page 1 of 1

How to create a GUI?

Posted: Fri May 09, 2008 11:00 pm
by kattle87
I would like to create a GUI using, say, something like the image of a red cross for healt. How can i do it using not text but sprites or anything like that?
They should remain in the same position while camera is moving...

Plus, maybe i've found a little bug, i'll post it if i can reproduce it.
Bye bye!

Posted: Fri May 09, 2008 11:21 pm
by Kjell
Hi kattle87,

As rendering Sprites in Screen space is currently not possible, there are 2 good alternatives. One is to set and orient GUI elements to the camera yourself so that they appear to stay in the same place ( FOV ), the other is to use the Font and RenderText Components using a bitmap that holds your GUI elements instead of the alphabet 8) The latter is probably the easiest.

Good luck ~
K

Posted: Sun May 11, 2008 6:27 pm
by kattle87
yep! i had already thought at the 2 solutions you proposed...
I think i'm gonna use the font solution.
I've started a project, and i will need help with graphics, musics, levels :P take a look at it!

Posted: Mon May 12, 2008 12:45 pm
by VilleK
Kjell wrote:the other is to use the Font and RenderText Components using a bitmap that holds your GUI elements instead of the alphabet 8)
Good tip Kjell! A benefit of this method is that several items can be rendered using the same texture which is good for performance.