[Plugins/Behaviors] Rez Repo

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • > i've encountered the same problem with going through walls and some more (sometimes no path is found even tho there clearly is one)

    >

    > dl.dropbox.com/u/45711709/testPath.capx

    >

    > Btw. i stole your points for the visualisation of the path ;D

    I've noticed a bug occurring which might explain the not finding a path I'll have a look into it.

    Ize

    I've figured out the problem whilst also fixing another problem which is always a good thing.

    When first clicking you try to find a path to line_of_sight.x and line_of_sight.y this is the same position as the Player object so that's why it isn't finding a path. I changed this to ClickX and ClickY and it works now.

    P.s. If you use another object that follows the Player object using lerp between the two positions of say 0.2 it would look really good.

  • Ize

    Here is the amended capx!

    Made all blockers cell aligned at 32 x 32 pixels and made all angles 0 for now. Will fix the Astar plugin and upload a new version soon.

  • sqiddster

    Figured out the reason for the badness in your capx. You were setting moveTo every tick when it should only be set every time it reaches a cell position. Due to an issue with bounding boxes just re-size instead of rotating for now. Will upload a new version soon with a way to set the blockers with positions instead of objects for more control.

    Here is the changed capx.

  • All righty... so my objects were slightly resized/angled, which stuffed it up I see.

    No problem. This isn't for me, it's for a friend. I'll check back every now and then to await the new version!

  • All righty... so my objects were slightly resized/angled, which stuffed it up I see.

    No problem. This isn't for me, it's for a friend. I'll check back every now and then to await the new version!

    Ok thanks for showing me anyways. New version up soon.

  • 00Rez thanks for looking into but with your fixed .capx it'll find a path but the going through blockers is even worse?

    oi44.tinypic.com/2vtbr4n.jpg

    Click at the blue spot and it will go through multiple blockers instead of walking around the "forest"

  • 00Rez thanks for looking into but with your fixed .capx it'll find a path but the going through blockers is even worse?

    http://oi44.tinypic.com/2vtbr4n.jpg

    Click at the blue spot and it will go through multiple blockers instead of walking around the "forest"

    Sorry Ize.

    Download this, it's the next version 0.22 and then try your capx.

  • Well it's a bit better but still:

    <img src="http://oi41.tinypic.com/23uvbbo.jpg" border="0" />

    I also have to click 2 times at the same spot sometimes to make it find a path and sometimes it still won't fine one

  • Well it's a bit better but still:

    <img src="http://oi41.tinypic.com/23uvbbo.jpg" border="0" />

    I also have to click 2 times at the same spot sometimes to make it find a path and sometimes it still won't fine one

    This is because the Astar is grid based. The problem when setting blockers is it finds the center of a cell and checks if this is inside the bounding box of the object and this is what causes overlap. I've decreased the cell size from 32 pixels to 16 for more precision. This should mean more points lie inside the blockers. Your capx I linked is updated so try again and see if its any better. Sorry for inconvenience Ize. I will possibly use a rectangle instead of a point eventually.

    How did you get the object in that position in the picture? Seems odd. Need to look into the bounding box issue further. I've made an action in the Astar object "Unblock/block using position" you can use this for more control over blocking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just clicked around on the map :D

    The last update to the capx seems to have done the trick <img src="smileys/smiley42.gif" border="0" align="middle" />

    I couldn't break it anymore :)

  • I just clicked around on the map :D

    The last update to the capx seems to have done the trick <img src="smileys/smiley42.gif" border="0" align="middle" />

    I couldn't break it anymore :)

    That's good. I just changed the size of each cell from 32 to 16 pixels. You can do this by clicking on the Astar object in the project window and setting the "Cell size". It's a good idea to snap objects to the same number as well.

  • Could the pathfinder work with isometric games? Do you plan to add an option to change the heuristic?

  • Could the pathfinder work with isometric games? Do you plan to add an option to change the heuristic?

    I will add more expressions for obtaining grid coordinates rather than pixel. I will also expand the actions to include the choice of grid or pixel inputs. As for isometric I haven't worked with it much. Would providing grid instead of pixel coordinates be enough?

    Manhattan and euclidean are a choice in the find path action. Would anymore be needed?

  • > Nice plugin! Is designed to make RTS game using your pathfinder plugin?

    Yes you could with a bit of messing and lerp.

    Here is a quick example I knocked up.

  • >

    > > Nice plugin! Is designed to make RTS game using your pathfinder plugin?

    >

    > Yes you could with a bit of messing and lerp.

    Here is a quick example I knocked up.

    Would it be possible to see the capx for this example? I've been trying to reproduce it without luck.

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