Tile map structure

Started by
0 comments, last by fdn2012 11 years, 7 months ago
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.
Advertisement
Hello, It's very interesting.
I think it's a triangle.
http://www.leeyou.net/Temp/12.jpg
12.jpg
Line: a*x + b*y + c = 0;


http://www.leeyou.net/Temp/13.jpg
13.jpg
Bezier: p(t)= (1-t)^2 * p1 + 2 * t * (1-t) * p2 + t^2 * p3; //t >= 0 && t <= 1

This topic is closed to new replies.

Advertisement