Coder Social home page Coder Social logo

catchstar's Introduction

CatchStar

  • 基于cocos creator官方教程编写的联网对战实例,所有素材均来自于官方资源
  • 客户端脚本由TypeScript编写
  • 服务端由Golang编写
    基于自己的"DrillServerGo"框架(Gateway+GameServer+DataBaseServer)
  • 双人联机对战,采用帧同步方式
    有对网络延迟做了简单优化(预测+修复位置)
  • 运行:
    客户端:
    1.依次导入资源包LoginScence.zip和GameScence.zip到assets下(若提示重复直接覆盖即可)
    2.选择Login场景即可开始调试
    3.服务端地址配置在 NetConfig.ts
    服务端:
    1.需要安装Go,mysql
    2.执行根目录下的buildall.sh编译
    3.根据需要修改bin目录下的三个(gw_config.ini,gs_config.ini,dbs_config.ini)配置文件
    dbs_config.ini的mysql项配置数据库连接,redis暂时用不到
    4.数据库要创建一个drillserver库,并创建一张Players表
    CREATE TABLE players (
    numid int(11) NOT NULL AUTO_INCREMENT,
    account varchar(64) NOT NULL,
    nickname varchar(64) NOT NULL,
    passwd varchar(64) NOT NULL,
    PRIMARY KEY (numid),
    UNIQUE KEY account (account) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    5.插入两条数据方便测试
    INSERT INTO drillserver.players (numid, account, nickname, passwd) VALUES ('100000', 'test01', 'test01', '123456');
    INSERT INTO drillserver.players (numid, account, nickname, passwd) VALUES ('100001', 'test02', 'test02', '123456');
    6.执行rall.sh(linux)或restart.bat(windows)开启服务

catchstar's People

Contributors

ban1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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