Tuesday, April 17, 2012

Blocking works

Reading the block map property from each tile works now. Entities with different ways of movement is untested, but should work.

The way of defining the walk properties of each tile of the tileset is a bit cumbersome: you add a tile property "walk" and as a value a hexadecimal value according to the table in my previous post. When you don't set a walk property for a tile, the default value 0xd (walkable for everything but swimmers) is used. This has two possible pitfalls:
  1. the hex values are hard to remember, so you can easily select a wrong one
  2. there is no visual indication which tile has which walkability
It also has the drawback that it isn't possible to have tiles which are only partially blocked, which means that I waste the most powerful feature of my route finding engine. Maybe I could do it like we did at Mana and use a special invisible map layer for the blocking, just with the difference that the graphics of the tiles you put there matter: different colors of pixels mean different walkabilities.

No comments:

Post a Comment