Author Topic: Units/Pathfinder/AI: Moving as One...  (Read 1125 times)

ChupaReaper

  • Guest
Units/Pathfinder/AI: Moving as One...
« on: 22 September 2010, 00:11:30 »
I thought I'd use a cheesy title lol.
Basically after reading the Pinging suggestion I thought up a better way for units to move about together in formations. I'm not sure if this has been asked before but basically formations could be defined in factions (at first I thought they would be hard coded but then I thought it would help make factions more unique). Formations could be defined using a cellmap which is tiled as a pattern.
1=Unit possition, 0 = Space to be left clear when in a group.
The cellmaps could be any size and odd or even, but tiled regardless. Other optinos should be added to choose how it's tiled (whether it's tiled both x and y or tiled x 4 times then another row (y) can be started).
Here's an example:
Code: [Select]
<formations>
<formation name="block" x="1" y="1"> (this is the standard formation that glest uses now)
<cellmap>
<row value="1"/> (only need one cell becuase they form a basic square block)
</cellmap>
</formation>
<formation name="wide" x="4" y="1"> (this is a wide formation forming like a wall of troops, the cellmap is done across (x) four times before a new row (y) begins, this would have to scale somehow for larger groups)
<cellmap>
<row value="1111"/> (only need one cell becuase they form a basic square block)
</cellmap>
</formation>
</formations>

Obviously there's a good amount of change and thought needed to be put into this but ultimately it would be nice to have units move in formation too rather than in one big queue ready to be chopped down and custom formations help make factions a bit more different to each other. Here's a list for this suggestion in order or most likely to least:
  • Unit formations rather than all units bunching together when they reach their destination.
  • Units travelling in formations.
  • Faction specific formations.
  • Custom formations.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Units/Pathfinder/AI: Moving as One...
« Reply #1 on: 22 September 2010, 11:11:54 »
Proper formations would require a extremely large overhaul of the engine, a simple move at the speed of the slowest selected unit should be doable easily enough though.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: Units/Pathfinder/AI: Moving as One...
« Reply #2 on: 22 September 2010, 22:35:53 »
Proper formations would require a extremely large overhaul of the engine, a simple move at the speed of the slowest selected unit should be doable easily enough though.


Ah that would be useful for now, maybe this could be some super future request lol. You could make so that if you click a destination all units travel at the same speed as the slowest unit to that destination but if you double click a destination they move at their separate speeds? (That's how Stronghold works which is effective.)

 

anything