Jump to content
• Advertisement

Public Group

# Tile map structure

This topic is 2301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

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.

#### Share this post

##### Share on other sites
Advertisement
Hello, It's very interesting.
I think it's a triangle.
http://www.leeyou.net/Temp/12.jpg

Line: a*x + b*y + c = 0;

http://www.leeyou.net/Temp/13.jpg

Bezier: p(t)= (1-t)^2 * p1 + 2 * t * (1-t) * p2 + t^2 * p3; //t >= 0 && t <= 1

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11
• Advertisement

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013739
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!