I’m working on a mining system and I feel like it could be optimized better as the network bandwidth usage is quite heavy
Right now, whenever a mining object gets hit:
The client fires a RemoteEvent to the server.
The server checks if the object’s health is <= 0.
If it is, the server creates the material drop (ore, crystal, etc.).
This works, but I think it’s heavier than it needs to be.
My first idea for optimization is:
The client handles creating the visual materials/drops, this way the server doesn’t need to calculate all the physics, rendering, etc of the material thats been dropped
The server will keep the real mined materials in a table so explotiers cannot take advantage of this system
Is there another way to make this system even better? Although this could definitely help the servers side, I feel like having so many connections (possibly hundreds) that run every time an object is mined on the client side could be heavy
Edit: I js remembered my current system isnt based off of connections to to every objects health but when it runs and detects what object the mouse is hovering over when mined
Feel free to give me feedback on a better approach
Thanks everyone