Sign in to follow this  
marcjoel

Diablo-like Walking based on Pathfinder + Level Editor (CONCEPT)

Recommended Posts

marcjoel    113
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.


[size=5][b]My problem is..[/b][/size]

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?

Share this post


Link to post
Share on other sites
FLeBlanc    3141
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.

Share this post


Link to post
Share on other sites
marcjoel    113
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this