HomeWildfire Games

Add accelerations in unit movement.

Description

Add accelerations in unit movement.
This helps preventing arrow dodging.

Differential Revision: D3200
Reviewed By: Freagarach
Comments By: wraitii, vladislav, Palaxin, Stan
refs: #5106

Event Timeline

When units get pushed, they keep the walking animation although they're idle. See the attached replay (r25958) around ten minutes.

This change makes it very cumbersome to use formations when moving units around the map. Since the formation is set to the box formation by default (rP24480), new players will be shot to pieces. At least change it to "none".


Testing it on the sceanrio map - Pathfinding Demo with 33 units (1 cavalry, 16 spearman, 16 archers).
First with rP25952: (35secs)

Second with rP25953: (43secs)

In tests on some other obstacle courses, the time increase is usually ~20-30%. The gameplay feels much slower. I personally do not like this change.

I would only give this to special units like ships or battering rams, but not normal human units.

marder added a subscriber: marder.Oct 11 2021, 2:52 PM
Freagarach added a comment.EditedOct 11 2021, 8:05 PM

It looks that formation members outrun the controller and have to move backwards every now and then?

finally got to try it and this is my first impression: It multiplies all the issues that are there already with the normal pathfinding. So rams take extremely long to turn and reach their goal, which makes them way less effective, formations struggle even more as currently, as they are always shifting and therefore stopping and accelerating again.

I like the way ships accelerate, but it looks a bit strange if you have this smooth acceleration and then an immediate stop when the reached their target position.

Stan added a subscriber: Stan.Oct 12 2021, 12:41 PM

Does this warrant for a concern?

Has anyone tested this on the dancing demo?

I want to test it a bit longer before raising a concern. That is just my impression from one game.

marder added a comment.EditedOct 12 2021, 9:11 PM

this is my best attempt to measure the impact on rams

with this patch (25963): ~ 23 second to destroy the temple

before this patch (25937) ~ 19 seconds

Doesn't seem much, but it multiples with the distance and the number of obstruction in the way.
So if this stays in the game, rams need better armor.

General opinion: while I thought it would be a nice improvement to the unit motion, the only place where I really like it are ships, for all other units I don't feel like it is an improvement.

I always felt rams were much too mobile. But one may want to balance it with armour/health I guess.

marder added a comment.EditedOct 13 2021, 8:44 AM

maybe also as a general note: What I wrote about rams and @Langbart wrote about formations applies more generally. This basically makes all ranged units and especially buildings stronger (Don't have to move that often), while it at the same time makes melee units weaker (longer path, more stops and turns). So one might also want to think about re-balancing that when this stays in.

I think unit acceleration can help for more realist looking movement. However I would not like to see an effective increased turn rate, but that could be fixed with some changes in turn rate.

Also can you compare how it looks for a single unit? After looking at that, you can check if it looks good. If it looks good, the formation issue is an formation issue. That issue could be circumvented by giving units in some formation instant acceleration, or the ability to run to keep up with the formation.

marder added a comment.EditedNov 19 2021, 2:14 PM

Edit: I tried to do some profiling on this, but elexis pointed out that you can't just use the same ai vs ai replay to do that, since the game will play out differently.

Stan added a comment.Dec 5 2021, 9:54 AM

I want to test it a bit longer before raising a concern. That is just my impression from one game.

It's been a while now. Is it a deal breaker?

In rP25953#54552, @Stan wrote:

It's been a while now. Is it a deal breaker?

I find it hard to judge that on my own, which is why I didn't raise a concern.

Do I like it in this form-> not really
Do I think it helps to prevent dancing -> for the most part that wasn't even possible before, so no
Do I think it changes the balance -> yeah, armor ect would need to be adjusted accordingly
Would I prefer if this was not included? -> yes
Would I accept if it stays in the game -> sure, I just have to get used to it.
So is it a dealbreaker? -> ?

But the problem is: (iirc @bb pointed that out to me somewhen on irc and as @alre also mentioned):
The fact that I don't feel like it's an improvement and that all movements and especially formation feel more clunky now could just be because the values just need more finetunig/ balancing. Maybe I would like it with the right combination of parameter.

That's why I find it difficult to judge between how this feature feels to me when I play vs if the feature itself is a good or bad idea.
I think for the most part, this is just a matter of personal taste. @Freagarach and @bb and @wowgetoffyourcellphone seem to like it.

@wowgetoffyourcellphone will extensively use the feature in DE, and I imagine it is useful at least for ships in Vanilla and of course many other mods which might want more realistic motion, but if you want to remove it from land units in Vanilla, that seems fine to me.

alre added a comment.Dec 5 2021, 11:05 PM

to me, unit motion actually seems more realistic without acceleration. of course another reason to not include it would be avoiding yet another game balance rework. maybe (just maybe) this feature could be a starting point for obtaining ships that realistically move on water, and horses that change gait, however at the moment it looks quite bad to me, for almost all units. I can't find template parameters that make the acceleration look worth it. AoE doesn't use unit acceleration, and that's for a reason.

alre added a comment.Dec 5 2021, 11:07 PM

the units on which acceleration looks better are rams. I don't know if it really makes sense to have acceleration in a game applied to rams, as they are usually displayed moving steadily, but some acceleration does look nice on them.

Stan added a comment.Dec 6 2021, 3:12 PM

So basically if we don't remove this in vanilla, I will get insulted when A26 comes out by the MP community?

marder added a comment.Dec 6 2021, 3:50 PM
In rP25953#54567, @Stan wrote:

So basically if we don't remove this in vanilla, I will get insulted when A26 comes out by the MP community?

Well I don't think the MP people will be very fond of this change, but it would be good if some of those people would actually test.
who of the active MP players use svn? Maybe just ping some people to get more opinions before the release.

I think at least some tweaking need to be done. The interplay between acceleration, turn angle, formations and the bad pathfinding for large units just doesn't feel smooth (to me)

Stan added a comment.EditedDec 6 2021, 4:06 PM

however at the moment it looks quite bad to me, for almost all units. I can't find template parameters that make the acceleration look worth it.

@marder ^ If no value works how can it be tweaked? It felt that way for turn rates, which were lowered.

AoE doesn't use unit acceleration, and that's for a reason.

That's a bit of a strawman argument, because StarCraft has it :P

marder added a comment.Dec 6 2021, 4:22 PM
In rP25953#54571, @Stan wrote:

however at the moment it looks quite bad to me, for almost all units. I can't find template parameters that make the acceleration look worth it.

@marder ^ If no value works how can it be tweaked? It felt that way for turn rates, which were lowered.

fair point. comes down to: I haven't tried to search for a better parameter combination myself. Maybe with even lower turn rates ?
The thing is that I am not too bothered by the acceleration of a single small (citizen/ infantry/ cav) unit. This is relatively ok with me.
For me the problem is when using formations or stuff with a big pathfinding class.
Due to the nature of the current formation and pathfinder code, both these entities tend to stop very often and trying to readjust their position. And this multiplies the effect of the acceleration and it begins to feel bad.

I agree with @alre and @wowgetoffyourcellphone that it looks good when a ram or ship accelerates (in a straight line), but when it then tries to navigate around something and barely gets forward due to the constant stopping and shifting and re-acceleration it does bother me.

So if those values (formations and siege / eles) could be tweaked I think it may be an improvement. But again, I haven't tried to find something better yet.

In rP25953#54567, @Stan wrote:

So basically if we don't remove this in vanilla, I will get insulted when A26 comes out by the MP community?

Well I don't think the MP people will be very fond of this change, but it would be good if some of those people would actually test.
who of the active MP players use svn? Maybe just ping some people to get more opinions before the release.

I think at least some tweaking need to be done. The interplay between acceleration, turn angle, formations and the bad pathfinding for large units just doesn't feel smooth (to me)

I would like to learn more about SVN, but I currently am not in the position to dedicate time to that. Unlike Alre, I am not afraid of balancing issues, who could be fixed later. The MP community wants a balanced game and they have the tools to propose balance changes, so that puts the responsibility with them.

The most important question seems to me: Does it look good? I think improved visuals should not be halted by balance issues if these can be fixed.

I don't like being someone that gives suggestions and be the one who expects others to imply them. What could really help for cavalry, is having an acceleration animation when the unit is accererating. So that might be interesting.

My view is that the formation issue, is a formation issue. So that shouldn't be a concern if we could improve formation movement. What I was thinking is to give each formation a leader which defines the formations position and the other units will do some running to keep up with the leader (and set walk speed of the leader equal to the slowest unit in the formation or something else to prevent fast pikemen).

alre added a comment.Dec 6 2021, 10:19 PM
In rP25953#54571, @Stan wrote:

That's a bit of a strawman argument, because StarCraft has it :P

Starcraft marines don't have acceleration. Spaceships do, but they also take a bit of time to stop, and they float randomly around their position. I think the important point here is that different units have different way of moving, and different acceleration profiles. Unfortunately, I think that one simple parameter is not sufficient for parametrazing all acceleration profiles one may need or want. What I have in mind is cavalry in games like total war of battle for the middle earth, where horses start at a good speed (except for some 'reaction time'), but start going really fast after running some 50m. That's when the charge really start, and at that speed the horses won't make significant turns without slowing down and basically stopping the charge. This looks realistic, especially if combined with stamina: not unlike humans, race horses reach a reasonably high speed in just a moment from the start, but keep steadily accelerating for a good lapse of time before getting tired (and slowing down again).

In rP25953#54567, @Stan wrote:

So basically if we don't remove this in vanilla, I will get insulted when A26 comes out by the MP community?

I'm talking for myself only, and what I'm saying is not more important for MP than for SP, what I'm saying is that currently, soldiers look like they have their legs dipped in jam every time they stop or make a turn.

One may tune the acceleration values and turning times to get a result that effectively reproduces the current balance of the game, so that is not a problem... but someone has to do it, and test it properly. MP community will be happy as long as the balance is fun.

I agree with @alre and @wowgetoffyourcellphone that it looks good when a ram or ship accelerates (in a straight line), but when it then tries to navigate around something and barely gets forward due to the constant stopping and shifting and re-acceleration it does bother me.

Agree. Ships pathfinder is already frustrationg enough in A25, I wouldn't want to make them any more demanding.

In conclusion, if this diff is confirmed, I would give up acceleration in for humans, ships, and elephants, and maybe tweak the parameters for cav, in order to have a balance similar to the one we have in A25. For rams, I wouldn't know what to choose.
This is just my opinion, mostly based on how units look as they move (for rams and ships one must also think about ease of use).

Stan added a comment.Dec 6 2021, 10:31 PM

Star craft vcs do though.:)

Maybe we could record a small video and ask players how they feel about it.

alre added a comment.Dec 6 2021, 11:22 PM
In rP25953#54580, @Stan wrote:

Star craft vcs do though.:)

that is to render them hovering, you can see they do not walk. starcraft gatherers, for balancing reasons, were designed to be immune to mines.