This is a repository for my PJ of OOP at Fudan University.
DEMO:https://www.bilibili.com/video/BV1D3Vee6EoB
├─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
There are still many parts of the project that can be imporved:
- Manage snakes and food using an object pool.
- reimplement window resizing adaptations in a decent manner(the current is bullshit)
- Add more UI components (it’s best not to reference the button; it was generated by GPT and is very inconvenient to use, causing most of the issues encountered during window resizing).
- Discard the dual-layer state machine I wrote.(maybe I wrote too much verilog that I created this disaster)
- Develop other snake control strategies.
- Convert 'snake' to use 'vertexarray' (this could significantly reduce overhead, but since my Intel 13th generation i9 CPU can effortlessly run 500 frames, I haven’t bothered changing it)
I really hope someone would continue working on this project.