Object Oriented Programming Project - Doodle Jump Game 💻
The project must include:
- Graphical Interface (SDL, SFML, Qt, etc.) - C++ API - used SFML
- RTTI (Run-time type information): GameLoop.cpp (line 91), GameEngine.cpp (lines 23, 38, 40) - dynamic_pointer_cast. Also used static_cast
- Abstract Classes: BaseEntity and Platform
- Overloading Operators: << Logger class; += and -= Keyboard class; = and + Score class (and some more assignment operators)
- Heap Memory Allocation: shared_ptr
- Exceptions: see Exception.hpp
- STL: std::vector - for platforms; std::map for keyboard input (see Keyboard class)
- Lambda expressions: GameEngine.hpp (starting at lines 15, 19), GameLoop.cpp (starting at lines 53, 90)
- Templates: Score is a template class; also used a template for 'lambda' (see DEFINITIONS.hpp)
- Smart pointers: shared_ptr
- Design patterns (minimum 2): Singleton (Logger) & Factory (PlatformCreator)
- Features of C++17/20 (constexpr, consteval, constinit, fold expressions, init statement for if/switch, etc.): init statement for if and std::filesystem::exists (both since C++17)
The project might include:
- Move semantics
- Multithreading
- Computer Network / Socket Programming
- Databases
The second demo is the final version! If the doodler jumps on the red platfom, that platform disappears. Note that each type of platform (green - which is the regular one and appears twice as much as the others; red - slow platfom; light blue - fast platform) makes the doodler jump a different distance.
Memory leaks have been checked with valgrind and there are no leaks.
See documentation.
See resources.