Making a turn based game with true A* pathfinding

  • 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:

    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 <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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.

  • Pretty sure all the existing 3rd party plugs that do path finding use astar.

  • 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.

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

    http://www.scirra.com/forum/construct-classic-r2-released_topic48884.html

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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