Upgrade to Pro — share decks privately, control downloads, hide ads and more …

リアルタイムゲームサーバー開発技術スタックまとめ

pobo380
January 28, 2020

 リアルタイムゲームサーバー開発技術スタックまとめ

pobo380

January 28, 2020
Tweet

Other Decks in Technology

Transcript

  1. ϦΞϧλΠϜήʔϜαʔόʔ։ൃ
    ٕज़ελοΫ·ͱΊ
    DELT#8

    PRESENTER : NODA KOHEI

    View full-size slide

  2. ͸͡Ίʹ
    ఆٛ
    ▸ ϦΞϧλΠϜήʔϜαʔόʔͱ͸
    ▸ ⭕ Latency͕ϓϨΠϠʔମݧʹେ͖ؔ͘ΘΔήʔϜ
    ▸ FPS, TPS (Call of Duty, Fortnite)
    ▸ MOBA (League of Legends, Ԧऀӫ༾)
    ▸ ❌ Hearthstone, Shadowverse ͷΑ͏ͳίϚϯυܕͷήʔϜ

    View full-size slide

  3. ͸͡Ίʹ
    എܠ
    ▸ ϦΞϧλΠϜήʔϜαʔόʔ։ൃͷͨΊͷαʔϏεɺOSSɺϥ
    Πηϯειϑτ΢ΣΞ͕ॆ࣮͖ͯͨ͠
    ▸ Photon Engine, Monobit Engine (MRS, MUN)
    ▸ AWS GameLift
    ▸ Agones, Open Match
    ▸ Etc

    View full-size slide

  4. Կ͕ҧ͏ͷʁ
    ͲΕΛ࢖͑͹͍͍ʁ

    View full-size slide

  5. ͸͡Ίʹ
    ൃදͷ໨త
    ▸ ͜ΕΒͷιϑτ΢ΣΞɾαʔϏε͸ͦΕͧΕʹΧόʔ͢Δൣғ
    ͕ҟͳΔɻ
    ▸ ϦΞϧλΠϜήʔϜαʔόʔ։ൃʹඞཁͳٕज़ελοΫΛఆٛ
    ͯ͠ɺιϑτ΢ΣΞɾαʔϏε͕Χόʔ͢ΔൣғΛࣔ͢ɻ
    ▸ ૊Έ߹Θͤ΋঺հɻ

    View full-size slide

  6. ϦΞϧλΠϜήʔϜαʔόʔ։ൃ
    ٕज़ελοΫ

    View full-size slide

  7. Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT
    MATCHMAKING
    DEDICATED GAME SERVER

    (DGS) DGS MANAGEMENT
    TECHNOLOGY STACKS

    View full-size slide

  8. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  9. GAME LOGIC
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    NETWORKING
    SCHEDULER
    SERIALIZATION
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  10. DEDICATED GAME SERVER
    DEDICATED GAME SERVER
    ▸ ήʔϜλΠτϧ͝ͱʹݻ༗ͷϩδοΫΛ࣋ͭαʔόʔΞϓϦέʔ
    γϣϯ
    ▸ ήʔϜΫϥΠΞϯτͱωοτϫʔΫܦ༝Ͱ௨৴
    ▸ 4ͭͷίϯϙʔωϯτ
    GAME LOGIC
    NETWORKING
    SCHEDULER
    SERIALIZATION

    View full-size slide

  11. DEDICATED GAME SERVER
    NETWORKING
    ▸ ήʔϜΫϥΠΞϯτͱ௨৴͢ΔͨΊͷϓϩτίϧͱͦͷ࣮૷
    ▸ ࠶ૹ੍ޚɺϑϩʔ੍ޚɺίωΫγϣϯ؅ཧ
    ▸ ύέοτͷ෼ׂɺ݁߹
    ▸ ҉߸Խɺॺ໊
    GAME LOGIC
    NETWORKING
    SCHEDULER
    SERIALIZATION

    View full-size slide

  12. DEDICATED GAME SERVER
    SERIALIZATION / DESERIALIZATION
    ▸ ΦϒδΣΫτ ⁶ όΠτྻͷ૬ޓม׵Λߦ͏
    ▸ ωοτϫʔΫܦ༝Ͱૹ৴Մೳʹ͢Δ
    GAME LOGIC
    NETWORKING
    SCHEDULER
    SERIALIZATION

    View full-size slide

  13. DEDICATED GAME SERVER
    SCHEDULER
    ▸ ఆظతʹήʔϜϩδοΫΛݺͼग़͢ॲཧ
    ▸ ήʔϜΫϥΠΞϯτͰ͍͏ʮήʔϜϧʔϓʯ
    ▸ 1ϓϩηεͰෳ਺ͷήʔϜΛϗετ͢Δ৔߹ʹಛʹॏཁ
    GAME LOGIC
    NETWORKING
    SCHEDULER
    SERIALIZATION

    View full-size slide

  14. DEDICATED GAME SERVER
    GAME LOGIC
    ▸ λΠτϧݻ༗ͷήʔϜγϛϡϨʔγϣϯ
    ▸ ෺ཧɺAIɺNavMeshɺͳͲΛؚΉ
    ▸ ωοτϫʔΫܦ༝ͰήʔϜΫϥΠΞϯτͱঢ়ଶͷಉظΛߦ͏
    GAME LOGIC
    NETWORKING
    SCHEDULER
    SERIALIZATION

    View full-size slide

  15. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  16. GAME LOGIC
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    NETWORKING
    SCHEDULER
    SERIALIZATION
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  17. MATCHMAKING
    MATCHMAKING
    ▸ ϧʔϧʹج͍ͮͯϓϨΠϠʔΛूΊɺϚονΛ࡞੒͢Δ
    ▸ ϓϨΠϠʔͷ͞·͟·ͳଐੑΛར༻͢Δ
    ▸ ϨʔςΟϯά
    ▸ ϩʔϧ
    ▸ ࡞੒ͨ͠ϚονΛ DGS ʹׂΓ౰ͯΔ
    ▸ 4ͭͷίϯϙʔωϯτ
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  18. MATCHMAKING
    MATCHMAKING CORE
    ▸ ϚονϝΠΩϯάͷϦΫΤετΛϓʔϦϯά
    ▸ ఆظతʹϚονϝΠΩϯάϩδοΫΛݺͼग़͢
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  19. MATCHMAKING
    MATCHMAKING LOGIC
    ▸ ϓʔϧ͞ΕͨϚονϝΠΩϯάͷϦΫΤετΛධՁ
    ▸ ෳ਺ͷϓϨΠϠʔΛҰͭʹ·ͱΊͯϚονΛ࡞੒͢Δ
    ▸ ྫ) Ϩʔτ͕͍ۙϓϨΠϠʔΛϚονͤ͞Δ
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  20. MATCHMAKING
    DGS ASSIGNMENT
    ▸ ࡞੒͞ΕͨϚονʹରͯ͠ DGS ΛΞαΠϯ͢Δ
    ▸ ϓϨΠϠʔͷϨΠςϯγʔ෼෍ͷ࠷దԽ
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  21. MATCHMAKING
    SERVICE FRONTEND
    ▸ MatchmakingΛAPIͱͯ͠ఏڙ͢Δ
    ▸ APIྫ
    ▸ ϚονϝΠΩϯάͷϦΫΤετ
    ▸ Ϛον࡞੒ΛήʔϜΫϥΠΞϯτʹ௨஌
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  22. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  23. GAME LOGIC
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    TECHNOLOGY STACKS
    NETWORKING
    SCHEDULER
    SERIALIZATION
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  24. DGS MANAGEMENT
    DGS MANAGEMENT
    ▸ DGSͷαʔόʔ܈Λ؅ཧ͢Δ໾ׂ
    ▸ 6ͭͷίϯϙʔωϯτ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  25. DGS MANAGEMENT
    PROVISIONING
    ▸ ϚγϯϦιʔεΛௐୡ͢Δ
    ▸ VM
    ▸ Container
    ▸ Bare-metal
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  26. DGS MANAGEMENT
    DEPLOYMENT
    ▸ ϚγϯϦιʔεʹରͯ͠DGS ͷ࣮ߦϑΝΠϧ܈Λ഑ஔ͢Δ
    ▸ όʔδϣϯΞοϓ
    ▸ ෳ਺όʔδϣϯͷಉ࣌Քಇͷαϙʔτ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  27. DGS MANAGEMENT
    MONITORING
    ▸ DGSͷεςʔτΛ؂ࢹ͢Δ
    ▸ ϔϧενΣοΫ
    ▸ ϥΠϑαΠΫϧ؅ཧ
    ▸ Auto ScalingɺLoad BalancingͷͨΊʹඞཁ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  28. DGS MANAGEMENT
    ALLOCATION
    ▸ ෳ਺ͷ DGS ͔ΒϚονΛ࣮ߦ͢Δ DGS Λܾఆ͢Δ
    ▸ ཁ͸ۭ͍ͯΔ DGS Λ୳ͯ͘͠Δ΍ͭ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  29. DGS MANAGEMENT
    AUTO SCALING
    ▸ ઀ଓ਺΍ෛՙঢ়گͳͲʹԠͯ͡ϚγϯϦιʔεΛ૿ݮ͢Δ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  30. DGS MANAGEMENT
    SERVICE FRONTEND
    ▸ DGS Ϋϥελ΁ͷૢ࡞ΛAPIͱͯ͠ఏڙ͢Δ
    ▸ APIྫ
    ▸ ৽͍͠ϚονͷΞϩέʔγϣϯ
    ▸ ৽͍͠όʔδϣϯͷσϓϩΠ
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    MONITORING

    View full-size slide

  31. طଘͷιϑτ΢ΣΞɾαʔϏε͕
    Χόʔ͢Δٕज़ελοΫ

    View full-size slide

  32. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    PHOTON ENGINE
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  33. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    MONOBIT ENGINE
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  34. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    AWS GAMELIFT
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  35. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    AGONES
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  36. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    OPENMATCH
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  37. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    UNITY
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  38. GAME LOGIC
    NETWORKING
    MATCHMAKING
    LOGIC
    SERVICE FRONTEND
    PROVISIONING
    DEPLOYMENT
    AUTO SCALING ALLOCATION
    SERVICE FRONTEND
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONITORING
    UNITY-DOTS
    SCHEDULER
    SERIALIZATION
    MATCHMAKING

    CORE
    DGS

    ASSIGNMENT

    View full-size slide

  39. αϯϓϧΞʔΩςΫνϟ

    View full-size slide

  40. ORIGINAL
    (GAME LOGIC)
    PHOTON
    (NETWORKING)
    OPENMATCH
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    PHOTON + OPENMATCH
    PHOTON
    (SCHEDULER)
    PHOTON
    (SERIALIZATION)
    PROVISIONING
    PHOTON

    (DEPLOYMENT)
    AUTO SCALING PHOTON

    (ALLOCATION)
    PHOTON

    (SERVICE FRONTEND)
    PHOTON

    (MONITORING)

    View full-size slide

  41. ORIGINAL
    (GAME LOGIC)
    MUN
    (NETWORKING)
    OPENMATCH
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    MONOBIT + OPENMATCH
    MUN
    (SCHEDULER)
    MUN
    (SERIALIZATION)
    PROVISIONING
    MUN

    (DEPLOYMENT)
    AUTO SCALING MUN

    (ALLOCATION)
    MUN

    (SERVICE FRONTEND)
    MUN

    (MONITORING)

    View full-size slide

  42. UNITY
    (GAME LOGIC)
    LITENETLIB
    (NETWORKING)
    OPENMATCH
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    UNITY + LITENETLIB + MESSAGEPACK + OPENMATCH + AGONES
    UNITY
    (SCHEDULER)
    AGONES
    MESSAGEPACK
    (SERIALIZATION)

    View full-size slide

  43. ORIGINAL
    (GAME LOGIC)
    LITENETLIB
    (NETWORKING)
    GAMELIFT
    Dedicated Game Server

    (DGS)
    Matchmaking
 DGS Management

    LITENETLIB + MESSAGEPACK + GAMELIFT
    ORIGINAL
    (SCHEDULER)
    MESSAGEPACK
    (SERIALIZATION)

    View full-size slide

  44. APPENDIX
    ࢀߟࢿྉ
    ▸ Proposal: RefCount allocation to host many room in same pod
    ▸ https://github.com/googleforgames/agones/issues/1197
    ▸ Amazon GameLift Developer Guide
    ▸ https://docs.aws.amazon.com/ja_jp/gamelift/latest/developerguide/gamelift-
    intro.html
    ▸ Photon : LoadBalancing Application
    ▸ https://doc.photonengine.com/ja-jp/server/current/applications/loadbalancing/
    application
    ▸ Monobit Engine : MUN 2.0 ͷγεςϜߏ੒ʹ͍ͭͯ
    ▸ http://www.monobitengine.com/doc/mun/contents/Server/Construction.htm

    View full-size slide

  45. APPENDIX
    ࢀߟࢿྉ
    ▸ Open Match ௒ೖ໳
    ▸ https://medium.com/google-cloud-jp/open-match-super101-aaf3e54bd4e7
    ▸ Open Match Deep Dive
    ▸ https://www.slideshare.net/HammoudiSamir/open-match-deep-dive
    ▸ Photon Server Deep Dive
    ▸ https://www.slideshare.net/neuecc/photon-server-deep-dive-
    photonwirephotonserver
    ▸ Unity Real-Time Multiplayer repository
    ▸ https://github.com/Unity-Technologies/multiplayer

    View full-size slide