- games.json 新增两条进程型配置:wordduel(../en,/wordduel/)与 numberplace(/numberplace/),启动器自动多出两张卡片 - build-games.sh 改为「二进制名:目录名」映射循环,wordduel 住在 ../en - 重写规则全部走代理层,未改游戏源码: - numberplace 的 api(`/api/…`) 反引号/单引号两种写法补 rewrites - wordduel 邀请链接 location.origin + '/#' + c 补前缀 - WS 地址与 index.html 的 href/src 走内置规则 - README 同步路由表、重写规则表、kill -9 兜底命令; 并更正 games.json 需重启中心才生效(config 启动时一次性加载)
98 lines
2.7 KiB
JSON
98 lines
2.7 KiB
JSON
{
|
|
"port": 1818,
|
|
"idle_secs": 600,
|
|
"games": [
|
|
{
|
|
"id": "cnchess",
|
|
"name": "中国象棋",
|
|
"tagline": "两台设备联机对弈,服务端权威判棋",
|
|
"icon": "象",
|
|
"accent": "#e2523f",
|
|
"stack": "Rust · axum",
|
|
"meta": ["2 人 · 观战", "WebSocket", "内置语音"],
|
|
"kind": "process",
|
|
"cwd": "../cnchess",
|
|
"bin": "target/release/cnchess"
|
|
},
|
|
{
|
|
"id": "cngo",
|
|
"name": "围棋",
|
|
"tagline": "落子圈地,联机对局、观战与棋谱",
|
|
"icon": "围",
|
|
"accent": "#4aa8ff",
|
|
"stack": "Rust · axum",
|
|
"meta": ["2 人 · 观战", "WebSocket", "贴目规则"],
|
|
"kind": "process",
|
|
"cwd": "../cngo",
|
|
"bin": "target/release/cngo"
|
|
},
|
|
{
|
|
"id": "cs",
|
|
"name": "枪火对决",
|
|
"tagline": "第一人称 1v1 对枪,60Hz 物理模拟",
|
|
"icon": "枪",
|
|
"accent": "#f5a623",
|
|
"stack": "Rust · WebGL",
|
|
"meta": ["1v1 对战", "WebSocket", "30Hz 快照"],
|
|
"kind": "process",
|
|
"cwd": "../cs",
|
|
"bin": "target/release/cs"
|
|
},
|
|
{
|
|
"id": "alonelyroad",
|
|
"name": "沙漠狂飙",
|
|
"tagline": "单机越野冲刺,纯 Canvas 手写渲染",
|
|
"icon": "飙",
|
|
"accent": "#ffb84d",
|
|
"stack": "单页 · Canvas",
|
|
"meta": ["单人", "键盘 / 触屏", "零依赖"],
|
|
"kind": "static",
|
|
"dir": "../AlonelyRoad",
|
|
"entry": "AlonelyRoad.html"
|
|
},
|
|
{
|
|
"id": "myword",
|
|
"name": "我的世界",
|
|
"tagline": "体素沙盒:挖矿、合成、生存,夜里僵尸会来",
|
|
"icon": "世",
|
|
"accent": "#55c98a",
|
|
"stack": "单页 · Three.js",
|
|
"meta": ["单人", "合成 / 生存", "CDN 依赖"],
|
|
"kind": "static",
|
|
"dir": "../MyWord",
|
|
"entry": "index.html"
|
|
},
|
|
{
|
|
"id": "wordduel",
|
|
"name": "单词对战",
|
|
"tagline": "双人抢答背单词:拼写 / 释义 / 混合三模式",
|
|
"icon": "词",
|
|
"accent": "#8b5cf6",
|
|
"stack": "Rust · axum",
|
|
"meta": ["2 人 · 观战", "WebSocket", "4418 词库"],
|
|
"kind": "process",
|
|
"cwd": "../en",
|
|
"bin": "target/release/wordduel",
|
|
"rewrites": [
|
|
["location.origin + '/#' + c", "location.origin + '{prefix}#' + c"]
|
|
]
|
|
},
|
|
{
|
|
"id": "numberplace",
|
|
"name": "数独",
|
|
"tagline": "四档难度,服务端出题、唯一解保证",
|
|
"icon": "数",
|
|
"accent": "#14b8a6",
|
|
"stack": "Rust · axum",
|
|
"meta": ["单人", "HTTP/JSON", "提示 / 撤销"],
|
|
"kind": "process",
|
|
"cwd": "../numberplace",
|
|
"bin": "target/release/numberplace",
|
|
"rewrites": [
|
|
["api(`/api/", "api(`{prefix}api/"],
|
|
["api('/api/", "api('{prefix}api/"]
|
|
]
|
|
}
|
|
]
|
|
}
|