1 (edited by necropotame 2016-07-07 11:23:15)

Topic: Freeze effect and prediction

I post here what I found to make a proper freeze effect in Teeworlds. Maybe it's known, but so far, I've haven't see it in both DDRace en OpenFNG. When the tee is frozen, the server should send new tune params with these parameters:

m_GroundControlAccel = 0.0f;
m_GroundJumpImpulse = 0.0f;
m_AirJumpImpulse = 0.0f;
m_AirControlAccel = 0.0f;
m_HookLength = 0.0f;

m_GroundControlSpeed = 0.0f; //Optional because it will not change anything in practice (thx to heinrich5991)
m_AirControlSpeed = 0.0f; //Optional because it will not change anything in practice (thx to heinrich5991)

That way, the client know that your tee can't move or jump. Of course, you must send back old tune params when the freeze effect is gone. I've implemented it for InfClass and it works well.

2 (edited by 2016-07-07 09:54:38)

Re: Freeze effect and prediction

Good information, thank you.

You can reply to me in private messages?)) smile

necropotame wrote:

I've haven't see it in both DDRave en OpenFNG.

You have an error in post. Change DDRave in DDRace smile

3

Re: Freeze effect and prediction

You don't need to set m_GroundControlSpeed and m_AirControlSpeed to 0 I think.

4

Re: Freeze effect and prediction

Maybe it's not needed (it's only used for SaturateAdd), but it seems more logical in the sens that the maximum speed of your tee should be 0. I think it's more resilient to updates like this. And it should change nothing in term of performance because all tune params are sent together, even if only one is changed.
But thanks to point out that. I've updated my post

5

Re: Freeze effect and prediction

Maximum speed = 0.  Doesn't Tha mean that you can't be dragged with the hook? That's what I understand as maximum speed.

Sorry if I'm completely wrong

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

6

Re: Freeze effect and prediction

No, it's the maximum speed that you can get by yourself. The other forces are not affected by this.

7

Re: Freeze effect and prediction

Is this preventing the clients from predicting own inputs while being freezed?

In that case it would be very usefull, thanks for sharing anyways.

There are three kinds of lies: lies, damned lies, and benchmarks.

8

Re: Freeze effect and prediction

Yes, it's exactly the purpose of this smile