{"id":32544134,"url":"https://github.com/fishpioffical/tiaoom","last_synced_at":"2026-07-02T01:31:21.258Z","repository":{"id":318856926,"uuid":"670057467","full_name":"FishPiOffical/tiaoom","owner":"FishPiOffical","description":"🎮 轻量级游戏房间引擎","archived":false,"fork":false,"pushed_at":"2026-05-11T06:24:56.000Z","size":2313,"stargazers_count":18,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-11T08:30:10.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tiaoom.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FishPiOffical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-24T07:47:17.000Z","updated_at":"2026-05-11T06:25:00.000Z","dependencies_parsed_at":"2025-10-16T20:34:06.784Z","dependency_job_id":"e6a2b138-8bfa-4981-abeb-d34c4944ac0f","html_url":"https://github.com/FishPiOffical/tiaoom","commit_stats":null,"previous_names":["fishpioffical/tiaoom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FishPiOffical/tiaoom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FishPiOffical%2Ftiaoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FishPiOffical%2Ftiaoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FishPiOffical%2Ftiaoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FishPiOffical%2Ftiaoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FishPiOffical","download_url":"https://codeload.github.com/FishPiOffical/tiaoom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FishPiOffical%2Ftiaoom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35029796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-28T17:23:48.001Z","updated_at":"2026-07-02T01:31:21.212Z","avatar_url":"https://github.com/FishPiOffical.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://github.com/FishPiOffical/tiaoom/blob/master/logo.png?raw=true\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eTiaoom - a Tiaoable project\u003c/h1\u003e\n\u003cp align=\"center\"\u003e轻量级游戏房间引擎\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca target=\"_blank\" href=\"https://tiaoom.com\"\u003e📃在线文档\u003c/a\u003e\u003c/p\u003e\n\n\n## ✨功能\n- 玩家注册与登录；\n- 多人在线房间管理；\n- 房间内玩家实时互动；\n- 可扩展的游戏逻辑接口；\n\n## 🚀 快速开始\n\n- 安装包 `tiaoom`：\n\n```bash\nnpm install tiaoom\n```\n\n后端从 `tiaoom` 引入 `Tiaoom`，并继承实现通信方法：\n\n```typescript\nimport { Tiaoom } from 'tiaoom';\n\nclass YourGameServer extends Tiaoom {\n  // 实现通信方法\n}\n```\n\u003e 具体见 `game/backend/src/controller.ts`\n\n前端则从 `tiaoom/client` 引入 `Tiaoom`，并继承实现通信方法：\n\n```typescript\nimport { Tiaoom } from 'tiaoom/client';\nclass YourGameClient extends Tiaoom {\n  // 实现通信方法\n}\n``` \n\u003e 具体见 `game/frontend/src/core/game.ts`\n\n## 🎮 实现游戏示例\n\n本仓库内置一个基于 Websocket 为通信协议的游戏服务，实现新的游戏只需编写两个文件：\n\n- game/backend/src/games/yourgame.js - 游戏逻辑入口与配置信息；\n- game/frontend/src/components/yourgame/YourGameRoom.vue - 游戏前端组件；\n\n完成后重启服务即可在前端选择运行游戏。\n~~iwpz:跳佬已经被我绑架了，需要VM50才可以继续更新~~\n\n目前已内置：\n\n- 五子棋\n- 四子棋\n- 黑白棋\n- 谁是卧底\n- 抢数字\n- 斗兽棋\n- UNO (by [@csfwff](https://github.com/csfwff))\n- 斗地主 (by [@zhazhahehedian](https://github.com/zhazhahehedian))\n- 翻转象棋 (by [@zhazhahehedian](https://github.com/zhazhahehedian))\n- 象棋 (by [@iwpz](https://github.com/iwpz))\n- 药丸博弈 (by [@iwpz](https://github.com/iwpz))\n- 俄罗斯方块 (by [@Cooooing](https://github.com/cooooing))\n  \n## ⚙️ 调试/运行\n\n1. cd 到 `game`, 执行 `npm install`;\n2. 使用 Visual Studio Code 运行调试（直接按下`F5`即可），或执行 `npm run dev:backend` 启动后端开发服务器。\n3. 执行 `npm run dev:frontend` 启动前端开发服务器，访问 `http://localhost:5173` 即可开始开发。\n4. 或执行 `npm run dev` 同时启动后端和前端，访问 `http://localhost:5173` 也可开始开发。\n\n\u003e 更多开发细节见 [摸鱼派竞技大厅开发指南](https://tiaoom.com/game/)\n\n## 📁 目录与文件\n- .vscode - VSCode 调试配置\n- lib - 核心类库\n  - events - 各个数据事件定义\n  - models - 数据模型实现\n    - message.ts - 消息基础模型\n    - player.ts - 玩家基础模型\n    - room.ts - 房间基础模型\n  - client - 前端类库入口\n  - index.ts - 后端类库入口\n- game - 游戏示例\n  - backend - 后端实现\n    - src\n      - controller.ts - 后端控制器实现\n      - index.ts - 后端入口\n      - games - 游戏逻辑实现\n  - frontend - 前端实现\n    - public - 静态资源\n    - src\n      - assets - 资源文件\n      - components - 游戏组件文件\n      - core - 前端核心类库实现\n      - views - 视图文件\n      - App.vue - 根组件\n      - main.ts - 前端入口","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishpioffical%2Ftiaoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishpioffical%2Ftiaoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishpioffical%2Ftiaoom/lists"}