I’ve been wanting to make an efficient combat system, and currently I’m wondering what should be coded in the server and what should be coded in the client
Some people have told me: “Server is only for logic, client should handle everything else” Is that so?
I’ve also seen that most good developer seem to use ALOT of module scripts
In any case if I had to sort many aspects of develping into 2 lists:
I can give you a rough outline. What you are doing with the modules is purely visual and for yourself at that point. It can be simplified via functional programming. The modules may look impressive, but they aren’t. You can use that many modules, but there is really no point. Although more math-y stuff, like hitbox logic, raycasting, or things which are for repeated usage, would be a good idea to put into modules.
It’s really not that deep. People overcomplicate for nothing. A simple, usable approach is: client-handler (local script, with your modules, your game logic, etc.) and a server-handler. (server stuff, applying damage, damage verification, etc.)
Effects: client
General user experience logic (inputs, animations, stamina, etc.): client
Applying stun/knockback: client (i.e client stuns himself; results in smoother experience) If people argue this should be done on the server, I disagree. All these things will result in a client replicating his physics, so they can be turned off nonetheless.