Due to a current issue with the GitHub repository, the full gameplay demo video is temporarily unavailable. It will be added once the technical issue is resolved.
This foundational first-year module (GPF, 2024) at Teesside University served as an introduction to C++. The module was structured to progress from the core basics of the language up to the use of external libraries (SFML). Focusing on syntax, control flow, file handling, and an introduction to Object-Oriented Programming (OOP). The bulk of this section will focus on the Maze Game and the Circles Project.
Logic & Structure: Utilised a 2D array to represent the level and implemented procedural functions to manage player/enemy movement, collision and, game state.
File Handling: Implemented File I/O allowing the saving and loading of different maze levels, enabling multi-level progression.
Rendering: Developed a Draw Maze function that efficiently loops through the 2D array, generating rectangles on the window to visually represent walls, the player, and other entities.
Enemy AI: Implemented a basic enemy AI which randomly chooses a location to move within the maze boundaries.
Game State Management: Implemented clear Win/Lose conditions and logic to automatically load the next level upon completing the previous one.
Removed Feature: Previous implementations included a timer to dictate the score, but this feature was removed to support the new multi-level progression system.
OOP & Encapsulation: Created separate Circle and Rectangle classes, each with its own constructor and destructor. This introduced the principle of encapsulation by grouping related properties (position, size, colour) and member functions (Draw, Update) into self-contained objects.
Custom Object Behaviour: The Circle class implemented dynamic features, including velocity, boundary collision (bouncing off walls), and logic to randomly invert its direction. It also implemented mouse input logic, allowing all circles to move to the cursor on left click.
Basic Graphics: Utilized the graphics framework (SFML) to implement functions that draw the custom Circle and Rectangle objects to the window.
Core Syntax & I/O: Gained proficiency in fundamental C++ syntax, data types (int, float, char, string, bool), arithmetic operators, and basic console input/output.
Boolean Logic & Comparisons: Explored conditional logic (if, else if, and else) and Boolean logic using and, or, and not operators. Applied this logic to solve classic computational problems, such as accurately determining a leap year.
Loops & Arrays: Gained experience in various loop structures, such as for, while and do while. Used these structures to initialize, iterate through, and manipulate arrays in numerous ways, including mirroring an array and populating arrays with calculated values.
Pointers & References: Gained a foundational, theoretical understanding of pointers and references in C++, including their complex distinct functions and application in addressing memory.
Classes & Inheritance: Gained a basic understanding of class inheritance and the structure of polymorphism—concepts that were applied and built upon in subsequent modules.
Language: C++
Libraries/Frameworks: SFML, C++ Standard Libraries (iostream, vector, fstream, string, ctime, cstdlib)
Core Concepts: File I/O, 2D Arrays, Basic OOP (Classes, Structs, Encapsulation), Control Flow, Version Control
IDE: Visual Studio
Tools: GitHub
This module presented a valuable learning experience by challenging me to move from introductory scripting to foundational object-oriented C++ programming.
Core C++ Fundamentals: The initial jump from loosely using programming as a hobby to more formal practices with C++ was quite the challenge. The new syntax compared to C# was an interesting and very rewarding challenge. Pointers and references remain a complex task for me in C++, but one I'm slowly mastering.
Object-Oriented Transition: Implementing classes and basic encapsulation proved challenging as it was a shift toward structuring data and functionality into cohesive objects. Inheritance and polymorphism presented a problem initially, but through experience, I have gained a thorough understanding.
Coordinate Systems: Adapting to the new programming environment required overcoming visual challenges, specifically adapting to the SFML graphics framework's coordinate system. Unlike standard graph paper, the origin (0,0) is defined at the top-left corner of the window, with the Y-axis increasing downwards. This required careful adjustment to game logic and object placement.
Structural Progression: While the technical tasks were simple (e.g., Maze, Circles), they successfully reinforced the importance of procedural logic, control flow, and 2D array manipulation—the building blocks for all subsequent, more complex game projects.
Module Grade: 88%