강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

nieskalany のプロフィール画像
nieskalany

投稿した質問数

[C++とアンリアルで作るMMORPGゲーム開発シリーズ] Part5:UE5 & IOCPサーバー連動

移動

Snapshot base vs packet oriented

解決済みの質問

作成

·

117

0

Hello Master 🙂

I would like to ask wich method is prefered in wich case. Most mmo code i seen either go packet way like in this course or

  1. Client send commands wich contains input + mouse postion + fields that allow you to for example specify operation type like interact, consume etc.

  2. Server respond each tick with snapshot of zone you are around your aoi with all possible data with delta comporession so you get only new information.

     

     

    Wich approach is prefered, on wich it depends? Does they have some serious perfomance gains when you stick to one of them? Or its just matter of architecture your team prefer?

     

c++unreal-enginewindows-server

回答 1

1

Rookiss님의 프로필 이미지
Rookiss
インストラクター

Your question is a bit confusing,
but if you're asking whether you should synchronize by input or by delta position
it depends on the game genre you're developing. For instance,

[1] Starcraft
If you're making a strategy game like starcraft,
you can't just delta serialize every single position data,
because you can have up to 1000+ units.
It would be smarter to synchronize using clients' input commands (mouse/keyboard inputs)


[2] MMO (with keyboard based movement, like WOW)
In this case you have no choice but to synchronize movement regularly.
Usually you do this by setting a temporary destination every 0.25s,
and you can try sending this destination to the client,
and the client will interpolate the movement smoothly.
This is known as dead reckoning.

[3] MMO (with mouse based movement, like Lineage)
The first attempt is to synchronize by mouse inputs, because it seems pretty cheap.
However you have to be consider whether your game needs player collision.
If it does, then it's probably using a grid based system.
In this case you can't just send mouse input,
the server has to judge which user successfully moved.

nieskalany のプロフィール画像
nieskalany

投稿した質問数

質問する