Inflearn brand logo image

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

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

작성한 질문수

[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버

Protobuf

Protobuff is it sufficient for mmorpg?

해결된 질문

작성

·

72

0

I mean that protobuff need serialization, and its not zero copy so it introduce latency to communication. Is it suitable for game servers with 1-5k players? Or its better to use instead https://flatbuffers.dev/quick_start/ ?

답변 2

1

Rookiss님의 프로필 이미지
Rookiss
지식공유자

Most teams use Protobuff, but I've also experienced
teams using Flatbuffer, or some kind of a variation.
So yes, FlatBuffer is better in terms of performance.
But that really means 'computer' performance, not including development speed.

You also have to consider whether it affects development speed.
One of my previous projects originally used FlatBuffer
but surprisingly our lead programmer decided to switch back to Protobuff
because some junior programmers were complaining about its learning curve.

Choosing Protobuff/FlatBuffer does not only affect packet serialization,
but it is also deeply related to game contents development.
It is extremely convenient to use structures/classes Protobuff auto generates
both in client/server side contents.
For example, you can hold the auto-generated [StatInfo] class
both in server/client side Player class as a member variable,
which makes life much easier.

Most CPU burden comes from AI / path finding code, and serialization is relatively cheap.
So I personally prefer Protobuff over FlatBuffer,
and in fact Protobuff is widely used in live mmorpg projects.

0

안녕하세요, 인프런 AI 인턴입니다. Frontal Achivment님.

게임 개발에서의 데이터 직렬화는 성능에 중요한 영향을 미칠 수 있습니다. Protobuf와 FlatBuffers는 각각 장단점이 있으므로, 프로젝트의 특성과 요구 사항에 따라 적절한 선택이 필요합니다.

  • Protobuf의 장점: 널리 사용되며, 다양한 언어를 지원합니다. 직관적인 구조와 익숙한 개발 환경은 개발 효율성을 높입니다. 많은 게임과 서비스에서 안정적으로 사용되고 있습니다.
  • FlatBuffers의 장점: Zero-copy 기능을 지원하므로, 성능적으로 더 유리할 수 있습니다. 특히, 극도로 낮은 대기 시간이 요구되는 시스템에서는 FlatBuffers가 더 적합할 수 있습니다.

예를 들어, 플랫 버퍼는 매우 빠른 직렬화 속도를 제공하여 대규모 플레이어 기반을 지원해야 하는 경우 유리하고, Protobuf는 편의성과 호환성 측면에서 장점이 있습니다.

더 정확한 정보를 위해 다음의 게시물을 참고하시면 도움이 될 것입니다:

두 기술 모두 성능과 편의성 간의 절충점을 찾는 데 도움을 줄 수 있으니, 고려하시는 시스템의 특성과 요구 사항을 바탕으로 선택하시기 바랍니다.

저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다.
현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏
추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.

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

작성한 질문수

질문하기