This is a game engine created using SFML and C++. It works like other game engines by using sprites, updating their locations, and then drawing them in different steps. The engine includes boundary detection, allowing cat sprites to bounce off the top, left, and right borders, and collision detection, which makes them bounce when touching the player-controlled platform sprite.
The sample game involves preventing the cat sprites from falling off the screen by bouncing them up with a player-controlled platform sprite, which can be moved left and right using the A and D keys. If a cat sprite falls off the screen or if you want to spawn another one, you can press any key.
The engine is designed to be easily customizable, supporting different sprites and their behaviors. For example, you can modify how sprites interact with borders or change their images, dimensions, and rotations.
To compile the project, ensure you have SFML, g++, and make installed on your system.
- Install SFML:
sudo apt-get install libsfml-dev - Compile the project:
make
Once compiled, you can run the program using the following command:
make run- A Key: Move the platform sprite to the left.
- D Key: Move the platform sprite to the right.
- Any Key: Spawn a new cat sprite.
The game displays a player-controlled platform sprite and multiple cat sprites. The objective is to keep the cat sprites from falling off the screen by bouncing them with the platform sprite.
This project was created as an assignment by a single developer for CS438.