Pathfinding breaks on unbounded scrolling!

0 favourites
  • 6 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Problem Description

    When setting the layout to unbounded scrolling, the pathfinding bounds does not move to the screen location. It stops at the initial viewport.

    Attach a Capx

    http://1drv.ms/1IAGj4K

    Description of Capx

    Demonstrates that the pathfinder cannot discover a path out of the initial view area

    Steps to Reproduce Bug

    • Step 1. Use arrow keys to move blue block a short distance.
    • Step 2. Click to send the Red block.
    • Step 3. See that the red block does not move out of the initial area

    Observed Result

    The Red block will move but only in the area set in the layout.

    Eg: if layout is 640 by 480, and if you click outside this, then the block will move towards the spot but stop when reaches the border of the 640 by 480.

    Expected Result

    I expect the block to move to the spot no matter how far I scroll with the unbounded scrolling setting on.

    Affected Browsers

    • Chrome: (YES)
    • Opera: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    System : Windows 8.1 Pro

    Construct 2 Version ID

    version r210

  • Pathfinding is based on a defined grid.

    The best option is to increase the layout size beyond what the camera requires.

  • Setting the layout size works, but it is rough on the CPU usage.

    I am making a game that will have endless level size (Like Minecraft), so this does not work too well for me.

    Thanks anyway.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Minecraft isn't really endless, it's based on a seeded random.

  • Here is what I am working on: https://www.scirra.com/arcade/other-gam ... gress-1577

  • This is by design. The Pathfinding behavior uses an obstacle map. Unbounded scrolling allows for infinite scrolling. Therefore to support pathfinding anywhere with unbounded scrolling would require an infinite amount of memory. See the manual entry:

    [quote:262e7531]Note all cells outside the layout area are always obstacles. Areas outside the layout area cannot be included in the pathfinding grid, since doing so would require an infinite amount of memory.

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