austin at pettomato.com
Thu Aug 30 14:56:31 EDT 2007
A* isn't the problem. If you want your paths to have a certain aesthetic value, then you need to program that into how A* calculates costs. For instance, you can add a higher cost to changing direction, or you can add a high cost penalty to changing direction several times within a set number of steps. If you want the character to change direction as few times as possible, then you might give each step a +1 cost, but each change of direction a +3 cost. Then you can manage the tradeoff between shortest distance and aesthetics by tweaking simple numbers.
Pet Tomato, Inc.
On Thu Aug 30 21:22 , Dimitrios Bendilas - ZEFXIS wrote:
> Hello everyone,
> I hope this post is not very off-topic.
> I have a programming question which I hope someone will be able to shed
> some light on.
> We are building a click-management game. Its core mechanics resemble Diner
> We are trying to implement a pathfinding algorithm that makes sure our
> heroine does not
> pass through "tables" (they are not tables actually, but similar concrete
> The main difference from Diner Dash in regards to pathfinding is that the
> tables in our game
> are spread in the screen in a much more random manner. Our heroine has to
> avoid tables
> and walk around them to go to the customers, who are located around the
> The game is not isometric and it's not tile-based. It's like most
> click-management games,
> having a side-top "camera" view and some pseudo-perspective.
> We are trying to figure out which is the best pathfinding approach here.
> We tried A*, but the algorithm makes the sprite move in a zig-zag pattern
> too much and the movement seems very unnatural.
> Does anyone know what is a good approach for the pathfinding in such games?
> Maybe someone that has developed a similar game can give us a hint?
> Thanks a lot!
> Dimitrios Bendilas
> Game Designer/Lead Developer
> Total Eclipse Games
> Casual_Games mailing list
> Casual_Games at igda.org
> Archive: http://www.igda.org/casual-subscribe
> Archive Search:
> List FAQ:
More information about the Casual_Games