TickTimer
#11
I think that "cap" is useless, I'll throw it out.
Reply
Thanks given by:
#12
Great Smile
Reply
Thanks given by:
#13
Done (rev 1353)
Reply
Thanks given by:
#14
What's gonna happen when the server is under heavy load now?
Instead of making the game run slower things will overshoot now, mobs will teleport around and pickups will fly everywhere.
Reply
Thanks given by:
#15
? Why would this happen. It's only a callback for plugins..
Reply
Thanks given by:
#16
Nothing's gonna happen, since the physics still doesn't do anything based on the time.
On the other hand, we can finally detect overloads and react to them accordingly.
Reply
Thanks given by:
#17
Of course the physics use the delta time (its not the plugins I worry about).
You use the delta time to integrate velocity.
Things like this happen: position += velocity * deltatime
When deltatime is something really big for whatever reason the resulting position will be much further away then when using a small deltatime.

Look at this table, I believe it is called Euler integration?
[Image: zn66hl.jpg]

Both have the same acceleration, but one has a timestep of one second and the other a timestep of 2 seconds
Reply
Thanks given by:
#18
Why don't you fix the problem there (in the velocity thingy) instead of doing a workaround in the tick that is shown to plugins - since the workaround is only applicable to one thing.
Reply
Thanks given by:
#19
I think the physics should not use the deltatime. Actually, I think nothing should really use the deltatime. We measure time in ticks in the game, so let's measure it in ticks, really. If a tick takes longer, then whatever, the game will slow down a bit, who cares.

It's already a problem with furnaces, they don't cook the last item because of time rounding.

The server is running quite fine in recent versions, nothing makes the tick thread very overloaded, so ticks longer than 50 ms should be very rare anyway.
Reply
Thanks given by:
#20
Yeah, seems sensible. Although the server would slow down when the ticks slow, but the vanilla server does that anyway.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)