Game Information

  • Language: C++
  • Graphics API: SDL
  • Creation: Y1 S2
  • Source URL: GitHub Page

Mario Bros. NES

Created as part of my Games Engine Creation module in semester 2 of my first year. The task was to create a 2D game using C++ and the SDL library. The game was to include various game elements such as sprite rendering, character collisions and level maps to name a few. An object-orientated approach was required with proper memory management.



How the Game was Developed

The game was created using the SDL library. This allowed for audio, fonts, textures and player input in the game. With this, I was able to render character sprites and move them around the level map, with subsequent collisions.

 // render both players at a set position in the level
 characterMario = new CharacterMario( mRenderer, "Images/Characters/MarioWalk.png", Vector2D( 64, 342 ), mLevelMap );
 characterLuigi = new CharacterLuigi( mRenderer, "Images//Characters/LuigiWalk.png", Vector2D( 414, 342 ), mLevelMap );
During development, I would often encounter bugs, such as inheritance issues and memory leaks. Using break points, watches and other debugging tools, these issues were resolved swiftly.

Additional Features

Further implementations included text rendering, fonts and sound effects. A main menu was also added akin to that of the original Mario Bros. NES game. An additional level with a separate level map and a high score screen was implemented, where the score of each player would be read to and from a text file, only to be parsed to determine the overall score of each player, and ultimately, the winner.


Feel free to drop a comment below.