|Anonymous | Login | Signup for a new account||2013-06-20 12:16 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002814||Spring engine||General||public||2011-12-06 11:58||2011-12-18 13:31|
|Target Version||Fixed in Version||85.0|
|Summary||0002814: Units slow to their minimun allowed speed when turning|
|Description||Units with turninplace=1 stop completely to turn. Units with turninplace=0 and turninplacespeedlimit<maxvelocity slow to turninplacespeedlimit to turn.|
Apparently this is undesired behaviour. I think units are suppose to partially slow down intelligently depending on the angle of the turn (with lower limit turninplacespeedlimit).
I'm not really sure because I am happy with the behaviour of turninplace=0 and turninplacespeedlimit=maxvelocity and am using it for everything in ZK.
|Tags||No tags attached.|
"Units with turninplace=0 and turninplacespeedlimit<maxvelocity slow to turninplacespeedlimit to turn."
If the turn angle is large enough, yes.
"I think units are suppose to partially slow down intelligently depending on the angle of the turn (with lower limit turninplacespeedlimit)."
They do, tipSL only "defines the _minimum_ speed units will slow down to (the speed at which the turn is actually performed can be higher depending on the angular difference and turnRate)" to quote myself from the wiki. Maybe in practice units drop down to tipSL too quickly, but it is highly dependent on turnRate.
|aehm... sounds to me like the request is already implemented.. nothing to do.. close?|
corgator in ZK slow to a stop when turning 45 degrees if I change turninplacespeedlimitto 0. The turning in this case is done by the pathfinder, no extra move order is given after the first. This is a fairly ordinary unit.
maxVelocity = 3.7
acceleration = 0.057
brakeRate = 0.07
turnRate = 703
turninplace = 0
turninplacespeedlimit = 0
Give it a move order at 30 degrees off an axis to cause the pathfinder zig-zag to observe the over slowing.
"Maybe in practice units drop down to tipSL too quickly, but it is highly dependent on turnRate. "
Perhaps there could be some tags to let mod devs more finely control slowing. Tags could control a function that decides how far to slow based on turn angle.
edited on: 2011-12-06 20:16
"turnRate = 703"
This means the unit can turn (703 / 65536) * 360 = 3.86 degrees per frame. The speed reduction factor is proportional to (degrees(turnRate) / turnAngle), in this case (3.86 / 45) = 0.08, so while turning its speed will drop to (maxVelocity=3.7 * 0.08) = 0.29 elmos/frame. But a 45-degree turn only takes (45 / 3.86) = 11.65 frames to complete, so the unit should not lose more than (brakeRate=0.07 * 11.65) = 0.81 elmos/frame of its initial speed going into the turn. Might be a bug, please test with a recent development build (6c9931d3ed88825568c742225f26a0963d73aee9 or later).
That is a ridiculously sharp reduction factor so in practise units will slow to turninplacespeedlimit as fast as their brake rate allows.
Could we define our own reduction factor? A linear equation would be good enough. Something like:
reduction factor = gradientTag * (degrees(turnRate) / turnAngle) + constantTag
Limit the range to [turninplacespeedlimit/maxVelocity , 1]
edited on: 2011-12-07 12:14
"units will slow to turninplacespeedlimit as fast as their brake rate allows."
That is the point.
Nevertheless I asked you to test a development build for a reason, because 1) taking your own corgator example the total slowdown during a 45-degree turn should not be more than 0.81 elmos and 2) relevant parts of the code controlling acceleration changed (since 84.0). I'm not going to modify the formula without feedback.
By "units will slow to turninplacespeedlimit as fast as their brake rate allows." I meant that for common turnRates the formula returns a very low reduction factor for the angle of turn. So the formula doesn't achieve much.
Anyway that's just clarification, I'll test the changes since 84.0 sometime and report back.
|In spring_84.0.1-461-gae47ae2 it is better for the above attributes. For a unit with higher brakeRate there is too much slowdown.|
|2011-12-06 11:58||Google_Frog||New Issue|
|2011-12-06 12:26||Kloot||Note Added: 0007834|
|2011-12-06 12:35||hoijui||Note Added: 0007835|
|2011-12-06 14:30||Google_Frog||Note Added: 0007836|
|2011-12-06 16:55||Kloot||Note Added: 0007837|
|2011-12-06 20:16||Kloot||Note Edited: 0007837|
|2011-12-06 20:16||Kloot||Note Edited: 0007837|
|2011-12-07 09:03||Google_Frog||Note Added: 0007839|
|2011-12-07 11:20||Kloot||Note Added: 0007840|
|2011-12-07 11:20||Kloot||Note Edited: 0007840|
|2011-12-07 11:30||Google_Frog||Note Added: 0007841|
|2011-12-07 12:14||Kloot||Note Edited: 0007840|
|2011-12-11 11:03||Google_Frog||Note Added: 0007856|
|2011-12-18 13:31||Kloot||Status||new => resolved|
|2011-12-18 13:31||Kloot||Fixed in Version||=> 85.0|
|2011-12-18 13:31||Kloot||Resolution||open => fixed|
|2011-12-18 13:31||Kloot||Assigned To||=> Kloot|
|Copyright © 2000 - 2013 MantisBT Team|