Skip to content

An iPad system that can achieve red and blue team control, supports PWA mode, and has international configuration

Notifications You must be signed in to change notification settings

1024dashen/GamePad

Repository files navigation

HADO PAD 项目

编译 proto 文件: pnpm pbjs -t static-module -w commonjs -o src/proto/person.js src/proto/person.proto pnpm pbjs -t static-module -w es6 -o src/proto/person.js src/proto/person.proto

将 js 文件编译为 ts:

pnpm pbts -o src/proto/person.d.ts src/proto/person.js
pnpm run proto

启动运行

安装依赖:

pnpm install

编译 proto 文件:

pnpm run proto

开发环境:

pnpm run dev

状态管理

为了更快捷方便的管理服务器传递过来的数据状态,一定要严格分区管理。

ipad.ts: 存放 ipad 数据状态,例如:
1.主板是哪个,当前 pad 是哪个,是不是主控,当前主控 pad 在哪个页面,

system.ts 中存放玩家和游戏数据:

game: 存放游戏数据状态,例如:
1.游戏模式: 初学者还是常规,1V1、2V2 等模式,蓄能模式,护盾模式,加密口令,设备组
2.当前游戏状态:准备/进行中/结束,当前设备组,一键清场,
3.游戏中的游戏比分,游戏比赛结果:胜利队伍,失败队伍的比分各是多少

users: 存放玩家数据,等候大厅玩家列表,红蓝队队员数据
1.存放玩家列表,和玩家状态,属于哪个队伍等
2.红蓝队伍的队员列表,并且包含玩家状态和加点数据
3.加点页面里面将加点数据存放到对应玩家的数据下面

common:公共无状态消息,pad 不需要保存消息状态, 比如一键清场,更换设备组,添加临时 ID 和 cpu,删除某个用户,启动头显,开始比赛,终止进程, 比赛结果:立即开始和返回

hado 3v3 hado world

测试环境账号

账号:15122222222 密码:15122222222 选择开发自测场地。

自动化部署

用 shell 或者 rust 或者 swift 开发一个命令行工具 (因为 ubuntu16 不支持 node18 以上版本,所以这是另外一种方式)

1.本地编译
2.上传 dist 到 linux
3.发送飞书群通知

IPAD 仓库:frontGamePad, 分支:I18NPAD_V0.0.3, commitid:b5f3a3ae13c7fbdd39c8fe7160783188dfb9babc

About

An iPad system that can achieve red and blue team control, supports PWA mode, and has international configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published