Giter Site home page Giter Site logo

Comments (8)

SnpM avatar SnpM commented on July 20, 2024

from lockstepframework.

applebus avatar applebus commented on July 20, 2024

Thanks. This would allow doors and other type of passage blockers.

from lockstepframework.

SnpM avatar SnpM commented on July 20, 2024

Ok I gave it some thought and here's an elegant solution I think will do the trick.

Raycast from destination to start on the grid.
If the raycast hits an unwalkable node, it will trace along the "shoreline" of the unwalkable nodes, orbiting clockwise around the destination node.
If it fails to find an unwalkable node in the clockwise direction, it will assume that the wall is broken and that the destination node isn't trapped.
If the trace loops back to the original node, a closed path is detected.

Due to the selective direction of the trace preventing convex loop shapes, there shouldn't be false-positive impossible paths where both the destination and starting node are in the same trapped island of valid nodes.

Gonna post updates when I tackle this further.

from lockstepframework.

applebus avatar applebus commented on July 20, 2024

Any luck?

from lockstepframework.

SnpM avatar SnpM commented on July 20, 2024

I'm going to tackle this later potentially when we get to map designing + building placement in Desert RTS as I don't have any gameplay to test this with atm.

from lockstepframework.

LumpySpoon avatar LumpySpoon commented on July 20, 2024

Just a thought, you could group the nodes, assign the group with a name. If the unit is in group1 he could not travel to group2. To group them you could, in a loop, assign nearest nodes to group1. And if there is are any unassigned nodes start the loop again and just assign them to another group.

from lockstepframework.

SnpM avatar SnpM commented on July 20, 2024

Hierarchichal pathfinding is a great solution that cuts down on processing time for general paths as well.

The problem is its complexity to implement, especially for a dynamic grid system.

I'm going to look into it.

from lockstepframework.

SnpM avatar SnpM commented on July 20, 2024

Cutting down on large feature development plans.

from lockstepframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.