Git Product home page Git Product logo

Comments (7)

chrismdp avatar chrismdp commented on August 22, 2024 1

https://www.npmjs.com/package/ngraph.path

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024 1

http://totologic.blogspot.com/2014/01/accurate-point-in-triangle-test.html?m=1

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024 1

We can do square building by allowing a build across both edges of the hex: https://www.google.co.uk/search?q=hex%20grid.buildings&tbm=isch&hl=en-gb&hl=en-GB&tbs=rimg:CUjaAwVEccLAYU6kqadzVVW0&client=safari&prmd=isnv&sa=X&ved=0CBIQuIIBahcKEwiAisD_hPvrAhUAAAAAHQAAAAAQBw&biw=441&bih=650#imgrc=UOR84CLcjdqCAM

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024

Need to tackle this before real-time experiment, as I need this in order to do both real-time and turn based gameplay

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024

Actually: another much simpler way of doing this would be to reduce the size of the hexagons and make houses and fields take up more than one hexagon. Can then build Astar pathfinding fairly easily.

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024

Scrap wall tile buildings - it doesn’t really work and is confusing to work with. Instead I could increase the hex size again, and have buildings take a whole hex with one of six rotations so there’s an entrance side. The rest of the hex is blocked off.

Then when pathfinding across hexes, the person always aims for the exit side which means a) people might walk side by side and b) they’ll always walk in straight lines even when pathfinding doesn't work.

from tinyking.

chrismdp avatar chrismdp commented on August 22, 2024

Next I need to path using the sides of the hex so I'm not going over all the centers each time (which is a waste). I have this information in the navigation map, so I need to return it from the pathfinding algorithm.

After that I should do better weights on the path - trees should be twice as slow (and reduce your speed).

from tinyking.

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.