Commander soul swap

Commander soul swap

Classic game design, maintained to please you...

Moderator: Content Developer

Post Reply
Ares
Balanced Annihilation Developer
Posts: 558
Joined: 19 Mar 2011, 13:43

Commander soul swap

Post by Ares »

Following a discussion with Zangeeph I wondered is it possible for two commanders to simultaneously capture one another?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Commander soul swap

Post by Silentwings »

BA doesn't allow or disallow this from happening, so it's dependent on the engine. Test it!

(or read the engine code - probably https://github.com/spring/spring/blob/f ... I.cpp#L761 is a good place to start looking)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Commander soul swap

Post by knorke »

That link looks more like the AI/command handling logic, there is nothing about how the captureProgress is calculated.
Maybe this:
https://github.com/spring/spring/blob/f ... r.cpp#L451
Would guess it depends how units status are updated, and then maybe on their unitID.
But instead just tried it in XTA: Pause game, spawn two commanders, give capture command onto each other.
Always ended in two Coms belonging to same team, with one Com's capture progress at 99%
I tried to position them in (by eye) symmetric way where they did not have to move their arm, same result.
Maybe with testunits that have no animation one can to remove that factor in better way...
Might also want to compare commander with COB script vs commander with Lua script to see which is faster. :shock:

If someone can make both coms swap teams by capturing each other at same time then please put them on repeat-mode and make 10 hour wololo video.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Commander soul swap

Post by Kloot »

not possible: one unit will always be marked as captured first (even if both captures would complete on the same frame) and given a stop order before it can cause a swap
Ares
Balanced Annihilation Developer
Posts: 558
Joined: 19 Mar 2011, 13:43

Re: Commander soul swap

Post by Ares »

Interestingly, it is possible for two units to simultaneously reclaim each other. Perfect for when you have a couple of construction bots helplessly stranded behind enemy lines and don't want them going to waste!
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Commander soul swap

Post by Silentwings »

You can self destruct them, it will be faster ;)
Post Reply

Return to “Balanced Annihilation”