Jump to content

Question about flocking + formations


photo

Recommended Posts

I have been playing around with the AI of Unigine and so far I am pleased. I have been trying to implement a way to force formations in 3d for a group of objects but have been unable to figure out how. Has anyone done this here before?

Link to comment

Well, ours is space based. We have spaceships that move in formation, like a delta. I have seen flocking with formations before, just didn't know if unigine included it or not, as a scripted version might be too slow.

Link to comment

Sorry for the short answer last night, I was on my phone... and it sucks to write with :).

 

Ok, now for some more detail:

 

Our project uses fleets of spaceships to battle with, in a sort of RTS style. The idea is that you can form your fleet into specific formations that give bonuses to attack, defense, yadda yadda. These formations, however, are very dynamic. Lets say you take a typical carrier battle group from the US (http://upload.wikimedia.org/wikipedia/commons/c/cd/US_Navy_031130-N-3653A-002_USS_George_Washington_%28CVN_73%29_Carrier_Strike_Group_formation_sails_in_the_Atlantic_Ocean.jpg). They tend to keep the carrier in the middle to protect it from attack. This is what our group calls as a capitals compliment. This means that a fleet of varying size can always form a "like" pattern. Say you have 40 ships, the carrier is still in the middle, and less important ships span outwards. Now, you will notice with the picture I have that they are all facing the same direction, and have a distance between each point (node) they belong. The goal is to always keep this distance and heading so the group moves as one. Now, with scripting, I can implement this, but you are constantly checking neighbors for angle/ distance / heading. If you have 400 ships in a formation, this can be quite taxing on the system.

 

Hopefully, this gives a better picture of what I am looking for.

Link to comment

I just realized in one of the "Player" samples that they are doing kinda what I want. Attaching a child mesh to another would probably work, while adding a little bobbing / weaving to the internal objects

Link to comment
×
×
  • Create New...