I’m trying to replicate an odd feature of an 2.5D online Fighting Game named Grand Chase – that I believe it’s is made to hide the latency between players. However, I do not know what exactly is this technique/feature, or if masking the lag is it’s real objective.
What matters is: It adds an visual input-lag for the player that does not exist, but it creates interesting out-of-sync situations that enable different player techniques that is unique on this game.
How it works:
This delayed rendering is applied to all actions except for when the character is being hit – the flinch/pain animation starts at the very same frame the game detects the collision.
This delayed feature is only applied to the player’s character. Other players on the match, both object/hurtboxes/hitboxes are in sync with the rendered character model and animations.
So, it only works for the player, not the opponents/allies.
When an input is made, the character object reacts instantly to whatever the desired action of said input, however the 3d mesh of the caracter are delayed for exactly 8 frames.
Example – a simple jab attack that has 3 frames of startup would play like this:
Press the key for the jab on frame 0 – the game already sends the attack player over the network for connected clients.
On frame 3, the character hitbox is now alive and collides with other object. Enemy character is already on the first frame of flinch/pain animation, However, the player charater is still on idle animation. Damage dealt is displayed, and HP is reduced from the target. On frame 4, the particle effects of hit collision starts to be rendered where the hitboxes collided. Character is still on idle animation. On Frame 8, character is no longer on idle animation, and is on the first frame of jab animation. On frame 11, character is then stopped due to hitlag/hitstagger effect – this is when the player visually confirms that his hit has been confirmed.
Another example – Movement and taking damage
Frame 0 – Game confirms the dash input, so the object and hurtbox is already moving forward. The character model is still standing in place, on idle animation. 8 Frames later, then, the character switches from idle animation to the dashing animation and starts to move on screen.
When the character is moving fast and is hit by an attack/projectile going towards the character, the collision visual effect is displayed ahead of the character (it spawns where the hitboxes collided), the character animation instantly switches to the flinch/pain animation, where the character still goes forward for 8 frames, then stand still.
So, in reality, the player character object is updated in real time, only the character model is updated 8 frames later.
Anyone knows if there is any documentation on this?
I’m trying to replicate this for my own game on an self made Java 2D engine. On my engine, the object updates it’s state class responsible for movement/hitboxes/animation handling then, right after all states are updated, it calls the render function.
Ive tried buffering character X and Y coordinates for 8 frames, it kinda worked but i’ve failed when trying to buffer the animation frames, since it is updated on the state class, not on render function. Any tips are welcome!