SDL Breakout Project
SDL Breakout Project
Introduction
This project is a breakout game built with SDL. The author is Junfeng Zhou. The main reference of this project is https://learnopengl.com/.
How to run
This game is only available on macOS. Use cd command to the ./Game/bin directory, then use the command ./breakout to run the game. Note that for the relative directory issue, you cannot simply double click the executable file in Folder to run it, neither run the ./breakout in a directory other than ./Game/bin, or some resources cannot be loaded correctly.
Documentation
https://denebf33.github.io/Breakout_SDL/Game/Docs/html/index.html
Executable binary file
https://github.com/denebf33/Breakout_SDL
Post Mortem
If I have more time for this project, firstly I would like to refactor my ResourceManager class. Now when this class startUp itself, each resource is loaded separately, which means every time I need to load some resource, I have to call the Load() function. This caused a very inconvenient fact that is I have to hardcode the relative path of each resource in my ResourceManager class. I think it should be more efficient that load all resources of the same kind with one function. I can use a folder path as the parameter of the Load() function, and then load all resources in this folder.
Also, I think my text fields are somehow unflexible. I hardcoded positions of most of them, so if I change the size of the window, then all the user interfaces might be messed up. I have already made some text fields keep on the center of the screen automatically, but most user interfaces still have no viable anchor point(like UI edit system of Unity3D?) or flexibility. This is one of the things I want to fix up.
Finally, I want to make this game more funny. I want to add some props that will randomly drop with the destruction of bricks. Some of them will give player buffs like more balls, longer paddle, and some of them will give player debuffs like a shorter paddle, faster balls. This will make the game more playable, and I think this is a part of polishing after I finished the main part of this project.



评论
发表评论