More Noob Questions
More Noob Questions
I'm very new to Irrlicht and think that it's an awesome project.
I have some questions about how to do things in a First Person Shooter type game.
How would I setup a health/armor bar/percentage counter?
How would I setup a HUD? Weapon and ammo. Put a picture of the current weapon in the HUD.
How would I make it so that when you press escape it brings up a menu?
How would I make a menu? With mission info, options, and exit buttons.
How would I make a mirror (like a bathroom mirror?)
I have been modifying the code from the Tutorials, Mainly the "Collision" tutorial, if anyone has any examples of how to do these things...
Please and Thankyou!
I have some questions about how to do things in a First Person Shooter type game.
How would I setup a health/armor bar/percentage counter?
How would I setup a HUD? Weapon and ammo. Put a picture of the current weapon in the HUD.
How would I make it so that when you press escape it brings up a menu?
How would I make a menu? With mission info, options, and exit buttons.
How would I make a mirror (like a bathroom mirror?)
I have been modifying the code from the Tutorials, Mainly the "Collision" tutorial, if anyone has any examples of how to do these things...
Please and Thankyou!
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
thats really a lot of different things.
For the health/ammo and stuff i guess you should use the irrlicht gui.
The weapon could be a mesh locked in front of the camera as a child (or with bones? ).
For the menu, you'd need an event receiver to get the input and a gui to draw the menu.
A mirror is rather complicated, something with render to texture i guess.
I've seen all the things explained in this forum, so you just need to do some searching.
good luck!
For the health/ammo and stuff i guess you should use the irrlicht gui.
The weapon could be a mesh locked in front of the camera as a child (or with bones? ).
For the menu, you'd need an event receiver to get the input and a gui to draw the menu.
A mirror is rather complicated, something with render to texture i guess.
I've seen all the things explained in this forum, so you just need to do some searching.
good luck!
Huds and health bars are considered GUI which can be really really really ...really... (did I mention really) annoying. Irrlicht has gui built into it but its not custom to the game its got a generic look. you can put 2D Images on the screen. So just combine a bunch of images positioned right to look like your hud. Stretch the image of the health bar to be a gage.
equation as follows...
WidthOfHealthBar = (Health/MaxHealth)*MaxWidthOfHealthBar;
As for reflections. I forget where the post was but some guy made a cool reflective water, you could borrow the shader and stick it on a flat surface and call it a mirror
equation as follows...
WidthOfHealthBar = (Health/MaxHealth)*MaxWidthOfHealthBar;
As for reflections. I forget where the post was but some guy made a cool reflective water, you could borrow the shader and stick it on a flat surface and call it a mirror
I tryed doing some gui stuff like text but could NOT do it...
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
OHHHH!
You have to draw the gui...
lol
Another question how do you make the text bigger? I can barely see it right now. And is it easy to use a different font?
Also, with the gui some of the peramaters of some commands are extremely wierd. Do you just get used to them after a while?
You have to draw the gui...
lol
Another question how do you make the text bigger? I can barely see it right now. And is it easy to use a different font?
Also, with the gui some of the peramaters of some commands are extremely wierd. Do you just get used to them after a while?
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Not just with the gui but wenever you do some thing like addCubeScenenode
You have to put in stuff like <s32> and L before text and stuff that I don't understand...[/code]
You have to put in stuff like <s32> and L before text and stuff that I don't understand...[/code]
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
Those are templates. Google it for further information.LemonMan wrote:Not just with the gui but wenever you do some thing like addCubeScenenode
You have to put in stuff like <s32> and L before text and stuff that I don't understand...[/code]
________
IOLITE VAPORIZER REVIEW
Last edited by LLDD on Sun Feb 20, 2011 7:49 am, edited 1 time in total.
How do you print a variable to the screen?
Like if I was trying to make a health counter.
I tryed this but it didn't work...
addStaticText(L"Health:" health)
Like if I was trying to make a health counter.
I tryed this but it didn't work...
addStaticText(L"Health:" health)
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
You need to make a wchar_t and put that in there instead of "L"Health:" health".LemonMan wrote:How do you print a variable to the screen?
Like if I was trying to make a health counter.
I tryed this but it didn't work...
addStaticText(L"Health:" health)
You should also use setText or whatever it is, because if you addStaticText its just going to leave the old text and add new text on top every frame.
What's a wchar_t and how would I use it?
GO HERE NOW! please?
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
My friends website - http://www.ecoblues.net/joomla/
My website - http://www.harborcityschool.net/~pjewell
Hey I think a tutorial section will be coming to my website soon on basic C++ coding
Programming Blog: http://www.uberwolf.com