Questions about BA

Questions about BA

Classic game design, maintained to please you...

Moderator: Content Developer

User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Questions about BA

Post by albator »

Split from viewtopic.php?f=1&t=36290 (Silentwings).
Forboding Angel wrote:
albator wrote:player-side, I want MT zerver-mt94-like engine. I upgrade my 9yo cpu and my old i5 750 was still much faster with with mt94 than my current cpu which still has a x2 ipc.

MT is day and night player side
Small problem with that... Zerver was on a quest to strip out all lua from the engine (picasso alluded to this), which means that you're transported all the way back to 2006. But you can toooooootally have 23049034562345 fleas on the map. #worthit
2006 ? you mean when the time when:
- the unit where not clumping on each other so microing unit was worthwhile
- the vehicles were actually turning right on the spot you ask them to, making t1 mico game fun
- the time the unit did not stay stuck in the ground

It looks kinda nice. I think I get it , you were being sarcastisc :p

All sarcasm apart, that is sad that the 2006 perf is so much much better than 10 years latter. Sad to see no solution were found.
User avatar
Floris
Posts: 611
Joined: 04 Jan 2011, 20:00

Re: What exactly do current game developers want?

Post by Floris »

... a solution has been found though, its called raw_move. Its being implemented for ZK and BA. Makes the unit go straight to where you order them, without stickign to some predefined path and clumping.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: What exactly do current game developers want?

Post by Silentwings »

Brief set of myth-debunks:
2006 ... clumping
A few years ago behe and I tried to find out, by watching several pairs of side by side simulations of identical commands, to see if there really was less clumping back when the grass was always greener. There wasn't.
vehicles were actually turning right on the spot you ask them to
Choice made by game.
2006 perf is so much much better
Apples, oranges, etc. I heard rumours that the very first compile of spring, which said "Hello World" and then returned 0, ran like greased lightning, but it all seems too good to be true.
User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Re: What exactly do current game developers want?

Post by albator »

Silentwings wrote:Brief set of myth-debunks:

vehicles were actually turning right on the spot you ask them to
Choice made by game.
Thanks for the explanations.

Any reason why this has been done with BA ? Do you know who and why it was changed wrt years ago ? the consequence of that is player picking kbot on comet 1v1 like johan mentionned already.
User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Re: What exactly do current game developers want?

Post by albator »

Silentwings wrote:Brief set of myth-debunks:
2006 ... clumping
A few years ago behe and I tried to find out, by watching several pairs of side by side simulations of identical commands, to see if there really was less clumping back when the grass was always greener. There wasn't.
So do you think that is mod related as well ?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: What exactly do current game developers want?

Post by Silentwings »

Any reason why this has been done with BA? Do you know who and why it was changed wrt years ago ?
It was so long ago that I probably never even knew. You could find out who by checking the changelog and matching the dates onto maintainers, but finding out why is almost certainly not possible.
So do you think that is mod related as well ?
No - the results we saw imply that claims of clumping becoming better/worse due to the PFS are entirely fictional.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Questions about BA

Post by Forboding Angel »

If units were again allows to turn in place, it is quite possible that it might result in less clumping on short moves. On long moves I think you'll always have clumping. This is because the pathfinder is brutally efficient. As a result, everything sees the same narrow path as being the best one, viola, clump.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Questions about BA

Post by Forboding Angel »

albator wrote: - the vehicles were actually turning right on the spot you ask them to, making t1 mico game fun
I tried to implement this as a modOPTION in BA that was defaulted to off and got crucified for even thinking of such a horrid thing.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Questions about BA

Post by MasterBel2 »

Forboding Angel wrote:
albator wrote: - the vehicles were actually turning right on the spot you ask them to, making t1 mico game fun
I tried to implement this as a modOPTION in BA that was defaulted to off and got crucified for even thinking of such a horrid thing.
I thought that in the newest test versions it was hard-coded? I must have misunderstood when I heard it.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Questions about BA

Post by Forboding Angel »

Nah, Doo came up with a pretty contrived method of doing turns that seems to work nicely enough:
https://github.com/Balanced-Annihilatio ... st.lua#L97

There are 3 or 4 parts that make up the whole in that.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Questions about BA

Post by MasterBel2 »

Okay, thanks!
[Fx]Doo
Posts: 66
Joined: 30 Aug 2013, 16:39

Re: What exactly do current game developers want?

Post by [Fx]Doo »

albator wrote:
Silentwings wrote:Brief set of myth-debunks:

vehicles were actually turning right on the spot you ask them to
Choice made by game.
Thanks for the explanations.

Any reason why this has been done with BA ? Do you know who and why it was changed wrt years ago ? the consequence of that is player picking kbot on comet 1v1 like johan mentionned already.
Units used to have "TurnInPlace = true", but it was changed to false at some point.

Now, how does turn in place work:
TurnInPlace has a set max angle limit beyond which the unit will brake.
With 110 degrees angle limit, any turn below 110 will be performed at maxspeed, and any turn over 110 will trigger brakes.
The brake not necessarily is to 0 speed, but is at max brakerate until the remaining angle is <= maxangle and the unit can start accelerating again.

How does TurnInPlace = false work then:
No angle limit, this one is always triggered on turns, whatever the turn.
For as long as a unit is turning and its speed is beyond TurnInPlaceSpeedLimit, it will brake and try to reach this speed.
If its speed was lower, it will accelerate and attempt to reach it.

My guess is that somehow, at some point, devs introduced TurnInPlace = false to avoid units braking completly unnecessarily on new queues. That was something that happened alot in BA: spamming some move commands on a tank would make it brake to turn and move slower (or not move at all) than only 1 command sent.

The fix i'm proposing for that is rather use bigger anglelimits so that only turns over 110 degrees will trigger the brakes, and smaller turns (0 - 110°) will be performed at max speed and wont cause unit to brake.

Some videos showing 3 cases (older ba, latest stable, latest tests)

BA 7.20 -- 4 Stumpies moving on DSD's flat ground and not being able to perform the moves commands when they are spammed (TurnInPlace = true)
https://youtu.be/6z58NYj8HVY

BA 9.46 -- 3 Stumpies moving on tangerine's ground, not able to move at max speed because it's always performing needless turns ((TurnInPlace = false)
https://youtu.be/p7-niGYitcg

BA:test -- 4 stumpies on dsd flat ground, able to reach max speed, not losing speed on command queues spam, braking on >110° turns.(TurnInPlace = ture AND TurnInPlaceAngleLimit = 110, AND cmd_Raw_Move.lua)
https://youtu.be/80IEdO7zMBk
User avatar
Johannes
Posts: 1265
Joined: 17 Sep 2010, 15:49

Re: What exactly do current game developers want?

Post by Johannes »

Silentwings wrote:
So do you think that is mod related as well ?
No - the results we saw imply your claim about clumping is entirely fictional.
So to believe this one Very Scientific Test or your own lying eyes :?
[Fx]Doo
Posts: 66
Joined: 30 Aug 2013, 16:39

Re: Questions about BA

Post by [Fx]Doo »

The clumping was the same, although when 50 units were ordered to move towards one spot only, they would get their order cancelled pretty quick when stucked, and then be given a move order to get away from each other.

Today, the move order doesnt cancel, all units move towards the spot and collide with eachother. They never reach it, so they always keep on moving towards it, causing neverending collisions. As for the ones that successfully arrived at destination, they get stucked by all the other ones around and cannot move out anymore...

At some point, someone decided to remove that feature, that is why clumping is harder to deal with.

Haven't found yet what exactly controls this behaviour and when was it changed. It seems it occured on same engine version, between 7.60 and 7.70.
Ares
Balanced Annihilation Developer
Posts: 558
Joined: 19 Mar 2011, 13:43

Re: Questions about BA

Post by Ares »

Good job doo, needs testing with 9.46
[Fx]Doo
Posts: 66
Joined: 30 Aug 2013, 16:39

Re: Questions about BA

Post by [Fx]Doo »

Checked with multiple engine version and BA 7.60
from 82.7 to 84.0 --> units properly cancel move order and get a new queue to move away from the spot
85.0, doesnt happen anymore

So the change isnt BA related, but rather engine related and took place in version 85.0

I checked the changelog for this version and from the changelog, this is what i think might be relevant:

-call UnitMoveFailed event only for via Script.SetWatchUnit registered UnitDefs -- This one seems to be really relevant

-fix the mass-clumping unit movement bug

If anyone knows what exactly are these changes referring to, i'm all ears.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Questions about BA

Post by FLOZi »

First one is merely a lua api change, does nothing regarding pathfinder or unit ai changes.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Questions about BA

Post by Silentwings »

Second one is https://github.com/spring/spring/commit ... 2cdee402c0 (from 2011), iirc this was a specific issue where a group of units trying to move in close proximity to each other would become stuck to one another and eventually end up all caught in a big seething stuck ball.

So - it's a bugfix to the (then) collision handling, and afaics does not affect the paths chosen by the PFS.

P.S. I think you are barking up the wrong tree:
[Fx]Doo wrote:50 units were ordered to move towards one spot
In this case, the user has asked to have 50 units all on the same spot, and the correct engine behaviour is to give them precisely that (or, if impossible, as close to it as can be achieved -> a clump). Of course, customformations et al or just the old-style formation hotkeys exist for when formation orders are wanted, so that a player can order 50 units to move to a formation of 50 different locations.

I imagine the concern here is about when a formation order is given, but the resulting paths from the PFS result in clumping/collisions whilst the units are on their way to their destinations. This sometimes happens, and always has done, but avoiding it fully would afaics require a much more sophisticated PFS, hard work and likely a resulting perf drop.

Nostalgia has many causes, most of which require no factual basis, and often work better without one ... https://en.m.wikipedia.org/wiki/Nostalgia#Functions. In case you really want to go on trying, here's the (searchable <3) commit log for the default PFS https://github.com/spring/spring/commit ... th/Default.
User avatar
Johannes
Posts: 1265
Joined: 17 Sep 2010, 15:49

Re: Questions about BA

Post by Johannes »

Hard to know or remember all the different changes, something changes engine-side and some time later a mod-side change is made to compensate. Then the engine is changed again, again and again, fixing whatever issues the previous iteration had while introducing new isses.

But there was a time when there was just a good pathfinder and it stayed same version to version (at least from a end user perspective), and worked well for BA, then at some point the constant tinkering started.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Questions about BA

Post by Forboding Angel »

The original sy Pathfinder guy said fuckit and quit. There was some panic at the time because there was no one else to work on it. Kloot stepped in and has done awesome work, regardless of the incessant bitching he receives from people who know nothing.

As I said, the Pathfinder is brutally efficient, which is generally a good thing, but can cause problems when you're dealing with a bunch of units at a time. I think that raw move is an acceptable compromise to that.

If you pull up debug mode you can see the pathing in real-time. I dunno why no one seems to remember that that exists.
Locked

Return to “Balanced Annihilation”