Showing posts with label formations. Show all posts
Showing posts with label formations. Show all posts

2009-03-31

More on Formations!

I rewrote the Circle pattern to make more sense as a battle formation. One line of soldiers isn't very effective. I also added orientation so that all soldiers face outwards:

New feature: Every soldier can die and leave an empty slot.


The next step was the ability to move forward and fill the hole.



At the moment I am playing with different patterns and which slots can replace which slots and in what order.

2009-03-28

Formations

One of my current projects is a prototype about steering, formations and pathfinding. Well, at the moment it is a prototype about steering and formations.

The goal is to have realtime battles like Total War, but thats the far future.

The current features are:
  • change type of formation
  • move formation
  • rotate formation
  • dynamically add and remove characters
How does it work:

The formation calculates the target position and orientation for each character and the characters try to reach it with their steering behaviors.

Patterns:

They define the shape of the formation. I currently have:


Steering behaviors:

If you want to know more about them, look here.

At the moment I only use Arrival, but I will soon implement Obstacle Avoidance and others.

Results:

In the first image I changed the pattern from a box to a circle and in the second I rotated a box.


The white dots are the target positions.