Wind Path Layout

Timothy Barnes  —  1 week, 5 days ago [Edited 0 minutes later]
Recently I made a system for determining how the wind paths in the game will be placed within a scene.

Wind paths are the air currents or gusts that the player will need to navigate through to stay with other characters.

Due to the nature of how I plan to use these paths in the game, it is necessary that the layout for each wind path is chosen dynamically depending on what is happening in the game.

One approach I have found useful for creating the layout is to generate a chain of circles in which each circle is touching another circle's perimeter. A number of points are then chosen consecutively along the perimeter of the circle chain to describe the curved path. Straight line segments can also be part of the chain to provide variation in the path.

One of the benefits of this approach is that the circles and line segments that define the chain can be used as geometric primitives for overlap testing. This is necessary for determining if one path is overlapping another path. Testing using the chain is much faster than comparing the individual line segments of two paths for overlap.



In this picture the wind path is shown as a dotted line following the perimeter of the circles in the layout. Straight line segments are represented as a capsule extending from one circle to the next.


The next task is to design the character behavior involving the wind paths. In the game a goal is to stay with other birds and avoid losing them in the wind. Both the behavior of the wind paths and the behavior of the other characters is hoped to make this goal challenging.
Log in to comment