Jump to content

  • Log In with Google      Sign In   
  • Create Account


A* laggy


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 polyfrag   Crossbones+   -  Reputation: 1802

Like
0Likes
Like

Posted 14 August 2012 - 07:49 PM

I have an RTS with 50-128 workers that automatically start moving when you start a building construction. It works fine but then gets laggy as the units bump into each other and have to reroute. As they get closer to the building gets blocked off with no possible path to it. And I disable pathfinding after they're stuck with no way to the building.

But I must be doing something wrong because it's laggy.

I tried doing pathfinding in a separate thread but it crashes.

Any ideas?

Sponsor:

#2 polyfrag   Crossbones+   -  Reputation: 1802

Like
0Likes
Like

Posted 14 August 2012 - 07:51 PM

I think somewhere it must be searching the whole map for a path to the blocked-off building each frame.

#3 IADaveMark   Moderators   -  Reputation: 2397

Like
0Likes
Like

Posted 14 August 2012 - 08:07 PM

Do all the workers have to work on the building? Do you have to do a repath in A* when they bump into each other? If this isn't grid-based, is local steering an option?

You haven't told us enough about your situation for us to help.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#4 polyfrag   Crossbones+   -  Reputation: 1802

Like
0Likes
Like

Posted 14 August 2012 - 09:11 PM

Never mind, I'm just going to mod the Spring RTS engine.

#5 jefferytitan   Crossbones+   -  Reputation: 1991

Like
0Likes
Like

Posted 14 August 2012 - 09:44 PM

Probably the paper below covers what you want:
http://www.cs.ucl.ac.uk/staff/D.Silver/web/.../coop-path-AIWisdom.pdf

Essentially search from the shared destination back to the individual workers, and book time slices so workers co-operatively avoid each other. Hope that helps!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS