Skip to content

学了一个半月C++写的一个终端上运行的小游戏

License

Notifications You must be signed in to change notification settings

Finn-ASTC/SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 贪吃蛇游戏 (Snake Game)

学习了一个半月写的第一个较为完整的C++小项目

编译运行

# 使用g++编译
g++ -std=c++17 -o3 -march=native -flto -DNDEBUG -o snake snake0.3.cpp

# 运行
./snake

操作说明

  • W / - 向上移动
  • S / - 向下移动
  • A / - 向左移动
  • D / - 向右移动
  • 空格 - 暂停游戏
  • ESC - 退出游戏

学习记录

大致了解了简单的游戏循环设计,双缓冲概念,简单的状态机相关概念,输入缓冲处理,初步接触代码规划,模块划分,依赖设计

🙏 致谢

  • 感谢 Cherno 的C++教程
  • 感谢 Lily 的帮助和陪伴 💕

⭐ 如果你喜欢这个项目,欢迎给个Star喵! (为什么要说“喵”,因为脑子抽了,但是我喜欢,喵💕)

About

学了一个半月C++写的一个终端上运行的小游戏

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages