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!
#41
01/09/2007 (2:36 am)
Thanx Asmaloney...

Im downloading TGE1.5 now, to see what's up. Will get that fixed before I port it to TSE.
#42
02/06/2007 (4:59 pm)
Finally....finally......finally.....my stupidity has gone down a notch. I finally got this to work. Complete user error on my part. I commented out the advanced camera....mainly because I don't have that file. I am interested in having that as an option though.
#43
02/06/2007 (10:27 pm)
Im glad you got it working.
#44
02/12/2007 (10:31 am)
cool
#45
02/20/2007 (2:54 am)
Hi Guys,

We're having trouble implementing this into the new ADVANCED engine. Is it rendered in OpenGL or something? Does anyone have any ideas how we can get around this. We already had it in our TGE version of the game and it looked fantastic...Awesome resource.

Cheers

Harvey
#46
02/20/2007 (7:48 am)
I will do this in the next week or so... it's on my list (for my own game)
#47
02/20/2007 (1:36 pm)
Fantasic James! Good luck !
#48
02/21/2007 (8:54 am)
My mouse no longer controls the player. This happens when I load the radarctrl and then restart torque. What would cause this?

I found out that every time I save my PlayGui.gui file it would delete noCursor = "1"; and I wouldn't be able to use my mouse to control the player. not sure why it's doing that but.......
#49
03/28/2007 (12:59 am)
David: Sorry for only replying now. This is a (default) problem with TGEA (and maybe even TGE). Just enable CanSaveDynamcFields.
#50
04/02/2007 (10:28 am)
Anyone port this to the TGEA?
#51
04/12/2007 (6:42 pm)
Thanks for updating this, a great resource - I'm new to the torque does anyone have any tips on how to create the map bitmaps for this resource? thanks in advance
#53
04/27/2007 (4:50 am)
first of all nice resource - works fine :D

but i run in the problem to find a way to make a nice way to make a mapbitmap. First i used the terraform bitmap which is usually looing not so nice, then i played arround with the command map ( http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5277) to make a screen shot and use this image - but it dont work with all maps and i never get it managed to capture the full map.
Finnally i tried to make a screenshot in the world editor - but i also gave this up ;)

Anybody have an idea to get a "nice" picture of the whole map ?
#54
06/07/2007 (8:26 am)
how can you get this to make it where the different teams have different colors of blips?
#55
06/10/2007 (7:20 am)
so nice resource!
#56
07/27/2007 (6:52 pm)
I had the problem Dave started off with but do not know how to fix it.
#57
08/01/2007 (3:13 pm)
Excelent resource, worked "out of the box", thank you, saved me a lot of time,.

Tested with TGE 1.5.2
#58
09/15/2007 (3:50 pm)
This is a great resource and works flawless with 1.5.2!
#59
09/25/2007 (12:35 am)
I am using TGE 1.5.2. When I applied this guiRadarCtrl to my PlayGui, I got an odd result like this, it seems as if the png file's transparency lost.
1.

lh5.google.com/chenjianjack/Rvi3_CmsYXI/AAAAAAAAAEw/4jw97iGD41s/black1.JPG
2. From a different angle
lh6.google.com/chenjianjack/Rvi4FSmsYYI/AAAAAAAAAE4/4LbqDmKnhPk/black2.JPG?imgmax=512
The control was added like this:

new GuiRadarCtrl(radarsee) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "404 56";
Extent = "191 197";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
hovertime = "1000";
langTableMod = "1";
bitmap = "./map/scorchedPlanet.png";
wrap = "1";
RadarOn = "1";
RadarBitmap = "./map/radar_base.png";
RadarRange = "200";
blipColor = "0.34902 0.866667 0.823529 1";
centerBlipColor = "0.921569 0.188235 0.066667 1";
MapOn = "1";
MapBitmap = "./map/scorchedPlanet.png";
ViewAngleLinesOn = "1";
ViewLinesColor = "1 1 1 1";
CompassOn = "1";
CompassBitmap = "./map/compass.png";
};

btw, I don't use the advanced camera , I don't know if it is because of this that cause my problem.
#60
09/25/2007 (12:37 am)
Any ideas will appreciate.