2 Attachment(s)
Pathfinding Tutorial for MMF2
This is a simple tutorial/example for all to show how to make a pathfinding in a game.
This tutorial/example has :
- Automatic creation of the pathfinding map with obstacle backdrops in the frame
- Support for different obstacle shapes
- Linear (simple) interpolation for the playable character.
- You can param the size of the cells
- The grid is displayed to show how pathfinding works
- Shapes examples to show us when the pathfinding extension can crash the program
Enjoy ;)
2 Attachment(s)
Re: Pathfinding Tutorial for MMF2
Sphax
This is a helpful example, for whatever reason the pathfinding object is a little difficult to figure out so a good tutorial was needed.
I was happy to see the feature to allow different grid locations to have different movement costs get added in the MMF2 version of this object. However, I have been unable to actually figure out how to get this work properly. I modified your example to change obstacles to instead be high-cost path cells. I would expect the path finder to rarely cross the grey areas because they are very high cost (200) vs normal cells with cost of 1. But, it does not seem to happen. See attached example. If we could get this to work, it would a helpful addition to the tutorials for this object.
Re: Pathfinding Tutorial for MMF2
Maybe this feature of this object don't work at all... I've saved the bitmap file of the map generated and I obtain a white one with your example (no obstacle) and a black one with mine (all obstacle). I don't understand why this don't work...
For doing this before MMF2, I used Grid object of Moktar M.Korshid which was better.
Re: Pathfinding Tutorial for MMF2
Wow!!
It's great! Very helpful example.
Re: Pathfinding Tutorial for MMF2
Nice news, the new version of the Pathfinding object by z33z works well with cost obstacles and don't crash with the special shapes in my example. ;)
Re: Pathfinding Tutorial for MMF2
Sorry, do you mean to say there is a newer version of pathfinding that overcomes the above issues? Is this in the z33z extension pack or downloadable elsewhere? I thought I was up to date.
Re: Pathfinding Tutorial for MMF2
However, even the new version doesnt fix the problem with maps above 250x250.. Setting zones to any value doesnt work for numbers like 270,270 to 280x280. This should be fixed soon
Re: Pathfinding Tutorial for MMF2
So is there a way to do these for multiple objects, not hardcoded? I could do it in mmf1 but I don't see the path naming feature in this one.
Edit: And the new version still crashes.
Re: Pathfinding Tutorial for MMF2
The new version of pathfinding object will be released soon in the z33z bonus pack. ;) Just be patient. :)
Re: Pathfinding Tutorial for MMF2
Are you not talking about http://www.clickteam.com/webftp/files/mmf2/Exts/MMF2z33zExtPack.exe ?