SDl/C++ – Mario Bros

My first year of University featured an assignment to develop a Mario Bros clone using the SDL framework which works natively with C++. At this point, I had a large amount of experience with the Unity game engine which did a lot of the heavy lifting for me. The main difficulty of this assignment came from only using a framework, which required a custom game engine to be developed along with the game itself.

While developing the game engine with SDL is not as tricky as compared to using something much lower level such as OpenGL or DirectX, a focus on the engines architecture and what exactly is going to be developed using it is extremely crucial for making something that is both usable and expandable. A lot of the features that game developers often take for granted within game engines such as Unity are required to be developed from scratch (At least for this assignment) such as systems to handle sprite sheets, collisions, and physics.

The minimum requirements for the assignment were a moveable player, moveable enemies that could kill the player, as well as functionality to knock up the enemies and stun them either through hitting the block below them or hitting the POW block to stun all enemies within the level. The game also needed to implement at least two levels that had to differ from each other in some way. I decided to add another POW block, a new enemy that would become enraged when hit, and sprite animations.

I managed to achieve 99% for this assignment, which is the best mark I got for an assignment at University. While not required, I had a large focus on trying to make the engine as reusable as possible so a lot of thought was put into systems and how they could be developed to be as flexible as possible. Inheritance was used for each entity (player, entities, blocks) to allow for code to be easily reused, and I even created some systems for the project that were not even required such as a animation, audio, and entity manager system.

I know a lot of other students struggled with this assignment due to the lack of help that the provided tutorials for the assignment gave. This however was where my independence as a programmer really shined, with most features being implemented due to previous knowledge from before University or through research.

Next Post

Previous Post

© 2023 Adam Raybould

Theme by Anders Norén