Game Client/Server logic help

Sup people, my team and I are planning a huge game on this platform. The fact is, as the scripter of the game i wouldn’t want that the game becomes too heavy for the server to handle, nor i want it becoming too vulnerable for exploiters.

Which would be the best logic to follow for the abilities system? I’ve come up with two systems, one mainly on the server with fx on the client and one mainly on the client with checks on the server:

1st idea

I find this more secure, but maybe it can give some trouble to the performance:

  • get input;
  • send to server;
  • run the function linked to the keybind;
  • Ability runs on the server;
  • send back to the client to run vfx;

2nd idea

Maybe less secure, but it surely is way better in performance:

  • get input (client);
  • run the function linked to the keybind;
  • send to the server for damage, knockback, hitbox and other checks.

So which one would be the best one to follow? Or if both are bad how should i change the logic? Thanks in advance to whoever will help.

It depends on how much stuff you plan to run the sever. I would go for idea 2 if you are thinking long term as Roblox is actively working on anti-cheat systems and will only get better as time goes on. Idea 2 would also cause less delay.

Another idea is a combination of both. The client will send data to the sever when an action is performed, the sever will send animation, VFX, ect to run all clients, then calculate everything from the hitboxes and damages. However, this method would cause more delay.

Alternatively, you could utilize Network ownership to get rid of delay to the closest client.

In the end, it all comes down to the situation of your game whether you want to prioritize delay or anti-cheat.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.