Pathfind behavious uses previous layout's size as a limit

Bugs will be moved here once resolved.

Post » Mon Feb 08, 2016 10:17 pm

Message: jmberaldo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Problem Description
If I load a new layout that is larger than the previous one, then order a sprite to follow a path, it moves only as far as the previous layout's size, and considers it 'reached'

Attach a Capx
https://dl.dropboxusercontent.com/u/205 ... ngBug.capx

Description of Capx
Layout 1 just loads Layout 2 on any key press
Layout 2 starts with Sprite moving across screen to reach Sprite 2 with Pathfinding behaviour
TiledBackground is there to show Layout 1's size

Steps to Reproduce Bug
  • Make two layouts, the first smaller than the second
  • Place an object on Layout 2 and tell it to move to somewhere beyond Layout 1's size
  • Start from Layout 2 and see the result
  • Start from Layout 1 and see the result

Observed Result
If I run Layout 2 alone, it works perfectly
If I run Layout 1 first, Sprite seems to ignore that Layout 2's size is larger and still uses Layout 1's size as a limit to its path

Expected Result
Sprite 2 should move along the whole of Layout 2's size

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES/NO)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 7

Construct 2 Version ID
Release 22 (64-bits), Steam
B
7
Posts: 13
Reputation: 553

Post » Fri Feb 12, 2016 1:53 pm

.capx link is invalid, closing.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Sun Feb 14, 2016 6:24 pm

Really?

"Message: jmberaldo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?"

Which means it's the forum's fault... The bug still exists and I did follow the template

Trying again...
https://dl.dropboxusercontent.com/u/20500516/PathfindingBug.capx
B
7
Posts: 13
Reputation: 553

Post » Mon Feb 15, 2016 11:58 am

Reopened, link works. If you read our bug report guidelines, they cover why the link is changed and how to get around it.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Mon Feb 15, 2016 5:29 pm

Regenerate obstacle map.
B
31
S
14
G
6
Posts: 160
Reputation: 5,804

Post » Wed Feb 17, 2016 5:14 pm

I've encoutered the same problem.

I'm working on a game where characters move between points in a scene using the pathfinding behavior.
They are also global objects, moving from scene to scene (from a layout to another).


But if they move from a layout to a bigger one, the bug jmberaldo mentionned happens. At some point, my characters stop at the limit of the previous layout. Or, if they were placed outside the boundaries of the previous layout, they don't move at all.


Updated example is the capx.

h*t*t*p*s://drive.google.com/file/d/0B6Z98-dLzRUmdVFtcmlxd29UZ1U/view?usp=sharing

EDIT : (I've checked if obstacles were properly regenerated. They are.So the problem lies with construct not taking account of the new dimension of the layout)
Last edited by Ouikka on Thu Mar 17, 2016 9:23 am, edited 2 times in total.
B
4
S
1
Posts: 7
Reputation: 364

Post » Wed Feb 17, 2016 8:36 pm

@Lasmelan, yes, that works, but that's a workaround. The expected system behavior is not taking previous layouts in consideration, or else, or I'll need to use regenerate obstacle map for every object on every layout (which the game itself warns is a costly action).
B
7
Posts: 13
Reputation: 553

Post » Wed Feb 17, 2016 8:41 pm

@jmberaldo In my Tower Defense game every time a tower is built or sold, I regenerate every enemy's path obstacle map around that tower (well, that's inevitable). No lags yet.
B
31
S
14
G
6
Posts: 160
Reputation: 5,804

Post » Thu Feb 18, 2016 12:53 pm

In this case, if the obstacle is placed in the new layout outside the boundaries of the previous one (see my previous updated capx), the regenerate map option does not work. Obstacles are updated, but not the layout size, wich prevent the sprite to find his way, because construct does not calculate path outside of canvas.
B
4
S
1
Posts: 7
Reputation: 364

Post » Fri Mar 04, 2016 9:26 am

Any news on this one? I'm trying to have a vertical slice of my game for a festival in April, but with this bug my version just won't work :'(
B
4
S
1
Posts: 7
Reputation: 364

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest