Nabu's Forum Posts

  • Thank you for reply

    So it is impossible to get right path with pathfinding and cell size the same as tile size ? I don't really understand. In the example the tiles in diagonals in the walls are marked as obstacle, even with -1 cell border.

    Also, as you can see in the example, the pathfinder put nodes right on top of declared obstacles. I think it's actually a bug. I modified the project file in example and added a enclosed zone to the right of the layout. See that you can go in there (Pathfinder put a path node on a declared obstacle), but you cannot go out from there.

  • If some other people get stuck with the problem, I came with a backup solution. The problem is to keep objects moving in diagonal but also to not find path between two close diagonal tiles.

    Use the Pathfinding behavior with diagonals off, only to find a path and avoid setting path between two diagonal tiles. And for the movement, use another behavior and regularly test if the next node on the path is in line of sight or directly reachable via raycasting or whatever. If so, then set the object to follow on with this next node.

  • Hello,

    I found the possibility in Construct 2 to have multiple Pathfinding behaviors for the same sprite or family, and different Pathfinding behaviors with different name for different objects. This actually seems to do nothing cause there can be only one (Highlanders !!) Pathfinding behavior at a time. For example, if you use multiple behaviors and set different obstacles for each one, only the first object or family declared as obstacle will be record and apply for all objects that use a Pathfinding behavior.

    So why do we have this possibility in the editor that does nothing ? It would be really cool to have multiple pathfinding behaviors, with different obstacle maps for some projects.

    A capx that illustrates the problem :

    https://www.dropbox.com/s/rop1x9ysydnqb9c/PathfindingProblem3.capx?dl=0

    A link to a closed bug report about the same problem :

    https://www.scirra.com/forum/viewtopic.php?f=152&t=166387&p=1004339&hilit=pathfinding+different#p1004339

    I really think the Pathfinding behavior should be improved. Also there's problem with the diagonals that some other people mention in the forums. My bug report on this : https://www.scirra.com/forum/viewtopic.php?f=151&t=170406

    Ashley, please, can you do that ? It would be so great !

  • Problem Description

    Pathfinder find path where it should not, in in the diagonals.

    Even an object with a size of 1x1 could not pass and follow the returned path.

    Attach a Capx

    https://www.dropbox.com/s/ta0lowufer55sm6/PathfindingProblem2.capx?dl=0

    Description of Capx

    Here's a little capx to display a pathfinding problem. Any click to move the red sprite. Try to go left or right and see that it can pass through diagonal walls. R to retry and space to display obstacle map.

    Steps to Reproduce Bug

    Just try to go behind the walls. In theory it's impossible because there's not space between tiles. Try to go into the enclosed area on the right and see that you can pass through wall, but you cannot find out path.

    Observed Result

    Object find path through walls hen diagonal movement is enabled.

    Expected Result

    Find good path, because the pathfinder leads the object to bounce against walls if piloted by physics or other movements.

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Windows 7 SP1

    Construct 2 Version ID

    Construct 2 Release 223

  • Really ? Nobody ? I edited the link in the first post so it now displays the pathfinder nodes onscreen. This is a strange behavior.

    Please, I need help on this.

  • Hello ? Nobody ?

  • Hello,

    Here's a little capx to display a pathfinding problem. Any click to move the red sprite. Try to go left or right and see that it can pass through diagonal walls. R to retry and space to display obstacle map.

    https://www.dropbox.com/s/ta0lowufer55sm6/PathfindingProblem2.capx?dl=0

    Is this an intended behavior of the pathfinding plugin ? I use a cell border of -1 because otherwize the obstacles are way too large. And a cell size of 32, the size of the tiles. Why does the pathfinder ignore the size of the object that's moving, and make it pass through diagonals.

  • Hello MarkeGamer,

    I've never used the touch but, basicaly I think just check the direction of the touch (with somethin like touch start and touch end, I don't know) and apply an impulse with Chipmunk physics at that direction or an angle (switch to polar when setting the impulse).

  • R0J0hound,

    I didn't think of tiny tilemap, or pasting a little sprite. Thanks for the tip.

    It is a bug in your plugin using WebGL ? Or does it come from WebGL only ? It's strange.

    Thanks for your help.

  • Hey R0J0hound,

    I was using WebGL, and the problem doesn't occur anymore when I disabled it. Everything is correctly drawn without it. So you're right it's related to WebGL. So what can I do ? I used the Paster plugin because of that, in comparaison with Canvas.

  • What do you mean by orientation, scrolling ? In project properties, under Configuration Settings, you have orientations option, landscape, portrait.

  • Try Construct 3

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

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

    Check every tick or every seconds if the object's size has reached a value, then disable the Sine behavior and set the object's size by yourself if needed (using scale object property, or dimensions directly).

  • No it's not mainly for big projects. It ensures that all ressources are loaded before doing anything. It's not a replacement for what you're already doing, it just loads all the graphics and the sounds if you have set the "Preload sounds" in the project properties.

    What you can do is wait for "On loader layout complete" to trigger and wait for the AJAX server side requests during the loader layout, while displaying a progression bar or something like that. Once all these things are done - you can here use variables for completion - you change to your next app layout.

  • fm4fanAT

    I'm gonn try it now.

    Thank you very much !

  • Sorry for this question, but I can't figure out how to mention the name of someone in a discussion.

    There's no button I see so quote the name or reference someone.

    How do you do that ?