Inflearn brand logo image

인프런 커뮤니티 질문&답변

Frontal Achivment님의 프로필 이미지
Frontal Achivment

작성한 질문수

[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part5: UE5 & IOCP 서버 연동

이동

Snapshot base vs packet oriented

해결된 질문

작성

·

54

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?

     

답변 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.

Frontal Achivment님의 프로필 이미지
Frontal Achivment

작성한 질문수

질문하기