Game Development Community

Collision,triggers and updates to RTS

by James Novosel · in RTS Starter Kit · 11/20/2004 (9:05 am) · 28 replies

Just purchased both the SDK and the RTS kit (mainly interested in the RTS stuff).
Demo works fine. Ran thru some sample scripts from Kevin Harris on codesampler.com (they worked okay) and then tried to implement two of these in the RTS demo:
1) collision and 2) trigger area. I'm about 6-8 hours into trying to get these to work in the RTS and cannot get it done - Am I missing something basic, like the RTS doesn't do collision or trigger areas ? Complete newb to Torque but trying to get up to speed asap. (Also did a build of the source code using VS.Net2003, the resulting exe works okay as well).

If the RTS is updated do I need CVS to get the updates or will they appear in MyGarage or somewhere else ?

I get the impression that this is still somewhat 'beta' from some of the comments in the script code and some other posts.... is this a work in progress ?, ( if you need someone to test I'd love to be a guinea pig (20+ years in the IT field and spent a tremendous amount of time modding Renegade and the Battlefield series).

Great job so far !!! Hope the next rev incorporates some of the AI and pathfinding-terrain stuff mentioned in other posts.

Thanks in advance for any answers/comment !!!
Page«First 1 2 Next»
#21
02/10/2006 (12:31 pm)
Yeah, I've seen that piece of code, now that you mention it.
I did the following as was recommended somewhere else in the forums (for hovering units);

if (mFabs(location.z - height) > 0.01)
      {
      	 //ALL UNITS HOVER BECAUSE OF THIS HEIGHT ADJUSTMENT
         location.z = height + 4.063f;
         setMaskBits(MoveMask);
      }

The good news is, my ship doesnt even move. So it is just a stationary platform out over the ocean somewhere, with walls and doorways, and no ceiling. Very much like walking over a bridge.

I actually have the movement working nicely, but the units are "hovering" over the floor, rather than actually standing on it. The user would never know. But it seems like the wrong approach.

If someone wanted to have RTSUnits walking around in a multi-level building, the same issue would apply. Or, to be more familiar, imagine if an agent wanted to stand atop a watch tower or wall. For now, I would just have to hover them.

I guess the selection circles being bound to terrain is another issue. I'd like the selection circles to cast onto the deck, rather than the terrain under the water.
#22
02/10/2006 (12:39 pm)
You would need to do a rayCast down from the unit's height (well, actually do it from well above the height) and see if it intersects any objects. Right now, it simply finds the terrain height of the unit's gridpoint and sets that.

Note that this wasn't implemented, because to handle all cases it is a -lot- more complex, but for the ship example above, you should be ok. Multiple level interiors/dts's would need to implement some way to go up stairs/ramps as well, but not go up walls, etc....which is rather complex and wasn't implemented due to both game agnostic requirements as well as physics optimization.
#23
03/25/2006 (4:58 pm)
Quote:There is a full out re-write of the vis Manager in development right now, with extensibilty of the algorithm to be able to handle high performance collision detection/avoidance easily set up once the binning system gets fully debugged. I can't give any promises on timelines, but we do plan on being able to give demonstration code for a way of implementing higher performance collision handling for the RTS-SK in the future!

I'm really quite new and haven't delved very far into the code yet, but out of curiosity, has this been implimented yet? Thanks!
#24
03/27/2006 (8:19 am)
Not yet, but it is being considered for the RTS-SK update (which, while a long time coming, is in the works).

No update information will be released for quite a while, as it is several months in the future.
#25
03/06/2007 (4:48 pm)
Does anyone have a working "simple" path finding algorithm implemented? as well as object collision (ie. unit to unit collision, and unit to building collision)?

if so please let me know how to go about it, please and thank you!
#26
03/07/2007 (4:47 am)
There is simple path finding algorithm
http://www.garagegames.com/mg/forums/result.thread.php?qt=40221
#27
03/07/2007 (12:17 pm)
The method I went with is a simple collision avoidance method. Do a raycast in the direction of movement and if something is there, turn right and try again. If surrounded, pause and wait.
#28
03/16/2007 (12:18 am)
@Benjamin

Can you provide full source code, this would be excellent add-on to my game.

Thanks in advance!
Page«First 1 2 Next»