Giter Site home page Giter Site logo

lxq2537664558 / cellorigin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davyxu/cellorigin

0.0 2.0 0.0 4.57 MB

基于cellnet的游戏框架

License: MIT License

C# 29.25% PowerBuilder 0.15% Batchfile 1.05% SourcePawn 0.59% Go 68.23% HTML 0.18% Lua 0.55%

cellorigin's Introduction

cellorigin

基于cellnet和Unity3D的游戏框架

第三方依赖

https://github.com/davyxu/cellnet
https://github.com/davyxu/golexer
https://github.com/davyxu/golog
https://github.com/davyxu/goobjfmt
https://github.com/davyxu/gosproto

文件夹功能

client                  // Unity客户端代码
proto                   // 协议
    tool                // 协议工具及shell
server                  // 完整服务器代码
    src
        svc             // 服务共享代码
        svcmod          // 所有服务器
            login       // 登录服务器

开发环境

  • Unity3D 5.5+

  • Golang 1.8+

协议编译

使用sproto作为协议描述及通信格式

sproto协议格式简单, 方便解析, 对lua开发较为友好

  • 编译sproto协议生成器

    执行proto/tool/Install.bat

  • 根据sproto协议(*.sp)文件生成代码

    执行proto/GenerateProto.bat

  • 生成文件位置

    Golang: server/src/proto/msg_sp.go

    C#: client/Assets/Script/Proto/sp.cs

服务器开发指南

开发工具推荐使用Gogland(https://www.jetbrains.com/go/)

设置GOPATH

设置项目GOPATH为server下

运行

找到server/src/svcmod/login/main.go
在main前的绿箭头点击运行

客户端开发指南

找到入口

client/Assets/Scene/Launch.unity

运行后, 点击hello, 将连接服务器127.0.0.1:8001端口发送LoginREQ消息并接收LoginACK消息

备注

感觉不错请star, 谢谢!

博客: http://www.cppblog.com/sunicdavy

知乎: http://www.zhihu.com/people/sunicdavy

cellorigin's People

Contributors

davyxu avatar

Watchers

 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.