Skip to main content
GameDev.net gamedev.net
🔒 Locked

Tile map structure

Started by Jo Voud Aug 30, 2012 at 2:42 PM 0 replies 1.3k views
Original Post
Jo Voud
Jo Voud
situatie.png
I have the A* pathfinding working (lightgreen, green destination)
The red circles are units, 1 smaller than a tile, 1 bigger.
Now i wonder what's the best way to let the units move the path ( lightgreen ) without colliding with a wall or later an other obstacle (might be bigger or smaller then a tile.) Whats the best way to do this and smoothen the path (like the red line.)?

Also how are tilemaps normally structured?

Is it like (pseudo)
this.map.move(unit,[x,y]) or rather this.unitmanager[selectedUnit].move([x,y]);

Someone has some good tuts or sample source.

Thanks in advance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.