# 头顶猜词多人游戏-开源项目 **Repository Path**: SenLin_M/headword ## Basic Information - **Project Name**: 头顶猜词多人游戏-开源项目 - **Description**: 头顶猜词游戏是一款基于Web的多人互动游戏,一名玩家作为"出词人"创建房间并输入词语,另一名玩家作为"猜词人"加入房间并由其他人的动作或语言暗示尝试猜出词语。游戏页面采用现代化UI设计,支持跨设备互联,提供完整的游戏管理功能。 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: https://app.qudaa.cn - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2025-07-08 - **Last Updated**: 2025-08-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 头顶猜词综艺游戏-开源项目 ### 介绍 头顶猜词游戏是一款基于Web的多人互动的综艺游戏,一名玩家作为"主持人"创建房间并发送词语,另一名玩家作为"猜词人"加入房间并由其他人的动作或语言暗示尝试猜出词语。游戏页面采用现代化UI设计,支持跨设备互联,提供完整的游戏管理功能。 ### 系统架构 - **前端**:HTML5, CSS3, JavaScript - **后端**:PHP - **数据库**:MySQL - **设计**:Neumorphism设计风格,响应式布局 ### 安装指南 #### 环境要求 - PHP 7.0+ - MySQL 5.6+ - Web服务器(Apache/Nginx) #### 安装步骤 1. **克隆仓库** ```bash git clone https://gitee.com/SenLin_M/headword.git 2. **配置数据库连接** 编辑 `index.php` 文件顶部,设置数据库连接信息: ```php $servername = "localhost"; $username = "db_user"; $password = "db_password"; $dbname = "db_name"; ``` 3. **部署到Web服务器** 将项目文件放到Web服务器的根目录 4. **访问应用** 在浏览器中访问 `http://app.qudaa.com` 或 `http://app.qudaa.cn/headword` ## 使用说明 ### 主持人操作流程 1. 选择"主持人"角色 2. 系统自动创建房间并生成连接码 3. 复制连接码并分享给猜词人 4. 输入要猜的词语和提示信息 5. 点击"发送词语"按钮 6. 使用"开启/关闭房间"按钮管理游戏状态 ### 猜词人操作流程 1. 选择"猜词人"角色 2. 输入主持人提供的连接码 3. 点击"加入房间"按钮 4. 等待词语显示在屏幕上 5. 在60秒内猜出词语 6. 等待下一个词语或游戏结束 ## API接口 系统提供以下API端点: 1. **创建房间** - `GET ?action=create_room` - 返回:`{success: true, room_code: "ABC123"}` 2. **提交词语** - `POST ?action=submit_word` - 参数:`room_code`, `word`, `hint` - 返回:`{success: true}` 3. **获取最新词语** - `GET ?action=get_latest_word&room_code=ABC123` - 返回:`{success: true, word: "词语", hint: "提示"}` 4. **关闭房间** - `GET ?action=close_room&room_code=ABC123` - 返回:`{success: true}` 5. **开启房间** - `GET ?action=reopen_room&room_code=ABC123` - 返回:`{success: true}` 6. **检查房间状态** - `GET ?action=check_room_status&room_code=ABC123` - 返回:`{success: true, is_active: true}` ## 贡献指南 欢迎贡献代码!请遵循以下步骤: 1. Fork 项目仓库 2. 创建特性分支 (`git checkout -b feature/your-feature`) 3. 提交更改 (`git commit -am 'Add some feature'`) 4. 推送分支 (`git push origin feature/your-feature`) 5. 创建 Pull Request ## 许可证 本项目采用 [MIT 许可证](LICENSE) ```text MIT License Copyright (c) 2025 SenLinM Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ## 演示地址 在线演示: [https://app.qudaa.cn](https://app.qudaa.cn/) ## 联系方式 如有任何问题或建议,请联系: - 邮箱:manage@senlinm.cn - 项目主页:https://gitee.com/SenLin_M/headword - 小林笔记:https://m.senlinm.cn ## 特别鸣谢 - 小林笔记 - 小轩(禾安) - Doraemon --- **快乐游戏,享受猜词的乐趣!** 🎮✨