Question (I know I have a lot).....I intend to have a pretty tight reign on my units (right down to tracking which direction they are facing) and using minuscule movements to facilitate in-place rotations.
If another unit comes around (enemy or ally) and attempts to move 'through' the space of my unit, the internal engine AI won't take over and 'move' my unit out of the way, will it?
That would suck.
(It's not in any way based on the 'move state' is it?)
I intend to have a pretty tight reign on my units (right down to tracking which direction they are facing) and using minuscule movements to facilitate in-place rotations.
I see one problem there, and that is the new 'reverse' moving code (that was added in 0.80). AFAIK currently only S44 uses it (I'm very probably wrong considering I don't play any other Spring mod/game). That is, on very short move distances you can never be sure if the unit will turn and move with its front towards the goal OR it will reverse and backpedal there (resulting in exactly opposite facing to the one you expect), unless you recreate the same logic in your AI so it can predict which way the unit will take.
This only matters if the game in question makes use of the feature (S44 does and BA doesn't as far as I know for ex.), but I'd expect more and more games to start using features like that.
Not understanding your AI I could be talking shit but... don't you think locking the exact position and facing of every unit is kinda overkill? Aren't you likely to stress the CPU by trying to do things the engine is optimised to do better?
Anyway, on a practical note you may have some luck polling your units every 5 seconds or so and giving them a temporary move+rotate if they've strayed from your expected position. This allows the engine to do what it needs to do to allow units to move through blockages.
The only practical use of absolute control I can think of is the case where you want units to line up exactly along the perimeter of an enemy turrets range, without units at the back pushing them into range. Whether that happens enough to affect the outcome of the game is a bit questionable.
Maybe your case would be stronger if you provided an example of why such accurate unit placement is worth the time it would take to develop.
don't you think locking the exact position and facing of every unit is kinda overkill?
Probably. But....as an ex military guy (mechanized), I really want my 'squad' units to do the right thing when they stop movement...like forming up in a herringbone or a coil (crucial for proper security). Same thing with the concept of funneling the enemy and having units waiting in 'ambush'. Now in spring (more specifically BA or 1944), that is probably more an aesthetic issue than a strategic one as the LOS for each unit is probably 360 (unrelated to which way the unit is facing). The only real reason is speed to bring weapon to bear if they are limited in rotation angles.
To your point, it's probably not that big of a deal in the overall scheme of things....just wanted to know how the engine worked and what I had to account for.
you may have some luck polling your units every 5 seconds or so and giving them a temporary move+rotate if they've strayed from your expected position. This allows the engine to do what it needs to do to allow units to move through blockages.
I will probably end up doing something like this. The combination programmer/general in me just has a mental issue with telling a unit to do something or be somewhere and them NOT doing/being where I expected. :)
LoS is always circular in Spring, I don't know of any 'conventional' mods (so excluding things like Fibre) implementing custom LoS modes.
Factors other than LoS that depend on unit facing: restricted-arc weapons, directional armor (there is a system for that built into the engine even, plus some games have their own implementations), time needed to start moving in that direction. First two are important enough to use when they matter, but they don't matter all that much in *A mods. Last one matters in most any game/mod.
Spring weapons are in fact restricted to cones (WeaponMainDir and MaxAngleDif), so usually horizontal and vertical restrictions will be the same (not always, the cone can be directed at any angle incl. not parallel to the ground). Examples are all the turretless units in S44. I don't quite remember if BA mobile arty units have similar restrictions or not, LRPC's are 360 degree fire arc IIRC.
casperjeff, i dont know.. i dont think that the stuff you want to do fits into an AI. it is more stuff for making a show, animation wiht spring, and would probably be better done with a Lua AI or genreal gadget, as you can have more fine controll there. I can not imagine you gonna get good performance with your AI, both CPU and game achievement wise. eg.. using many move commands just ot keep units in place .. is bound to be slow, if not in general, then at least when playing online with it. formations on the battlefield are not gonna work out (thinking on the regular army musqueteers in the patriot movie). what is your goal in general?
My goal is to have disciplined units that follow orders of their commanders. My AI is based upon the chain of command concept (hence the COCAI name) including a robust implementation of a military TO&E and overall strategic plans managed by an S3 that can actually plan attacks, defenses and react to changing battlefield conditions.
Please note that I am not 'unhappy' with what is provided to the AI layer by the Spring engine...just want to make sure I understand all the capabilities that I have so I can steer around the potholes.
What I'll probably do is treat this not unlike any situation where a unit is 'forced' to do something outside the orders given to them from upline because of changing battlefield conditions. As long as this info passes upline, the commander can adjust. If a unit is out of position, the commander can just issue an order to bring him in line again.
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum