GithubHelp home page GithubHelp logo

rudolfcn / cocos2dx_lua_skynet_client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danggui1995/cocos2dx_lua_skynet_client

0.0 2.0 0.0 4.7 MB

cocos2dx-lua client for skynet

License: MIT License

Csound Document 0.16% CMake 0.37% C++ 3.21% C 60.46% Makefile 0.15% Java 0.69% Objective-C 0.55% Objective-C++ 1.99% Lua 32.41% PureBasic 0.02%

cocos2dx_lua_skynet_client's Introduction

解决的问题

cocos2dx-lua 使用socket和pbc和skynet完成通信

关于

cocos2dx-lua client for skynet cocos2dx使用luasocket 和 protobuf 连接skynet.
本例子没有修改cocos2dx引擎任何代码,只是添加了用于解析protobuf的pbc和
用于打包解包的lpack.

skynet消息发送时也会使用lua5.3的string.pack()、string.unpack()。cocos2dx
的lua版本为5.1因此引入lpack.为了在lua下使用protobuf引入pbc.

下载编译

git clone https://github.com/gameloses/skynet_pbc.git

在tools中放入和pbc和lpack。可选项。
需要的话可以
git submodule init
git submodule update

把cocos引擎的cocos2d-x目录放到frameworks下

cocos2dx 我没有添加submodule. 创建cocos项目就行了。没有对cocos版本依赖。

编译项目  

 win32和cocos都已经编译测试过了,下面给出的服务端也已经测试过了。

开启skynet服务器 进行通信测试。

skynet服务器地址:https://github.com/gameloses/skynet_pbc.git

教程

详细的教程见wiki。

问题

有问题就提issue.

cocos2dx_lua_skynet_client's People

Contributors

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