I’m currently making a game that has the player try to ram others’ character to tip them over and make them explode
I’m running into an issue with physics in relation to individual clients and network ownership, because even though the movement system is entire based on physics, those physics don’t seem to replicate to the other clients (i.e the velocity of opponents), as seen in the video below
I haven’t begun making any solutions for it yet, as I don’t want to start creating my own system, then finding out Roblox has an easy fix.
The planned fix, if there are none by Roblox, is to calculate the collision between players on the server, and then apply a force to the characters that would produce an expected outcome.
You could either calculate and apply velocity on the server, or calculate it on the client, send it to server, and have the server apply that velocity, 2nd option might be easier but it’ll be more exploitable. Or just let crazycattle be its own game
(Both of those solutions will be laggy for the client that got hit, unless the client predicts the rotation a collision will give ahead)
That’s the solution I dreaded.
I wanted to make a simple game that I could get out relatively fast, but comparably, it’s gonna be a nightmare if I gotta calculate and manage collisions myself. Do you by chance know if the touched event passes any other parameters, such as the point of the collision or the face being hit, similar to rays?
Hmm yeah I struggled with this too until I finally managed to release reaction survival.
The blocks use body velocity through a client event. It’s actually really simple how it works. The server generates the projectile and fires all clients with important information about how it works. The client generates a clone of the server’s projectile. The client then uses that cloned projectile and the damage gets sent to the server through touched on the client side. The only way I really managed to understand it is by keeping the code for the server one despite the fact the game is only using the one generated by the clients. Replication will vary from client to client based upon their connection to the server… but nonetheless each client can see the exact same thing just replicated at different speeds and because it’s client sided there is zero lag whatsoever. I hope you manage to figure it out. Just do what I did and replicate it on the server first, then all clients, then use the one on all clients, and make the server one invisible and useless. It’s the best way to break it down without getting confused.
I already foresee this being an issue with characters and the way I’m using it:
Assuming the ping of the players isn’t a consistent speed, the call to change the steering direction and throttle of a character with slowly offset over time, which would have to be the case if I want the velocity to replicate, and replicating position to circumvent this would have their character teleporting at every turn
sounds complicated enough thankfully my solution works no matter what the situation is but perhaps you will have a whole lot of coding to do before you ever managed to make it work the way you want it to. Everything takes time my friend