How would an MMO deal with calculating and sending packets for thousands of players every tick for a live action game?

后端 未结 2 1775
醉梦人生
醉梦人生 2021-01-27 03:17

I am working on a game and I am thinking about getting into networking. I have been programming for about 5 years and got into game development the last 2 years. I only really l

2条回答
  •  再見小時候
    2021-01-27 04:12

    Most MMO's have a healthy amount of client logic so that the server doesn't need to send multitudes of packets to every player all the time. The server doesn't do calculations for all players, the client does the heavy lifting and the server deals with the clients and the state of the virtual world in a database.

    For example, your client and server could have the same world model. That way your player can navigate the world and the client code tell the server on a fairly course interval (say 100's of msecs).

    Generally you want your clients to update themselves to the server, and have the server response deal with keeping the clients in sync.

    MMOs also run multiple servers in their farms, from tens to hundreds. These servers typically talk to a large high-performance database - basically the state of the virtual world is in the database, and the servers sit in between keeping the database up to date and communicating to the client apps.

提交回复
热议问题