TheExodu5 said:V_Arnold, in your hypothetical, you're still assuming the client only sees feedback for their action once the server processes the action and sends back a response. If there is truly no lag, then the feedback would have to occur client side.
My guess: there are two states. There is a client-side state, and a server-side state. The client-side state is going to be y ahead of the server. How I would go about doing this:
Have the client side generate the action with the random seed associated to that action, and send it to the server.
By this point, the client has already resolved the action and the player has gotten feedback.
The server then checks the uploaded action, along with the generated random seed or the full client-side state, and validates it.
If there are any discrepencies, the server disconnects the player.
Of course, the question here for hackers is this: what can be spoofed? If the client needs immediate feedback, then the client is determining the random seed for the attack, which means that could technically be spoofed. Hackers could possibly make their weapons output the max damage on their weapon every time.
Anyways, that's one theory.
I really don't see any way to make it lag-free (client-side) without leaving the game vulnerable to hackers.
edit: the problem I'm seeing here is with the random seed. However, come to think of it, maybe the server could determine a bunch of random seeds ahead of time and send them to the client. Then, the client wouldn't lag out until it ran out of random seeds. The important thing here is to have the random seeds be generated by the server.
Maybe I was not clear enough. The "lag" is simply a concept of stuff happening later than it is "supposed" to happen.
Now, with this, instead of having a constant delay with every action you make, you just delay the delay (haha) until the mobs are actually dead, and the dropping of loot is the only delayed action.
I am not assuming that the client even needs the feedback - in fact, it should not. It should either get a Disconnect or simply get a delayed loot gain once the mob's deaths are clean and confirmed. Every other things happen client-side and server-side simultaneously, with one being behind by the time it takes to send the data, of course. Just as you said, to a certain extent.
Hackers could only enter this scenario when they would be able to manipulate the data on the server side. Or I could see things like hackers trying to have the client be an Optimistic Client for them (always getting the highest or almost highest end on every x-y damage "roll", for example, stuff like that), and if the seeds are generated ahead by the server and sent back constantly to the client, even that should not be possible.