instead of having shields give a % to block id like to use more of a zelda like shield… that would entirely block incoming ranged or melee damage (at least from the direction being faced) using the block ability would cost a large amount of energy so you dont have to worry about people spamming it… and such. but id need it to react pretty quickly. maybe like half a second or so…
would this be difficult for the server to do? lets assume the server is optimal
The server won’t be stressed out by this or anything but I believe network lag will be a huge problem here.
Say if I released a projectile at you and your y ping is at 250 ms. The server does it’s logic and your client shows the projectile speeding at you. 1… 2… 3 wham, but before it hits you you press the block button. But oops too slow, the logic has been done and the server has reduced your hp because you didn’t block fast enough… or that’s what the server thinks, in fact your ping may be so high that even though you blocked when the projecitle was 2 tiles from you the server still didn’t get the packet fast enough.
You could probably make it so that even after the projectile has collided with the player in the server logic, the server waits for half a second to check for any block packets so as to compensate for any lag and then reward the damage. This kinda like what is give in this valve dev post.