Game Development Community

Drawing mission area outline

by Andy Schatz · in Torque Game Engine · 08/14/2005 (10:33 am) · 12 replies

I'm trying to draw an outline on the terrain around the edge of the mission area by using the same technique as the selection outline (the green selection outline used in the RTS Pack). The terrain rednering code in terrRender.cc is pretty hairy though. I'm probably just going to start by copying and pasting all the selection code and adjusting the number of tris it draws on, but this is a fair amount of code. Does anyone have a good idea about how to go about doing this?

#1
08/14/2005 (10:45 am)
You mean like they did it back in Tribes 2? A "forcefield:ish" effect around the mission border?
#2
08/14/2005 (11:00 am)
There are already posted resources on the matter, search mission area !
#3
08/14/2005 (11:44 am)
Thanks guys -- I'll give it a try. I was really hoping for something that mapped to the terrain like the selection circle does (see lion screenshot: www.garagegames.com/blogs/44702/8315)

But free and done is better than difficult and not-done. THanks for you help. I'll give this a try and see if I can mod it to do what I want.
#4
08/14/2005 (12:10 pm)
Andy if you still need help with that I might be able to help you out..
EDIT: oh you just posted today, I guess you need the help. I think I found a way to get that selection circle(from RTS kit right?) to draw anywhere on the map. Ill post what sources I can in this forum later today. BTW Check your email.
#5
08/14/2005 (1:18 pm)
Update:
The forcefield is VERY MUCH not in the style of my game, unfortunately. Even with a different texture, I'd rather have no forcefield than that one :(

Right now I'm working on adjusting fxFoliageGenerator to plant a ring of grasses around the edge of the mission area (which, by the way, I've switched to be a circle). Should look pretty good, I think.
#6
08/14/2005 (1:30 pm)
Two really easy ways of doing this if you own the RTS Pack, although should work without. One way would be to have a unit in the middle of the map hidden and have a selection circle on him the size of the mission area since your mission is circle anyway, that should work. You could always just change terrainselection.cs to add a static circle around the map, I will do that my self and post in the RTS Forums, if you have it come grab the code, ill post it later.
#7
08/14/2005 (1:31 pm)
Cool, good idea, thanks Robert.
#8
08/15/2005 (10:38 am)
The selection circle code is liable to get very slow if you try to draw a circle that big - it works by redrawing all the geometry in the vicinity of the circle, so you'd be essentially drawing all the terrain geometry in the scene twice.
#9
08/15/2005 (2:58 pm)
Although you could not bind it to the ground and have it at a static height and it should be fine right? That is probrally useless though. You could always paint it on the terrain.
#10
08/15/2005 (11:01 pm)
Hi guys... thanks for your input. I ended up making a custom foliage generator that places the foliage items in the vicinity of the mission border (which in my case is a circle). It fits into the world, is non-obtrusive, and it performs fine. So I think the problem is solved.
#11
08/16/2005 (12:13 am)
Good solution. Glad you got it figured out!
#12
09/11/2005 (1:32 am)
I like how EA's doing it with Battlefield 2... On the map it's shaded at "out of area"..
If you go out you get a warning and timer. Then you die if you don't return to "mission area".