Pathfinding to exact pixel.

Discussion and feedback on Construct 2

Post » Sat Jul 18, 2015 2:33 pm

Why does the pathfinding send an object near the destination and not exactly to the destination?
It seems to just stop right before the coordinates instead of exactly on the coordinates. Why is this?
Can it be fixed without having the object awkwardly jump to the destination after stopping?
B
4
Posts: 17
Reputation: 234

Post » Sat Jul 18, 2015 4:43 pm

That's the movement, not the pathfinding.
The reason it's not to the pixel is because it uses interpolation between positions, and don't for get it uses cells for leeway.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Fri Jul 24, 2015 1:40 pm

It is a crap system. It is completely unusable because why would I ever want my units to move just close to the destination?
B
4
Posts: 17
Reputation: 234

Post » Fri Jul 24, 2015 3:38 pm

Mostly because you would not want all units to occupy the same coordinates.
Its a great system, it does require a good bit of understanding and forethought. Enough to make it feel somewhat unfinished.

There are other pathfinders I might add.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Fri Jul 24, 2015 8:11 pm

The pathfinding behavior does make some things really easy, but it has limitations.

I am making an isometric RPG, and I use the pathfinding object a lot. It's what made the game possible.

I have a couple issues with it though. It is not very good for "tile" based games like Civilization because, as you said, the characters will never go to the exact spot. So, you will have to scoot them over using another event to get them in the exact center, and that never looks very good. This is why I got rid of tiles completely and just let characters walk wherever they want.

The second issue is that it does not handle moving objects very well. So, if you have multiple enemies coming at you, they will walk through each other and even stand right on top of each other. I wish I knew how Baldur's Gate or Age of Empires kept units from overlapping.
B
83
S
30
G
35
Posts: 340
Reputation: 23,096

Post » Sat Jul 25, 2015 9:35 am

DrewMelton wrote:The pathfinding behavior does make some things really easy, but it has limitations.

I am making an isometric RPG, and I use the pathfinding object a lot. It's what made the game possible.

I have a couple issues with it though. It is not very good for "tile" based games like Civilization because, as you said, the characters will never go to the exact spot. So, you will have to scoot them over using another event to get them in the exact center, and that never looks very good. This is why I got rid of tiles completely and just let characters walk wherever they want.

The second issue is that it does not handle moving objects very well. So, if you have multiple enemies coming at you, they will walk through each other and even stand right on top of each other. I wish I knew how Baldur's Gate or Age of Empires kept units from overlapping.


Using chipmunk physics will make them bounce of each other :D
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Sat Jul 25, 2015 6:18 pm

megatronx wrote:Using chipmunk physics will make them bounce of each other :D


Hmm, I'll have to check it out. As long as it doesn't make them look silly or end up in a wall, it may work.
B
83
S
30
G
35
Posts: 340
Reputation: 23,096


Return to Construct 2 General

Who is online

Users browsing this forum: GoofyremaG871 and 19 guests