RTS Pathfinding

  • I started a project a few months ago and decided I wanted to make an RTS. The problem I'm having here is the pathfinding, I can't seem to get my units to NOT overlap each other, is there a way to make them go around or near the waypoint if its blocked?

    I've recently got back into developing it and still need to figure out this problem :/

  • This problem is well known, and there is no public solution for c2 at the moment I have seen.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I started a project a few months ago and decided I wanted to make an RTS. The problem I'm having here is the pathfinding, I can't seem to get my units to NOT overlap each other, is there a way to make them go around or near the waypoint if its blocked?

    I've recently got back into developing it and still need to figure out this problem :/

    You could pin an invisible sprite thathe goes around the objectsame then set if sprite is overlapping/on collisions with sprite move objects right then back to path finding. or object in collision with another object move right then back to path.

  • I've already had a working solution with 2 objects.

    But if there are more (infinite instances), I could not figure out picking the right object instances in c2. With the IID's only, it is not easy choose which one of the "colliders" should react somehow if a collision is recognized - for example simply stop pathwalking, and continue when the "other" instance is outside of the collision range again.

    Maybe someone here has an idea of creating such an event.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)