DRL > Discussion
Observations on Berserk and Move Speed
(1/1)
General Patton:
Just felt like doing some math to demonstrate the level of speed a berserker can attain and how the slightest speed increase can be exponentially useful.
X=Base Move Time
Ceiling(.4/X)=Number of moves you get per turn
Ceiling(.4/X)*X-.4=Length of turn
Ceiling(.4/X)/(Ceiling(.4/X)*X-.4)=Moves per second (mps)
If 1>X>.41, 1.66<mps<100
If .39>X>.21, 5.26<mps<100
If .19>X>.14, 17.65<mps<150
If .13>X>.11, 33.33<mps<100
Not entirely sure what happens when X=.4,.2,.133333333, or .1 exactly.
I think you either go up to the next number of moves and your turn takes X seconds, or your next turn starts instantly and you get an endless succession of zero second turns leading to infinite moves per second.
Note that this function for mps is not continuous. Having more moves per turn will always help you conserve berserk time (because it's measured in turns and not seconds), but a slower base move speed could give you shorter turns and unintuitively increase your actual move speed.
Might find the first derivative for each continuous part of the function, later. But now this one needs sleep.
tehtmi:
Math is always good.
The basic approach you are taking appears correct, but your rounding (or at least your method of rounding) seems to be getting you into trouble in some corner cases. Those 100 mps values are much too high.
Here is a breakdown of the player's energy (scount) over time for a base move time of 410ms. (Spoiler'd for lots of boring numbers)
Spoiler (click to show/hide)
--- Code: ---initial: 5000
move: 4590
.5s elapse: 5090
berserk bonus: 5490
move: 5080
move: 4670
.4s elapse: 5070
berserk bonus: 5470
move: 5060
move: 4650
.4s elapse: 5050
berserk bonus: 5450
move: 5040
move: 4630
.4s elapse: 5030
berserk bonus: 5430
move: 5020
move: 4610
.4s elapse: 5010
berserk bonus: 5410
move: 5000
repeat...
total moves: 10
total elapsed time: 2.1s
average mps: ~4.76
--- End code ---
But wait! What if the player's initial energy is different?
--- Code: ---initial: 5010
move: 4600
.4s elapse: 5000
berserk bonus: 5400
move: 4990
.1s elpase: 5090
berserk bonus: 5490
--- End code ---
I stopped because 5490 is one of the states in the above cycle... so 5010 is not part of a steady-state. But here we do see the .1s elapse that you were getting from your formula.
It may not be the case that there is always a unique steady state (well here the one's digit case can be changed, but it isn't meaningfully different), I haven't considered it carefully enough yet.
For a base move time of 400ms, you will get exactly 2 moves per turn for a mps of 5. There is no danger of infinite moves per second.
I'm not sure what the proper formula should look like yet, but I'll think about it some more.
Navigation
[0] Message Index
Go to full version