[Feature Request] Isometric Pathfinding

Discussion and feedback on Construct 2

Post » Fri Jun 14, 2013 6:06 am

@Guif0DA: Nothing prevents you from programming/handling your own movement and only using the pathfinder to calculate the path.
Then you'd have exactly the type of movement you want for your game.

@Jase00: It is indeed already supported. This is done by setting the property "Obstacles" to "Custom" and using the pathfinder action "Add obstacle".
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
268
S
96
G
66
Posts: 7,217
Reputation: 73,225

Post » Thu Nov 28, 2013 9:07 pm

Bit late to the party but must add a big +1 to the request for isometrc pathfinding.
I can't see at all (been trying for a week) how the current pathfinding nodes translate to isometric, they do 2.5d well but that's a whole different game style. Isometric tile heights are half the tile width and the whole board (and each node obviously) is a diamond not a square so odd and even rows/columns of nodes will be offset from the one above.

Setting the layout angle to 45degs gives a close approximation, ie. coming directly N,E,S or W leads to the correct zigzag motion.

Hopefully I'm missing the obvious and will keep on trying wither way :)
flibble2013-11-28 21:37:03
B
6
S
2
Posts: 23
Reputation: 712

Post » Thu Nov 28, 2013 10:34 pm

@fibble

When you want to make an isometric game, you're supposed to virtually program everything on a square, regular grid (imagine a minimap, top-down view). All the pathfinding, gameplay, AI stuff... happens there. Then, you convert the position of your assets to the isometric system.

You can probably google it or find some resources on the forums.

Good luck,
Nathan
B
76
S
19
G
4
Posts: 311
Reputation: 12,279

Post » Thu Nov 28, 2013 10:56 pm

I've been reading endless programmers thoughts on it so far (Mostly searching A* isometric alogs) and haven't heard that said yet but you may well be right :)
However, In C2 and specifically the pathfinding it wont work due to the offset of the tiles as they are not square.
This won't divide into a square grid whatever way you rotate it.



I'll keep on trying though!

B
6
S
2
Posts: 23
Reputation: 712

Post » Thu Nov 28, 2013 11:11 pm

Image ImageImage
B
164
S
49
G
138
Posts: 7,951
Reputation: 91,868

Post » Fri Nov 29, 2013 2:05 am

[QUOTE=newt] Isometric tiles math.[/QUOTE]

Yeah, but how to apply the path finding plugin to it. Is it necessary to create an invisible sprite + invisble obstacles in non-isometric view to the screen, run the pathfinding for the sprite and then translate the movement from the invisible sprite to the real unit we are supposed to see in isometric view? (this is for the case when someone wants the cell size of the grid to be the same as the tile size, so that basically only walking straight along the isometric tiles is allowed).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Fri Nov 29, 2013 2:31 am

That's what I did for a turn based game. I copied the map to a smaller hidden grid and found the path on it.
B
215
S
57
G
32
Posts: 900
Reputation: 38,777

Post » Fri Nov 29, 2013 2:46 am

Ok... a slight tangent from the thread, but here is a quick prototype I wrote way back in 2002 in Blitz3D

It basically reads the map data from a 12*12 array grid... from that I can then show the same map in 8 different rotations including Isometric, which I hope shows visually Ashley's comment that Graphics are just a representation of the data.

Run the application from inside the folder
Use WASD to move around and QE to rotate the view...
You can also use the mouse to read the grid coordinates

IsoEngine.rar file

May help may not :Darontwose2013-11-29 02:47:32
B
8
S
3
G
1
Posts: 34
Reputation: 1,395

Post » Fri Nov 29, 2013 12:01 pm

@mindfaQ

Bingo

Lets just call it isometric projection for sh*ts, and giggles.

Also containers work wonderfully for it
Actually, the tilemap object might work nice as well.

Edit:
@Ashley would a system expression, or perhaps a behavior to do the conversion be doable?newt2013-11-29 12:06:04
Image ImageImage
B
164
S
49
G
138
Posts: 7,951
Reputation: 91,868

Post » Fri Nov 29, 2013 12:10 pm

Okay thanks. I'm just worrying about performance, but maybe invisible/hidden sprites don't use up that much performance?
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests