Code Monkey home page Code Monkey logo

doudizhu's Introduction

斗地主(白鹭,nodejs)

技术实现

客户端
  1. 引擎:白鹭Egret,EUI
  2. 观察者模式、单例模式
  3. SoundManager, PopUpManager等管理类
  4. websocket(message-base协议,不会产生粘包拆包的问题)
服务端
  1. Nodejs
  2. ws模块
  3. 粘包,拆包

框架说明

客户端
  1. MsgCenter:消息分发中心
  2. Manager:管理类
  3. Base: 封装各模块基本操作及框架基本功能(绑定事件,触发事件),此处代码存在冗余,待优化
  4. EventCode: 定义各类事件的操作码
服务端
  1. logic逻辑层
  2. cache缓存层
  3. model数据层
  4. 数据库(暂不实现)
  5. 运行: npm install -g typings npm install -g ts-node npm install -g typescript npm install typings install dt~node --global --save ts-node gameserver/Program.ts ps: 使用ts-node和vsc来调试TypeScript代码

doudizhu's People

Contributors

rannaryang 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.