This was the first game-project I ever made. At the time, I reached the second semester of my studies at DAE and had very basic C++ knowledge. At this point, I hadn't gained any knowledge of the C++ STL yet, so when I look at the code now, I can get a good laugh. Though, I am quite proud of what I was able to do with this basic knowledge.
The player can attack from any state, so I decided the create two separate spritesheets for the movement and the attacking sprites. The specific animations are ordered accordingly so I only have to swap the texture when the player attacks. The internal sprite row doesn't have to change. For each individual attack frame, I specify an relative offset for the whip. I use the same approach for the Swordsman Skeleton.
I had to take a different approch for the gear pins.
In this case, I determine the sprite frame based on the angle and direction. There are four pin frames that get recycled by each quadrant of the circle.
Working on this project, I also started experimenting with file reading. I created my own format to load in the different stages with its objects and enemies.
To handle the level-collision, I created SVG files by tracing the shapes of the tiles. By using the provided functions of the engine, I load in the polygons from the SVG files and use raycasts to handle overlap.