• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

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

# Tactical Formation with multiple objects

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.

4 replies to this topic

### #1hdlopesrocha  Members

Posted 13 July 2012 - 08:11 AM

I created a video about my problem:

Algorithm:
Given a group of objects and a goal.

STEP 1 - Find the center of the group.
STEP 2 - Find the path from the center to the goal (it's a list of points).

STEP 3 - For each object, send it to its formation position (relative to group's position).
STEP 4 - Move the objects.
STEP 5 - Repeat STEP 4 If at least one object moved.
STEP 6 - If the goal is not reached, grab the next position of the path and go to STEP 3.

STEP 7 - End.

As you can see it's not perfect, If you have any idea how to improove it, I would thank.

Edited by hdlopesrocha, 13 July 2012 - 08:23 AM.

Posted 13 July 2012 - 11:55 AM

Are you using A* or steering?
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

### #3hdlopesrocha  Members

Posted 14 July 2012 - 12:52 AM

Bi-Directional A* with Manhattan Heuristic

Edited by hdlopesrocha, 19 July 2012 - 10:43 PM.

### #4hdlopesrocha  Members

Posted 19 July 2012 - 10:45 PM

### #5Usagi  Members

Posted 21 July 2012 - 05:17 AM

Hi

STEP 3 - For each object, send it to its formation position (relative to group's position).

What about making the group moves as one object in the open area , and every object will move on its own when facing an obstacle ?
The way your objects move reminded me of the old typewriter , the objects move few stpes up and right and then return the straight line of the path and so on ,
Here is a video where the wole group moves / rotates as a singel object (like a rectangular object )