[Feature Request] Isometric Pathfinding

0 favourites
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Isometric tiles math.

    Yeah, but how to apply the path finding plugin to it. Is it necessary to create an invisible sprite + invisble obstacles in non-isometric view to the screen, run the pathfinding for the sprite and then translate the movement from the invisible sprite to the real unit we are supposed to see in isometric view? (this is for the case when someone wants the cell size of the grid to be the same as the tile size, so that basically only walking straight along the isometric tiles is allowed).

  • That's what I did for a turn based game. I copied the map to a smaller hidden grid and found the path on it.

  • Ok... a slight tangent from the thread, but here is a quick prototype I wrote way back in 2002 in Blitz3D

    It basically reads the map data from a 12*12 array grid... from that I can then show the same map in 8 different rotations including Isometric, which I hope shows visually Ashley's comment that Graphics are just a representation of the data.

    Run the application from inside the folder

    Use WASD to move around and QE to rotate the view...

    You can also use the mouse to read the grid coordinates

    IsoEngine.rar file

    May help may not :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mindfaQ

    Bingo

    Lets just call it isometric projection for sh*ts, and giggles.

    Also containers work wonderfully for it

    Actually, the tilemap object might work nice as well.

    Edit:

    Ashley would a system expression, or perhaps a behavior to do the conversion be doable?

  • Okay thanks. I'm just worrying about performance, but maybe invisible/hidden sprites don't use up that much performance?

  • Generally invisible objects, and layers have little impact, unless you use hundreds, and hundreds of objects.

  • Check out this approach to isometric pathfinding

    facebook.com/photo.php

    From Kenney.nl

    1. First I draw a polygon where the user can walk. This would be the ground where no obstacles are.

    2. Then the game automatically generates a tile map over the polygon, whenever a tile touches a polygon it's marked as a walkable tile.

    3. Using the A* algorithm I calculate the path from the player to the point he has to walk to. Diagonals are a bit more 'expensive' to walk on, read more about A* here: en.wikipedia.org/wiki/A*_search_algorithm

    4. Now comes the best part: I shoot a raycast vector from the first point in the path to the next, if the raycast doesn't hit the edge of the polygon then it goes to the next point...and the next, and the next. Until it hits an edge of the polygon, then it marks a point back as a straight line. It does this for all poins, resulting in a smooth, straight path which looks very natural and would be the path we humans would take.

    5. Hide everything for the user and make the player walk along the path.

  • "I love the new pathfinding plugin, but I think it's a bit too limited. I think It would be better if you could specify what sprites the pathfinder CAN use as well as the ones it cant. "

    Might give you a start, since adding an extra condition should allow you to add the obstacle or not depending on group matching, via an instance variable set on your obstacle...

    2 conditions:

    System / On start of layout

    (your obstacle sprite here) / "obstaclegroup" = "1" (Compare Instance Variable)

    1 action:

    (your character sprite here) / Add Pathfinding obstacle (your obstacle sprite here)

    And in Properties panel, on your obstacle sprite, ensure you have an Instance Variable created. Name it "obstaclegroup" and set text value to "1".

    "To make it more clear my post what I mean is that the current pathfinding from scirra still do some minor diagonal movements even when the diagonal are disabled. If a gamedesigner want only straight movements like up, down, left or right (like a Final Fantasy from SNES) then it will have to use another way to make possible pathfinding while respecting the movement."

    I totally agree with you. Would be terribly useful for those developers who need that. It seems there is no easy way to avoid that with Scirra's Pathfinding.

    "I had to use another pathfinding plugin to make possible what I want in my game, "

    Which other one did you used? Can I know please?

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