一个基于 Phaser 3 的现代化贪吃蛇游戏,具有多种特色功能和视觉效果。
A modern snake game based on Phaser 3, featuring multiple special abilities and visual effects.
- 多人对战: 与AI控制的蛇进行竞争
- 多种皮肤: 可以切换不同的蛇皮肤
- 特殊食物: 获取各种能力提升
- 速度提升: 暂时增加移动速度
- 无敌状态: 短时间内不会被其他蛇或障碍物击败
- 缩小效果: 减小体型,更容易穿过狭窄区域
- 穿墙能力: 可以穿过其他蛇和障碍物
- 视觉效果: 炫彩发光效果、日夜循环、特效动画
- 障碍物系统: 随机生成的障碍物增加游戏难度
- 复活系统: 使用积分可以在游戏结束后复活
- AI蛇死亡转变: AI蛇死亡后会变成食物
- Multiplayer Battle: Compete with AI-controlled snakes
- Multiple Skins: Switch between different snake skins
- Special Food: Gain various power-ups
- Speed Boost: Temporarily increase movement speed
- Invincibility: Become immune to collisions for a short time
- Shrink Effect: Reduce size to navigate through tight spaces
- Ghost Mode: Pass through other snakes and obstacles
- Visual Effects: Colorful glow effects, day-night cycle, special animations
- Obstacle System: Randomly generated obstacles increase game difficulty
- Revival System: Use points to revive after game over
- AI Snake Transformation: AI snakes transform into food when defeated
- 使用方向键 (↑ ↓ ← →) 控制蛇的移动
- 吃食物增加长度和分数
- 避免撞到其他蛇、障碍物或自己的身体
- 收集特殊食物获得临时能力
- 尝试吃掉AI蛇的残骸获得额外分数
- 按空格键可以临时加速(消耗能量)
- Use arrow keys (↑ ↓ ← →) to control snake movement
- Eat food to increase length and score
- Avoid colliding with other snakes, obstacles, or your own body
- Collect special food for temporary abilities
- Try to eat AI snake remains for extra points
- Press spacebar for temporary speed boost (consumes energy)
- 左上角显示当前分数
- 左侧有皮肤切换按钮
- 能量条显示加速可用能量
- 特殊效果状态会在屏幕上显示剩余时间
- Current score displayed in the top-left corner
- Skin switch button on the left side
- Energy bar shows available boost energy
- Special effect status displayed on screen with remaining time
本游戏使用以下技术构建:
This game is built using the following technologies:
- Phaser 3 - 强大的HTML5游戏框架 | Powerful HTML5 game framework
- JavaScript ES6+ - 现代JavaScript语法 | Modern JavaScript syntax
- HTML5 Canvas - 游戏渲染 | Game rendering
- 确保已安装 Node.js
- 克隆此仓库
- 安装依赖:
npm install
- 启动开发服务器:
npm start
- 在浏览器中访问
http://localhost:8080
- Make sure Node.js is installed
- Clone this repository
- Install dependencies:
npm install
- Start the development server:
npm start
- Visit
http://localhost:8080
in your browser
npm run build
构建后的文件将位于 dist
目录中。
The built files will be located in the dist
directory.
- [Your Name] - 初始开发 | Initial development
本项目采用 MIT 许可证 - 详情请查看 LICENSE 文件
This project is licensed under the MIT License - see the LICENSE file for details.