Coder Social home page Coder Social logo

zengwe / zspeed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xyfcode/zspeed

0.0 2.0 0.0 690 KB

该项目是手机游戏《开心连三国》服务器源代码,使用nodejs编写。适用于中小型项目。

JavaScript 97.12% Makefile 2.67% Python 0.16% Shell 0.05%

zspeed's Introduction

zspeed(zebra speed)

极速斑马,我所在工作室的名称。就以这个名字,来命名该项目的名字吧。

这个项目是什么?

该项目是手机网络游戏《开心连三国》服务器全套代码,开发语言使用nodejs,数据库使用mongodb。通讯使用socket长连接,架构逻辑简洁清晰,适用于中小团队开发的手机网络游戏。同时在线人数支持5000左右!开源本项目的目的,希望的是大家多多交流,共同进步!

为什么使用nodejs作为游戏服务器的开发语言?

1:node.js自身特点与游戏服务器的特性惊人的吻合。io与可伸缩性的优势。io密集型的应用采用node.js是最合适的, 可达到最好的可伸缩性,语言优势。 2:使用javascript开发可以实现快速迭代,如果客户端使用html,更可实现代码共用。 3:采用异步式I/O于事件驱动的架构设计,并发请求速度更快。 4:单线程拟补了多线程打来的开销和读写困难 5:大部分情况下,用户不用去考虑内存释放,越界操作等c++存在的问题,不会因为一点错误服务器就崩溃。 6:开发速度加快。

项目架构介绍

1:开启两个进程,主进程负责检测子进程。子进程负责游戏逻辑的处理。 2:项目启动入口 game/app.js文件。可以使用start_server.sh文件开始。 3:项目包含几个重要的模块:通讯模块(base/index_multi.js,base/buffer.js)、日志模块(base/log.js)、db模块(base/db.js)、逻辑处理模块(game/game_server.js)。

运行环境

Linux CentOS 6.4 64位,需要安装node和下载mongodb驱动。

zspeed's People

Contributors

xyfcode avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.