Page MenuHomeWildfire Games

Stop dodging arrows by spamclicking or patrol: Waste time turning
Needs ReviewPublic

Authored by bb on Fri, Jun 26, 10:07 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Trac Tickets
#5106
Summary

When giving repeated movement orders or patrolling a short distance, one can dodge arrows (commonly called "dancing"). This patch makes the initial turn on a walk/patrol/walkandfight order cost time, and hence should stop dancing.
Compared to D2767, also repeated long walks do not dance anymore (one can only try repeated gather/attack commands maybe). Moreover giving repeated short walk commands in the same direction, is not nerfed much. However pulling out of a fight is made a little harder.

I would like to ask some players who know how to compile the game to test this and give some feedback. @Feldfeld @ValihrAnt @borg- please use this exe if you do not know how to compile the game (I think you also should apply the patch):

Test Plan

Note that the code is tremendously ugly

Note rotation is a bit jaggy (a commit-able version should fix this, but for gameplay testing, this version could suffice)

Note formation dance is still possible

Think whether it is worth to combine this with D2767 in some way

Event Timeline

bb created this revision.Fri, Jun 26, 10:07 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2531/display/redirect

I have errors trying this patch

bb added a comment.Fri, Jun 26, 10:24 PM

Did you rebuild the game?

I use svn on windows, did "apply patch". I think build is usually done automatically when updating so I don't know how to do it.

bb added a comment.Fri, Jun 26, 10:28 PM

Yea, there is an autobuild in the repository, so everything that gets committed will be build. Not every patch will get a build. Though I will try to get a build for this revision from somewhere.

The interpolation of the rotation looks fairly bad (it's kind of jerk-y).

I think I prefer the slower movement, because this is introducing a lot more code (and unitMotion code too).

source/simulation2/components/CCmpUnitMotion.cpp
841

I'd rather you checked for angle here too.

905

?

bb edited the summary of this revision. (Show Details)Wed, Jul 1, 11:26 PM
bb edited the test plan for this revision. (Show Details)
bb added a subscriber: ValihrAnt.
bb added a comment.Wed, Jul 1, 11:29 PM

The interpolation of the rotation looks fairly bad (it's kind of jerk-y).

Yea I know, this can be improved fairly easily, however didn't want to waste time at it in case the idea doesn't work.

I think I prefer the slower movement, because this is introducing a lot more code (and unitMotion code too).

I find this a worthless argument, if this is better gameplay wise, we should take this. The amount of code is not really relevant then IMO. Though surely one could reduce the number of lines in this patch. But again, don't want to waste my time on that for now.

bb edited the summary of this revision. (Show Details)Wed, Jul 1, 11:31 PM
bb added a subscriber: borg-.
borg- added a comment.Thu, Jul 2, 12:49 AM

I will make tests

Feldfeld added a comment.EditedThu, Jul 2, 10:28 AM

I think that this nerfs dance up to a reasonable point. Here are some details I got from my testing :
First note that when testing (for everyone that is interested in that) it's important to know the difference between singleplayer and multiplayer. In multiplayer, IIRC there is 1 turn every 0.5 seconds (which makes traditional dancing easier). In singleplayer, things are much smoother. When testing, you should go multiplayer -> Host game (even if no other human players will join you).

  • There is one variant of dancing i came up with trying to break this patch, however it works only in singleplayer, not in multiplayer (because somehow this requires perfect timing). It consists in clicking a resource and then repeatly hit the stop hotkey, then back to work hotkey, then stop hotkey again etc. Works a bit differently between attack stances and no attack stances. As i said it shouldn't be a problem but i say it just in case.
  • Even if formation dancing is not fixed this should be less of a problem (because it is easier to call out formation dancing) but some players that don't care could still do it i guess.
  • Other than that it is still possible to dance between resources (depending on the situation this can require good accuracy from the player though) but despite that it's still good to not waste time turning going for ressources / buildings for the gameplay I think. That also is made a bit easier to call out, and impossible to do for heroes, very situational for cavalry. Dancing with infantry citizen soldiers is harder due to low speed and HP. (But in the end still possible).

Now for the gameplay, well obviously it's a bit annoying to have your units waste time turning. I don't know to which extent, and the feeling of other players would help to know that. Typically, when you order units (and want to be efficient) you would click fast somewhere in the direction you want to go and then give the actual order. That is penalized here which could encourage players to either give the actual order directly (slow) or place a foundation in the direction you want to go (fast due to hotkeys), both situations being not ideal for gameplay, but maybe that won't actually turn out to be a problem depending how players adapt.
I think it's good that it makes pulling out of fights harder. However that can be nerf to cavalry rushing in general which would be a thing to look out for.
Note that repeatedly clicking in a same location makes the unit almost not move at all in singleplayer, but this looks fine in multiplayer.
A faster turning rate could possibly be tried.

Here is a small video that shows a bit how the patch looks like and shows dancing between resources (done in 'multiplayer' type of game which is probably easier than singleplayer, mind that if you want to test yourself)
Note that in team games with larger map sizes the wood lines will be thicker

After quick playtest I don't think it will have much impact on gameplay for everything not related to combat. For combat (raiding in particular) there might be a need for multiplayer testgames to get a better feel of it.

How hard would it be to implement proper turning from here? I mean one always needs turn time to change the facing. I tested some by removing the if (m_RotateTime) to make entities rotate whenever performing a move and it wasn't too bad IMHO.

bb added a comment.Mon, Jul 6, 2:31 PM

Thanks for the extensive testing @Feldfeld, I will think about your comments and see if some things can be fixed somehow (no promises here). Regarding formation dance issue: I know this patch does not fix it, but (correct me if I am wrong) this dance can only be achieved with a patrol command. So that is relatively easy to fix, without major gameplay influence one can simply disallow patrol commands on those short distances).
If you happen to have the replay from that video around, I did be interested (saves me recreating it ;) )

How hard would it be to implement proper turning from here? I mean one always needs turn time to change the facing. I tested some by removing the if (m_RotateTime) to make entities rotate whenever performing a move and it wasn't too bad IMHO.

removing m_RotateTime should do turning at/during every move. I have wrote this patch a while ago like that, but when testing big masses of units, it became total hell.