해결된 질문
작성
·
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
Client send commands wich contains input + mouse postion + fields that allow you to for example specify operation type like interact, consume etc.
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
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.