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

MMORPG Server

15bd1106c5a327d6564f793a1951f269?s=47 Buzzvil
December 01, 2021

MMORPG Server

By Alan

15bd1106c5a327d6564f793a1951f269?s=128

Buzzvil

December 01, 2021
Tweet

More Decks by Buzzvil

Other Decks in Programming

Transcript

  1. MMORPG Server Massively Multi-player Online Role-Playing Games

  2. Game Server 의 종류 - Simple servier Account / Rank

    / Store / Reward
  3. Game Server 의 종류 - Simple servier exports.createAccount = function(req,

    res) { User.createAccount(req.body.deviceId, req.body.id, req.body.pw, function(err, session) { return common.sendJson(res, {'sessionKey': session.key}); }); }; exports.login = function(req, res) ...생략… exports.submitScore = function(req, res) ...생략… exports.getRankings = function(req, res) ...생략… exports.getProducts = function(req, res) ...생략…
  4. Game Server 의 종류 - Realtime network (P2P/Central)

  5. Game Server 의 종류 - Realtime network (P2P/Central) Command Packet의

    예시 출처
  6. Game Server 의 종류 - Realtime network (P2P/Central) Command를 Frame

    번호와 함께 서버로 전송 출처 Server
  7. Game Server 의 종류 - Realtime network (P2P/Central) 출처: Authority

    Distribution in a Proxy-Based Massively Multiplayer Game Architecture Justin F. Christofoli
  8. Game Server 의 종류 - Realtime network (P2P/Central)

  9. Game Server 의 종류 - Realtime network (P2P/Central) 출처 Host

    * Lobby server 는 central server
  10. Game Server 의 종류 - Realtime network (P2P/Central) // TCP

    소켓 사용 / Packet 단위 처리 // GameSession.java // 10 ticks / second public void read(Buffer rbuff) { Packet inpkt; while ((inpkt = receivePacket(rbuff)) != null) { processProtocols(inpkt); } } public void processProtocols(Packet packet) throws Throwable { int opCode=packet.buffer().getShort(); switch (opCode) { case OP_COMMAND: processCommand(packet); Break; … 생략 … } } private void processCommand(Packet packet) { gameFrame=match.getFrame(); if (packet.hasRemaining()) { match.putCommand(this, packet); } }
  11. Game Server 의 종류 - MMORPG

  12. Game Server 의 종류 - MMORPG 출처

  13. Game Server 의 종류 - MMORPG 월드맵 <Segment matrix> ..

    Linked list
  14. Game Server 의 종류 - MMORPG 월드맵 // Creature.m -

    attack:(int)weapon victim:(Creature*)victim damage:(int)damage { void effect(Creature* obj) { [obj notifyFight:weapon attacker: self victim: victim at: [victim point] sound: sound damage: damage]; } [[victim world] doCreatures: (Function) effect visible: [victim view]]; } // World.m + initialize { // local world pool } - doUsers: (Function) function ...
  15. Game Server 의 종류 - MMORPG (Optimize) 출처 참고: 1,

    2