Jump to content


Photo

Platformer A* Pathfinding


  • Please log in to reply
13 replies to this topic

#1 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 25 September 2011 - 06:07 PM

Platformer A*

Download: Dropbox

Older Version: Host-A Hosting


This is pretty much mp_grid_path for platformers.

  • It takes gravity into account and comes pre - packaged with a few standard platform types such as ladders, platforms, ground ,water and dangerous stuff.
  • The zip comes with a simple and straight to the point example.
  • The scripts are generally very user friendly.
  • There is a built in debugger that lets you see exactly what's happening.
  • 100% GML.
  • Simply initialise, set up the grid and run the A*.
  • Cells can have different costs.
  • Different heights and jump heights can be set for the AI.
  • A maximum fall distance can be imposed, as well as a general distaste to falling and a sliding scale between the two.
  • Fully customisable movement in a simple and isolated script.
  • New cell types can be added through some very simple modifications.
  • Updated to include the ability to jump more than one block horizontally.

Posted Image


Credit is required to "Docopoper", free to use in commercial and non commercial games / applications. In fairness - I spent ages making this.


Posted Image

Feedback would be appreciated even if you have no use for it right now.


Edited by Docopoper, 10 August 2012 - 10:26 AM.

  • 2

#2 SirCumferance

SirCumferance

    GMC Member

  • GMC Member
  • 145 posts

Posted 08 October 2011 - 02:53 PM

Nice, this will simplify things greatly. Mega Man clones for days son...

EDIT: BTW, thanks for making this

Edited by SirCumferance, 08 October 2011 - 02:53 PM.

  • 0

#3 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 08 October 2011 - 10:02 PM

Posted ImageYay! Positive feedback! Have you got any feature recommendations?

I would love to hear of any games made with this. (Not that I am expecting everybody who posts to make a game or finish it, so don't feel that I have expectations if you post :P)
  • 0

#4 Israphel

Israphel

    GMC Member

  • New Member
  • 21 posts
  • Version:Unknown

Posted 18 January 2012 - 01:38 AM

Awesome

You wouldn't happen to have a version for game maker 8.0, would you?
  • 0

#5 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 18 January 2012 - 03:00 PM

GM 8.0 Version:

Drop Box
  • 0

#6 Israphel

Israphel

    GMC Member

  • New Member
  • 21 posts
  • Version:Unknown

Posted 21 March 2012 - 06:37 PM

This AI works remarkably well! Well done :]
  • 0

#7 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 21 March 2012 - 10:05 PM

This AI works remarkably well! Well done :]


Thanks. :)

Getting thanked this long after having created something that just sort of faded into the background is really nice - It's what makes making freeware so rewarding. The GMC is such a nice place.
  • 1

#8 johnkapid

johnkapid

    Lead of hEOLiX

  • GMC Member
  • 143 posts
  • Version:GM:Studio

Posted 12 April 2012 - 10:47 AM

Wow, this is perfect!
  • 0

#9 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 12 April 2012 - 12:10 PM

Wow, this is perfect!


Thanks. It works well - but as I have said in PMs - the movement has a bit of a flaw, for some reason I only allowed the AI to jump one cell horizontally in each direction, though this can be fixed by implementing your own movement code in the movement script (which has somewhat of an interface to hide the A* side to make it easier). So if your game doesn't need long jumping - this should work fine, otherwise you'll have to edit it.

:)
  • 0

#10 Grimzim

Grimzim

    GMC Member

  • GMC Member
  • 9 posts
  • Version:Unknown

Posted 14 April 2012 - 01:08 PM

Very nice script! Is there an easy way to add support for different player width (not only height as currently)?
  • 0

#11 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 14 April 2012 - 03:27 PM

Very nice script! Is there an easy way to add support for different player width (not only height as currently)?


Not really, sorry - I might make a new version after the GMC Jam - since I'm working on my game engine for that now. Posted Image

The whole thing could do with a rewrite anyway - it works now, but the behind the scenes code is a bit messy.
  • 0

#12 A.R.T.games

A.R.T.games

    GMC Member

  • GMC Member
  • 396 posts
  • Version:GM:Studio

Posted 14 April 2012 - 03:48 PM

this is cool but do you have normal A* for top down with the tools you have made?
  • 0

#13 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 14 April 2012 - 08:00 PM

this is cool but do you have normal A* for top down with the tools you have made?


You can edit the movement script to make it top down - the movement script basically tells the algorithm what cells to make available based on what cells are surrounding the current cell. So if you strip all the movement code out and replace it with top down mechanics - it should work.

However there are better alternatives such as the built in pathfinding in Gamemaker or G Pathfinding (a dll - making it much faster than my GML script).
  • 0

#14 fwashbur04

fwashbur04

    GMC Member

  • GMC Member
  • 40 posts
  • Version:GM:Studio

Posted 30 June 2013 - 05:15 PM

Hi there - I'm interested in trying to get this to work - the Dropbox link downloads a GM81 file.  Is this unusable by GM Studio? :(

 

 

Edit: Just figured out how to import to GM Studio.  I'm going to give this a try.  If I can get this working I would love to use it in my current project, which I'm working hard on bringing to Kickstarter.  I'll absolutely keep you apprised so you can see the fruits of your labor!


Edited by fwashbur04, 30 June 2013 - 07:27 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users