Skip to content

xtrachen/crazytank_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

CrazyTank Server

Colyseus 游戏服务端,与 crazytank 客户端联机使用。

安装与运行

cd crazytank_server
npm install
npm run build
npm start

开发时可直接:

npm run dev

默认监听 ws://localhost:2567,房间名 game

客户端配置

在 Cocos 项目 TerrainDemo 上勾选「使用 Colyseus 联机」,并设置:

  • Server Url: ws://localhost:2567
  • Room Name: game

协议

  • 客户端发送 room.send('input', { move, fire, cannonAngle })
  • 服务端通过 Colyseus state 同步:terrainSeedtanksshellsterrainDestructions

详见客户端项目中的 docs/项目导出说明-供AI生成服务端.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors