Advertisement

Shoo shoo on a RTS Game

Started by July 11, 2005 12:10 PM
0 comments, last by Palidine 19 years, 7 months ago
After i implemented my pathfinding algorithm, some new problems came up and i'm still trying to solve them. The most of them, are some special cases, where the units should get a little bit intelligent. In example. Imagine, that a unit X is surrounded by other units, and there's no path, X can take to come out. If the user orders X to leave it's position, how the other units should react. Where should to go at? Should they reenter there old Positions after movement? And additional in this context. Should they react by itself (so, should they get some intelligence), or should a general system move them? And ... more gernerally. What kind of problem is this? Up to now the units are in fact absolutly dumb, and shouldn't get very clever. But it seems, they need at least some kind of intelligence. Any ideas? Where i've to look at for that kinds of problems? thanks and regards, stefan
I think you can do something like:

ignore other units when making paths but keep track of the units that are on the solution path

when you actually find a solution, order the other units to move off of your solution path

move your unit

then you can either tell the units to go back where they were or just leave them where they are now. The latter is how the Generals/Battle for Middle Earth engine handles it.


You could also go a potentially easier route and:

ignore other units when calculating a path

move your unit

if it collides with another friendly unit and the friendly is idle, move the friendly out of the way. if the friently is moving, let it continue.

continue movement.

-me

This topic is closed to new replies.

Advertisement