Blade Ball Ball Physics

By “code”, do you mean the “ball” could just be some vector point that a script keeps track of while the physical ball is tweened to that vector?

3 Likes

Pretty much. I have a suspicion it’s a point controlled by code.

3 Likes

We don’t use tweens.
Characters

9 Likes

Indeed we do not. This is fun to read thru tho ngl lol

5 Likes

I’m not too surprised honestly. Maybe it’s lerping + mod, now that I think of it tween is unreasonable based on the symptoms.

4 Likes

TweenServiceV2 is the answer to all this. TweenService V2

3 Likes

Now that i think about it, im pretty sure they use an invisible ball as the actual ball and then just use tweenv2 to make it appear “smoother”

2 Likes

Allow me to go into more detail, there is an invisible ball, which acts as the actual ball, with the actual balls hitbox, etc; but then there’s an actual visible ball, which is just purely visual and is constantly tweened to the real ball.

3 Likes

This method causes things to be eternally desynced

3 Likes

If it isn’t tween then the only option has to be lerp

2 Likes

VectorForce and LinearVelocity. They are gate keeping their methods on how they do it exactly, Which i fully understand. However, I’m pretty sure they use those instances.

2 Likes

If you want the real answer, they most likely use a client-sided and server-sided simulation of the ball. The server side handles the physics and collision detection, while the client-sided simulation is for visuals. I did something similar in my tennis game. Essentially, whenever the server ball is created, they fire a remote to the client to replicate the simulation in the exact same way.

To combat lag and unexpected server behavior, the client double checks the location of the server ball, and if it’s too far, they update the location of the client ball to sync it up.

14 Likes

Same issue as what I just said

2 Likes

There is stuttering with body movers and physics constraints. That’s the issue they are trying to solve

2 Likes

I understand the LinearVelocity but for what would they be using the VectorForce?

2 Likes

To give the ball anti-gravity properties.

3 Likes

True but how does blade ball replicate the ball to the client with no issues and how do they do it with curving the ball…

2 Likes

thats the whole point of this discussion :sob:

3 Likes

Any hints on how you, blade ball do it? :sweat_smile:

2 Likes

move the ball on the client with tweening or bodymovers and calculate if the ball touched the player on the server :100:

2 Likes