Synchronize Skills & Abilities between Server and Client

Started by
9 comments, last by hplus0603 4 years ago

@hplus0603

hplus0603 said:
In practice, you probably have a queue of all objects, and send a snapshot for one or a few objects per outgoing packet, in some kind of round-robin fashion. You don't generally want to structure your networking to be “ONE BIG PACKET” and then tons of tiny packets and then “ONE BIG PACKET” and so forth – burstiness is the enemy of good network performance.

Is there any source material that you can direct/recommend me to learn? So far I used valve's guide though their scenario is different from mine.

At the moment I store predictions (for positions and rotations) in a sort of queue mechanism and when a new packet arrives I check which predictions are no longer relevant.

Following this discussion I had these possible packets in mind, these packets are composed of data surrounding the player.

(definetly sent every tick) ServerStatePacket: AgentState[], AgentState = AgentId, Position, Rotation 
(every X seconds) AreaState: CharacterStates, Loots.
CharacterState: all of the stats, vitals, weapons etc
Loots: all loots data
(If there are any skill results) SkillResults: SkillResult[],
SkillResult = CasterId, SkillId, SkillEffectOptions (For client side calculation), CharactersAffected (I think sending the Ids of the characters affected will reduce the possible desync of the client)

Would these represent the suggestions that you mentioned above?

This topic is closed to new replies.

Advertisement