Prediction, anims, viewbob

The video above shows the viewbob, tilt and viewmodel bob stuff I pushed to the dm98 repo this week.

I got prediction nailed down this week. Any entity the player is the owner of is predicted (right now). That means when you’re carrying stuff, like a weapon, it’s predicted, as you’d fully expect.

As part of this I ended up looking into and fixing a bunch of other issues. Like the player model’s animations were all delayed, and I fixed that. The viewmodel animations were all ping delayed too - despite being purely clientside. Fixed that too.

40 Likes

Perfect! Looking great.

4 Likes

Awesome, can’t wait to start working with S&box.

4 Likes

Looks great!

2 Likes

:+1:

1 Like

I’m still a little confused on how prediction works - does this mean it only plays on the client? Or does this mean that it plays on both server and client?

2 Likes

Sorse xD

4 Likes

Your client sees what your own client predicts.
Everyone else sees what the server calculates based on the inputs you gave it. If your prediction differs from what the server calculated, your client prediction is adjusted to match the server.

Correct me if I’m wrong.

Here’s Garry’s quote from discord:

Edit: @nameofuser thanks for pointing that out, edited the post.

5 Likes

That makes sense, thanks.

2 Likes

The camera intensity gives me some major gmdm vibes, nice!

2 Likes

love how easy and fast FP can prototype and develop new features, if addon devs can be half as efficient and be half as competent we can expect some great addons and gamemodes

3 Likes

I would much rather word it that the server does not “predict” anything when it receives your input, as “prediction” in this case is purely a client behavior. In Source, what happens in the server is what’s considered the objective reality with no compromise(other than how bullets need to look back into the past to compensate for lag).

The client is “predicting” that things will be this way and that so we can go ahead and pretend that’s what’s going to happen on the server, but it knows that’s not necessarily the case and so it’s always listening out for the actual results that arrive a bit(or a lot) later depending on your ping. Better than waiting half a second.

You’ll see your position snap back or a weapon animation fail when the client either doesn’t get any results in time or the results vary too much. There are things the client can never properly predict(though it tries) such as player collision with server-sided physics, which is why props feel so weird to walk on in multiplayer.

3 Likes

A little unrelated, but in that same commit you changed the RPC identifier to [ClientRpc]. Are you going to be repurposing [Client] for something else or is it purely for distinction? I know there was a discussion about the concommand identifiers so I’m curious if that inspired the change

2 Likes

Everything is masterpiece, only the visualization of the inventory is knocked out of the whole stylistics. Feeling of something different. I understand that the game is just being created, but still…

2 Likes

P.S. I suggest, at least for a small dough, to reduce these boxes of inventory in height in order to give the shape of a rectangle. Full-fledged icons cannot be inserted there exactly, there will not be enough space, especially at a lower resolution, and leaving enough space is absurd

2 Likes

The firing sounds grate my ears

2 Likes

Me, every time I watch Garry’s clips unmuted

2 Likes

It might just be an attempt to make the various attributes less ambiguous, ClientRpc is a lot clearer in what it does especially if we’re going to see things like client/server attributes for console commands

3 Likes

An absolutely great move regardless of why

2 Likes

Looks beautiful

2 Likes