For background info it’s a volleyball system with custom physics. There are two balls: a server ball and a client ball. The client ball is visual and the server ball is for sanity checks. My problem is that I’m worried that doing a heartbeat loop on the server will negatively impact performance, but I’m not sure how I would sanity check without it cause they rely on the server and client balls being close together. Also the physics required a heartbeat loop too, so that’s also a problem. Help appreciated ty
#How can I optimize this and make it better for performance
1 messages · Page 1 of 1 (latest)
Instead of using heartbeat, you can check only if SOMETHING happen to the ball, like, when a player touche the ball, it'll check and since the ball is server-side so hacker can't modify, just be fore to add sanity check for the player, checking if the ball is really touching thr player and making sure the player is not flying or anything like that
(just a idea)
The heartbeat is for physics and when a player hits the ball, there’s another heartbeat to update position
I think you should learn trajectory curve for ball, so you won't use heartbeat to update position every time, just use physic of Roblox instead of updating every heartbeat
Roblox physics are extremely bad
** You are now Level 5! **
That was just a idea, but heartbeat is very good, just don't do big calcul in heartbeat