This project was made in C++ using the SFML graphics library to create sprites and animations inside of the game. In this project, me and my partner had created 4 levels, including a boss level at the end.
To help organize this project, we used an engine architecture. Here are the following systems that we used to create an organized architecture:
To further help organization, we used an event system that could be customized for different types of events. With such an architecture, we could decouple all calls for input or any other types of communication between different classes. A good example of this is when the player presses the space bar to jump. The event system timeline for this would be that the player would press the space bar, which the input system would catch on to, which would then be broadcasted to the event system, who would then receive the message and then broadcast to any of the managers that want to listen to that given event type
Knowing that we would need to make a lot of levels for this project, we decided to make level maker. To do this, we created a level reader system where the developer could create a text file, where each letter represented a different object to place in the level and then the reader would take in the file and translate it to spawning objects into the level when it is first opened.
To try and test if any objects overlap with each other, we devised a collision detection system, where the system would go through each of the objects and find if they overlapped. If they do, an event would be sent to both of the overlapping objects so that the class could further take care of any additional events that may come out of the overlap.
Graphics Buffer System
Another issue we ran into when we made the game is that there really wasn't any good way to do animations or sprites inside of SFML without hard coding. To stop this, we created a graphics buffer system where each class has a draw function that they can draw whatever sprite then want and they just pass it into the buffer system and the buffer will take care of the rest. We also created an animation system that could contain frames and the animation system would switch back and forth between frames within a given set amount of time.