First of all, I already know A* algorithm. I would like to make/test a walking hero character on a map made in a level editor(also made by me).
What I have done before is manage to walk my hero on a map with the given information:
-Texture tile size is same as A* tile size.
-The hero stands on 1 A* tile.
That's a bit straight forward isn't it? It's just applying the A* algorithm posted in the tutorials found in the internet.
My problem is..
Given:
-Texture Tiles: 100 x 100 pixels (the actual texture that will be rendered)
-A* Tiles: 25 x 25 pixels (determines whether walkable or unwalkable) (4 by 4 A* tiles in 1 texture tile)
-Hero character eats 2 by 2 A* tiles (that's 50 x 50 pixels)
-Monsters eat different amount of A* tiles like a big one stands on a 5 by 5 A* tiles while a smaller one on a 3 by 3 A* tiles.
How to go with this?
Diablo-like Walking based on Pathfinder + Level Editor (CONCEPT)
Started by marcjoel, Oct 19 2012 09:53 AM
6 replies to this topic
Sponsor:
#2 Members - Reputation: 2032
Posted 19 October 2012 - 11:55 AM
One method you could try is to implement different grids. For the hero, have him pathfind on a grid where one tile is the size of a 2x2 patch of base tiles. Similarly, for a big monster implement a grid whose tiles are the same size as 5x5 of the base tiles.
#3 Members - Reputation: 113
Posted 19 October 2012 - 12:23 PM
Hmmm, so basically, A* tile map 01 for HERO, A* tile map 02 for monsters with 3 by 3, A* tile map 03 for monsters with 4 by 4.
hmmmmmm. then i will update those 3 tile maps based of their summation? so that no one will be overlapping anyone?
hmmmmmm. then i will update those 3 tile maps based of their summation? so that no one will be overlapping anyone?
#5 Crossbones+ - Reputation: 1526
Posted 21 October 2012 - 02:16 PM
here's a good article about clerance based pathfinding: http://harablog.wordpress.com/2009/01/29/clearance-based-pathfinding/
i think it'll fit your needs pretty nicely.
i think it'll fit your needs pretty nicely.
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.






