This thesis describes the design and implementation of a distributed middleware for online games. An online game server need supports large numbers of concurrent users, so it must be a cluster composed by multiple servers. This thesis lists a cluster of such systems face a number of communication difficulties, including how to handle a large number of concurrent connections, how to ensure that high real-time requirements and how to handle a large number of broadcast data distribution. This thesis describes the common solution for online game server cluster and the handling of these difficulties. Many games have adopted similar programs, but they are independent implemented. If we provide a common development platform, we can greatly reduce the cost of game development.This thesis proposes a new distributed middleware SRB, can be used as the basis for the network game server. This thesis describes the implementation of its principles, IDL interface specification and the compiler. The middleware currently supports three kinds of programming languages, and in the communication layer to achieve a good adaptation of the online games on the characteristics of communication, but also for the online game server provides flexible deployment and load balancing solutions. The middleware uses a dual-channel data transmission system, the reliability of data have different requirements, using the data channel is different. Need reliable data transmission sent through the TCP channel, the low reliability of data can be sent through the UDP channel. Greatly enhance the data broadcasting ability of online game servers, reduce communication delays. We can quickly develop online game server based on this middleware.This thesis also describes a game in development ProjectD. ProjectD entirely based on SRB middleware. This thesis describes how to use the distributed object descriptions in the game logic and concepts; introduced middleware threading model how to drive the game world; and how to make full use of existing multi-core CPU to improve the server's load capacity. Through the analysis of stress test data, demonstrates the SRB middleware is suit for large-scale online game. |