Giter VIP home page Giter VIP logo

Comments (4)

roy-t avatar roy-t commented on July 28, 2024

Hey exectails. I've given this some thought, and I think it will be extremely hard to implement without sacrificing a lot of performance. It would add a call to a delegate for every tile inspect. Which is very different from the list iteration we have now.

In the case where not all tiles are equal you could start looking at path finding algorithms for Directed Acyclic Graphs. (Which is also possible with A*). It might be nice to add a DAG path finding part to this library and a way to convert from DAGs to grids (with some meta info) and back.

from astar.

roy-t avatar roy-t commented on July 28, 2024

I've opened #18 to explorer this further. No ETA though :)

from astar.

exectails avatar exectails commented on July 28, 2024

I think it will be extremely hard to implement without sacrificing a lot of performance. It would add a call to a delegate for every tile inspect.

That would certainly not be desirable, though I wonder how much performance you would lose, have you done any benchmarks by any chance? My idea was that you wouldn't actually lose a lot/any performance because you replace the call to the current GetMovementOptions with the call to the delegate. Do you think the use of a static method gives a measurable advantage over a delegate?

from astar.

roy-t avatar roy-t commented on July 28, 2024

Sorry for the late reply. I've been pondering about this. But yes a call to a delegate is definitely slower because the compiler cannot think about what will happen until it runs the code. So optimizations like inlining are out of the question. Its also two jumps instead of one (from method to method vs, from method to delegate logic, to method in delegate).

from astar.

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.