Game Development Community

Radar/Map/Compass Control Update (GuiRadarCtrl)

by James Laker (BurNinG) · 07/03/2006 (11:33 am) · 74 comments

Download Code File

Just updated and cleaned the Scrolling Map, Radar, Compass gui Control resource a little.

- Now Works with TGE 1.4 to TGE 1.5.1 out of the box.
- Can Turn the Radar, Map and Compass On/Off in the GUI Editor
- Select Bitmaps in the GUI Editor (not Hardcoded anymore)
- Can Change Blip Colors in the GUI Editor
- Can Change ViewAngleLine Colors of the Map in the GUI Editor
- Can Turn the ViewAngle On and Off in GUI Editor
- Can Set the Radar Range in GUI Editor (F10)

To install and use:
1) Backup old guiRadarCtrl.h/guiRadarCtrl.cc
2) Add the files from this resource (Note that the gui Directories in TGE1.4 changed)
3) Recompile
4) In the GUI editor (F10) add the GuiRadarCtrl

Advanced Camera: - Thanx OneST8
To use with the advanced camera just change line 312 in guiRadarCtrl.cc:
//conn->getControlCameraTransform(0,&cam); // store camera information
to this:
control->getEyeTransform(&cam);

Credits Thor Zollinger/Matt Webster for the original resources!
Page«First 1 2 3 4 Next»
#61
09/25/2007 (5:07 am)
Does the Transparency using the file included in the file, work on your system?
#62
09/25/2007 (5:34 pm)
Yes, I open these png files with photoshop, and their transparency works fine. Furthermore, I am just using the png files from this guiradarctrl.zip.
It makes me go crazy :(
#63
09/26/2007 (6:29 am)
Make sure you save the PNG as interlaced, for some reason when you don't they won't work.
#64
09/26/2007 (5:33 pm)
Yes, they are resave as interlaced, but with no luck :(
#65
10/01/2007 (6:08 pm)
maybe change the profile from GuiDefaultProfile to GuiTransparentProfile ?

Edit: nope, I have the same problem and that didn't work
#66
10/23/2007 (5:56 am)
I know it sounds strange but some people uses D3D to render the game and GL_POINTS dont seam to work with the wrapper. So if you want to use the radar with D3D you may replace the GL_POINTS with dglDrawRectFill.
#67
02/14/2008 (2:46 pm)
Hmm...

I'm getting the same problem that Neill had and that David had. I know that David was able to fix his problem, but I too commented out the include for the advanced camera and couldn't get it working...

AHAH! Just solved it right now believe it or not. I'm a newb... I think that I was adding the files incorrectly to the .net project. I fixed it after having to right click and add existing item to the over-arching Torque Demo project (instead of just to the gui folder), making sure I wasn't in debug mode, and then rebuilding my solution.

... I could be wrong, but I'm just pretty jazzed I got this working! Awesome resource!
#68
03/10/2008 (7:28 am)
Can anyone help me out in this thread in adding a little feature to this resource...
#69
04/20/2008 (12:49 am)
Compass display bug fix

find
if (mCompass && mCompassTextureHandle) {
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
//glDepthFunc(GL_ALWAYS);
add
if (mCompass && mCompassTextureHandle) {
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
//glDepthFunc(GL_ALWAYS);
#70
12/09/2008 (2:14 am)
Hello everyone... It won't work on me. I am using TGE 1.5.2

GuiRadarCtrl did not appear in New Control... please help.

@ David Byrge, your problem before is my problem today what did you do to make it working? Please help.
Thanks
#71
12/16/2008 (7:37 pm)
I have it in and working- basically. When I make the control a direct child of the GuiTSCtrl in the main play gui, it shows up fine. But if I make it the child of any other control, poof, it goes away and doesn't render! I'm looking through the source right now, maybe I'll catch something, but has anybody else encountered this problem?
#72
12/16/2008 (8:51 pm)
nice
#73
01/04/2009 (5:28 pm)
Still haven't been able to fix the problem. Has anybody else encountered this issue? This seems like a major bug in the resource!
#74
07/04/2009 (8:21 pm)
Thanks a lot!, tested in 1.52.
i put this fixed:
if (mCompass && mCompassTextureHandle) {
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Page«First 1 2 3 4 Next»