SFML Mario Game Project This project is a simple C++ Mario game using the SFML library.
This project is a simple C++ Mario game using the Simple and Fast Multimedia Library (SFML). The game is designed in the classic platformer style, where the player has to control the character Mario and overcome obstacles, collect coins and save the princess.
To run and build the project, you will need the following:
- C++ compiler (like GCC or Clang)
- SFML library (version 2.5.1 or higher)
-
Clone the repository using the command:
git clone https://github.com/your_username/mario-game.git
-
Change to the project directory:
cd mario game
-
Build the project using the build command of your C++ compiler. For example, for GCC:
g++ main.cpp -o mario -lsfml-graphics -lsfml-window -lsfml-system
Note: Make sure the SFML library paths are correct.
-
Run the assembled game:
./mario
- Left Arrow: Move Mario left
- Right Arrow: Move Mario right
- Space: Jump Mario
main.cpp
: The main project file that contains themain()
function and handles the main game loop.assets/
: Directory containing game assets such as textures, sounds, etc.include/
: Directory containing project header files.src/
: Directory containing project source files.README.md
: The file you are currently reading, containing a description of the project and instructions.
##Javamaks
Project author: Javamaks
- SFML Library: https://www.sfml-dev.org/
- Inspiration for the game: Mario by Nintendo
For more information
For game development and the use of the SFML library, you can visit the following resources:
- SFML official website: https://www.sfml-dev.org/
- SFML Guide: https://www.sfml-dev.org/documentation/
- SFML Forum: https://en.sfml-dev.org/forums/