Skip to content

这是一个基于 Phaser 3 开发的现代化贪吃蛇游戏,为玩家带来了丰富多样的游戏体验和炫酷的视觉效果。

License

Notifications You must be signed in to change notification settings

ahkjxy/Greedy-snake

Repository files navigation

贪吃蛇大作战 (Snake Battle)

一个基于 Phaser 3 的现代化贪吃蛇游戏,具有多种特色功能和视觉效果。

A modern snake game based on Phaser 3, featuring multiple special abilities and visual effects.

游戏截图

游戏特色 | Game Features

  • 多人对战: 与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

如何游玩 | How to Play

  • 使用方向键 (↑ ↓ ← →) 控制蛇的移动
  • 吃食物增加长度和分数
  • 避免撞到其他蛇、障碍物或自己的身体
  • 收集特殊食物获得临时能力
  • 尝试吃掉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)

游戏界面 | Game Interface

  • 左上角显示当前分数
  • 左侧有皮肤切换按钮
  • 能量条显示加速可用能量
  • 特殊效果状态会在屏幕上显示剩余时间

  • 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

技术实现 | Technical Implementation

本游戏使用以下技术构建:

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

安装与运行 | Installation and Running

  1. 确保已安装 Node.js
  2. 克隆此仓库
  3. 安装依赖:
    npm install
    
  4. 启动开发服务器:
    npm start
    
  5. 在浏览器中访问 http://localhost:8080

  1. Make sure Node.js is installed
  2. Clone this repository
  3. Install dependencies:
    npm install
    
  4. Start the development server:
    npm start
    
  5. Visit http://localhost:8080 in your browser

构建生产版本 | Build for Production

npm run build

构建后的文件将位于 dist 目录中。

The built files will be located in the dist directory.

游戏开发者 | Game Developers

  • [Your Name] - 初始开发 | Initial development

许可证 | License

本项目采用 MIT 许可证 - 详情请查看 LICENSE 文件

This project is licensed under the MIT License - see the LICENSE file for details.

About

这是一个基于 Phaser 3 开发的现代化贪吃蛇游戏,为玩家带来了丰富多样的游戏体验和炫酷的视觉效果。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published