[DevLog #011] What I Considered So Combat Wouldn’t Lag Behind Your Inputs

Game

In online co-op action games, have you ever pressed the attack button only for the sword to swing a moment late, or input a dodge only to find you were already hit before it came out? It’s that feeling of your inputs and the screen drifting apart because of network lag.

Dungeon Wanderers is a 4-player online co-op game, so this was a part I didn’t want to compromise on. This time I’ll write about the design approach behind it.

A “server decides everything” build broke the feel

I once spent time referencing a different combat system. It was a build where the server held every decision — including whether an attack landed, everything was decided by the server. At a glance it looks robust against cheating and bugs, and seems correct.

But once it was actually running, the feel collapsed the moment lag was involved. From pressing the button to the response coming back, you wait for the round trip of the connection. Correct, but not satisfying. With that, the back-and-forth this game values couldn’t hold together.

Fire the input on your own machine first

So I reversed the approach.

Combat inputs — attack, dodge, parry, guard — fire instantly on the player’s own machine first. They don’t wait for the server’s reply. The moment you press the button, the sword swings. I made that the premise.

On top of that, the server guards only the parts that can’t be taken back: the final changes to HP, dropped items, rare rolls, run progress. The server takes responsibility for these asset-related confirmations. Feel lives on your own machine; fairness of outcomes lives on the server. That’s the division of roles.

A trade-off that co-op (PvE) makes possible

This is a trade-off that’s hard to make in competitive play (PvP). When players compete against each other, even the slightest unfairness can’t be allowed, so the server has no choice but to manage things strictly.

Dungeon Wanderers is a player-versus-environment (PvE) co-op game. It’s about facing enemies together with your teammates, so even if it’s a little loose, it’s fine to prioritize inputs responding instantly. You can put “everyone fighting comfortably together” above the rest. I see this as a judgment that co-op makes possible.

Of course, I’ve put in correction so that even with extreme lag, unfairness is kept as small as possible. But on top of that, what I always prioritize is not delaying the player’s input.

The goal is combat where you don’t notice lag

The ideal is a state where you can focus without being conscious that you’re online. Press the button and it responds instantly. You read each other, step in, take the parry. That whole sequence connects without you minding the connection.

I want to build that good feeling through responsiveness, not through flashy effects. This is the part I’m least willing to give up in this game.

Over these three posts, I’ve written about the feel of movement, traversal, and combat. From here, I plan to write about the loop of an adventure — defeating enemies and picking up loot — and about creating your own character.

Copied title and URL