Coder Social home page Coder Social logo

dreammyboy / poker-game-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zifeiy/poker-game-demo

0.0 0.0 0.0 12.02 MB

A chess game implements China chess game -- hongshi.It's client is writen by cocos creator,it's server is writen by node.js,and the server is a very simple server.use MySQL to store information.

JavaScript 100.00%

poker-game-demo's Introduction

项目地址:https://github.com/zifeiy/poker-game-demo

文件组成

  • client:客户端,使用Cocos Creator打开即可
  • sever:服务器端。使用node.js编写,是一个极简的服务器,只是做了一下简单的封装,仅供学习使用。
  • client_console:客户端测试程序,可以模拟登陆,进房间。

服务器server配置

用的是mysql,所以得先运行在mysql中创建一个名为hongshi的database,然后导入hongshi.sql。
然后npm安装一下需要的包,主要是ws,express,别的你运行node server.js提示缺什么就npm install什么。
我没有写配置文件,所以你有时间可以写一下配置文件,然后直接npm install就可以了。
node server.js运行服务器程序。
进入IpGet目录,然后node socket_io_ip_server.js(这一步不是必需的),它主要用来获取客户端的ip地址,因为ws库没有找到获取ip地址的方法。
理论上我可以获得你的IP地址甚至MAC地址。
其他见server/目录下的README.md

客户端client配置

见client/目录下的README.md

客户端命令行client_console配置

见client_console/目录下的README.md

写这个有很多bug的项目花费了我整整12天的时间,希望这套资源能够给大家带来帮助。
有很多bug,仅供学习使用。
可以完整的玩游戏。

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.