| With the rapid development of Internet industry, the online game industry has developed to the peak from its starting. Online game reflects the development statement of network. It has integrated many advanced technologies such as computer graphics, AIT, multimedia, network communication techniques. Recently, online game industry has developed quite rapidly. Meanwhile, the development of mobile Internet technology makes it much more possible for online games to be used in mobile terminal. Therefore, the online games based on mobile terminal became a popular industry in Internet industry.This thesis designed and realized a TPS (Third Person Shooter Game) game server based on iOS platform. My job is as follows:(1) This thesis presented a design scheme in which server is divided into several sub-modules. This thesis realized server modules and divided the whole sever into login sever, gateway sever, scene sever, logical sever and database server. The core of online games is its server. The server’s overall structure plays an important role on game performance. When the game server which this thesis designed runs, the sub servers perform their respective functions and cooperate with each other. This design makes the entire sever less stressful and much faster to process data.(2) This thesis designed and realized the key module in online game communication which is included socket module, online game protocol module, game packet module, stick package and how to cope with the truncate module. The Internet communication would be a bridge that connected game client and game server. The game client transmits data and messages to game server and the game server processed them and feedback to the game client. This thesis created the game protocol as simple as possible. Of course, it should be safe and feasible. This lessens the following workload.(3) This thesis designed and realized the scene server which is the most complex part in game server. The scene server is divided into game scene module, the player data module, the opposite data module and the colliding particles system. There are a lot of messages and data about game scene. The scene processing determines how fluent the game runs, so the scene server becomes the primmest and the complicated part. This realization of the game scenes server have clear modules, clear division of labor and get good results in game play. This game server has already used in the game named "shen xian dao". The game has tested well and will be available for sale. Test results showed that the server running stable, smooth, and has well data processing speed. |