Skip to content

基于SFML图形库的贪吃蛇小游戏,2024年春季复旦大学面向对象程序设计课程大作业(个人作业版本)

License

Notifications You must be signed in to change notification settings

victkk/SFML-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFML SNAKE

PJ for OOP at Fudan University

alt text DEMO:https://www.bilibili.com/video/BV1D3Vee6EoB

玩法:

两种操控模式:长按鼠标右键控制蛇头 或 wasd 控制蛇头

空格加速,吃彩色点点增长/大躯体,人机的蛇头撞到你的蛇身完成击杀(是有点难的)

project tree

├─resources //all the resources(img audio) needed by the game

├─docs

│ ├─SFML 学习日志.md //Learning Journal of the SFML Library

│ └─ 项目日志.md //change log

├─src //SOURCE CODE

│ ├─entity

│ ├─screen

│ ├─UI

│ └─utils

├─snake_test.cpp //program entrance

└─CMakeLists.txt

编译

验证过的编译器:

  1. mingw64 14.2.0
  2. mingw64 13.0.1
  3. mingw64 8.1.0
  4. mingw64 7.2.0

a couple of things to be imporved

  1. Manage snakes and food using an object pool.
  2. reimplement window resizing adaptation
  3. Add more UI components
  4. Discard the dual-layer state machine
  5. Develop other snake control strategies
  6. use 'vertexarray' for 'snake'(this could significantly reduce computation overhead)

About

基于SFML图形库的贪吃蛇小游戏,2024年春季复旦大学面向对象程序设计课程大作业(个人作业版本)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published