Unit speed and formations

Unit speed and formations

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
casperjeff
Posts: 51
Joined: 14 Aug 2008, 21:54

Unit speed and formations

Post by casperjeff »

I see that all mobile units (at least in BA) have acceleration and brake rates as well as max-velocity.

Am I to assume then, that mobile units (like vehicles) don't always travel at the same rate (such as when starting/stopping)?

Am I also to assume that certain terrain features can cause a unit to go at a defined slower rate?

Also...do units have slower speeds depending on slope?

This all leads to my final question...any way to force a unit to go slower than normal max-velocity in order to facility mixed-unit formations?

(sorry so many questions)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Unit speed and formations

Post by Tobi »

casperjeff wrote: This all leads to my final question...any way to force a unit to go slower than normal max-velocity in order to facility mixed-unit formations?
There's a command CMD_SET_WANTED_MAX_SPEED, which, when given *after* a move/fight/patrol/etc. command should make the unit temporarily use a lower maximum speed.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Unit speed and formations

Post by Kloot »

Am I to assume then, that mobile units (like vehicles) don't always travel at the same rate (such as when starting/stopping)?
Yes, the transition to stand-still / maximum speed is not instantaneous.
Am I also to assume that certain terrain features can cause a unit to go at a defined slower rate?
Water and slopes slow a unit down by default, by factors that depend on the unit's depth- and slope-modifier values. A map's typemap can also impose base speed multipliers. All of these bias the pathfinder.
initram
AI Developer
Posts: 15
Joined: 07 Sep 2009, 14:28

Re: Unit speed and formations

Post by initram »

Any place to find documentation on this, if you were to implement your own path finder? (that had to take into account more information than the normal pathfinder)
Post Reply

Return to “AI”