Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Tile map structure

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 jo1987   Members   

103
Like
0Likes
Like

Posted 30 August 2012 - 08:42 AM

Posted Image
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.

Attached Thumbnails

  • situatie.png


#2 fdn2012   Members   

126
Like
1Likes
Like

Posted 30 August 2012 - 12:28 PM

Hello, It's very interesting.
I think it's a triangle.
http://www.leeyou.net/Temp/12.jpg
Posted Image
Line: a*x + b*y + c = 0;


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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.