Making a turn based game with true A* pathfinding

Get help using Construct 2

Post » Sat Jan 05, 2013 10:56 pm

Hi. I'm new to Construct and to this forum, but I have quite a bit of experience using Clickteam products. I've been looking at Construct for some time, and I'm so impressed with what I'm seeing that I've frankly been looking for an excuse to switch.

I'm currently attempting to make a turn based isometric dungeon crawler for tablets, and I've been running into a lot of issues attempting to create it using Clickteam products. Searching for solutions to my issues I came across a post from Bartosh on your forum:

http://www.scirra.com/forum/array-a-pathfinding-for-a-turn-based-game_topic54260.html

This post seemed to contain the solutions for all my problems: Easy conversion to isometric, different movement cost for different tiles (including AI preferences), easy integration with arrays ++

However this example was made for Construct classic, and (if I've understood it correctly) not nearly as portable to different platforms as Construct 2.

Thus I'm wondering whether doing something similar with Construct 2 would be possible and efficient. I can attempt to do the converting myself, but being unfamiliar with Construct I'd like to know if there would be some likely issues. If there have been made examples of other ways of creating this sort of game in Construct I'd like to know about them as well. I've done what I consider to be a pretty thorough search of the forums, and I can't seem to find anything that fits nearly as well as how Bartosh describes his method.

If anyone have any suggestions I will be very grateful, and if they turn out to be good enough I might just become a Construct convert
B
5
Posts: 11
Reputation: 622

Post » Wed Jan 09, 2013 9:27 pm

Seems this was harder to answer than I thought. If there is no one who has found a good way to implement proper A* pathfinding in Construct 2 yet, I'll attempt to do it on my own by converting Bartosh's old example from Construct classic.

However, I'm not able to open it up in either Construct 2 or Construct Classic (Classic tells me the file is from a too recent version). Does anyone know how to open the .cap-file? I hope someone is able to help me, as I'd prefer to use Construct for my next planned game.
B
5
Posts: 11
Reputation: 622

Post » Wed Jan 09, 2013 9:58 pm

Pretty sure all the existing 3rd party plugs that do path finding use astar.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Jan 09, 2013 10:37 pm

Thanks for the reply. I checked them out before making my original post, and while they do indeed use A*, they seem to be only useful in calculating a simple path between obstacles. What I need is the ability to assign different movement-costs for different terrain types and such, in a way that is customizable at runtime as to make for better AI.

Bartosh's description of his .cap mentions all the benefits of a proper customizable A* algorithm. I might be wrong in thinking that none of the plugins will be able to do what I ask for, but it does seem that way.
B
5
Posts: 11
Reputation: 622

Post » Wed Jan 09, 2013 10:40 pm

Here's the link to the most recent version of CC:

http://www.scirra.com/forum/construct-classic-r2-released_topic48884.html
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Jan 09, 2013 10:46 pm

Thank you, Arima! And I was certain I was up to date. I'll see if it is possible to rework this to Construct Classic (that is unless anyone knows of anything with A* and custom movement cost for Construct 2.
B
5
Posts: 11
Reputation: 622

Post » Wed Jan 09, 2013 11:06 pm

Try out the Astar plugin first and see if it can do what you want. It let's you set movement costs for objects so you could set forest sprites/tiles to have a certain cost and swamp sprites/tiles to another etc.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jan 09, 2013 11:16 pm

Yeah, that might be a good idea, ramones. Bartosh's method is tempting since it is basically exactly what I'm looking for, but having to convert it might be a pain, and I have no idea how efficient it's going to be. After looking closer at 00Rez's I'm getting more optimistic that I might be able to tweak it the way I want it.
B
5
Posts: 11
Reputation: 622


Return to How do I....?

Who is online

Users browsing this forum: claurent9, imothep85 and 28 guests