摘要
近年来网页游戏、手机游戏快速发展,对游戏服务端提出新的要求:架构简单、配置灵活,同时可支持快速开发。文中提出一种架构:服务器底层通讯基于高性能的socket库开发,而游戏逻辑采用成熟的PHP框架开发,游戏逻辑不关心底层细节达到快速高效的目的。文中主要分三层介绍:基础层主要采用libevent和ZeroMQ的API;核心服务层提供网络通讯和数据存储服务;应用层处理游戏内的逻辑。此外,以该架构的游戏服务器已在两款网页游戏开服上百组,性能测试稳定。
Web games, mobile games fast development today, the game server need simplearchitectures, flexible configuationandsupport high-efficiencydevelopment.This paper presents the design of Socket server-based game, usehigh-efficiency PHP framework to develop the game logic , and game logicdon't need to care about the server communication details. This paper mainly describes the system in three parts from the base layer and core layer and application layer. Among them, the base layer is mainly done to pave the way for the subsequent development of pre-module, which consists of data, protocol modules;the core layer provide data communication and data storage;application layer is the base layer on the base, by calling each module server package and handling agreements. In order to improve server performance and speed, at the application layer adds libevent and ZeroMQ two open source model. In this paper, the proposed technology for the server based on the development of a good stability and speed.
出处
《电子设计工程》
2016年第20期125-128,共4页
Electronic Design Engineering