I found that when running both client and server together at editor sometimes will miss out player input that when try to cast a skill it will fail to cast and rollback immediately. Is that current netcode limitation that server will definitely not behave properly at editor since at editor client and server are not running at separate process?
Hey optimise!
We’re not aware of any input related issues, especially in the editor. Debugging steps:
- Can you post your input handling and input processing code?
- Does this issue persist when you entirely disable the Network Simulation / Emulation tool?
You may need to modify your input code to make it more “resilient” of packet drops. For example: Incrementing a counter every time a button is pressed down will ensure that the button presses are “eventually consistent” (i.e. eventually replicated). However, that can have it’s own problems (lag spikes causing your input to “fire” on the server seconds after its raised on the client).
Sending a public NetworkTick LastPressedTick may be a better option, as it allows you to specify a range of valid timings on the server (but it doesn’t tell you exactly how many times the button was pressed down).
Thus, sending:
public NetworkTick LastPressedTick;
public byte PressCount;
Would be the most resilient.