A simple C++ Raylib template with essential features to help you quickly get started on new projects. This template includes a basic game loop, window handling, and rendering setup.
- Pre-configured Makefile for easy compilation
- Basic game loop and window management
- Customizable screen dimensions and frame rate
- Guide lines for visual reference (useful during development)
- Input handling for exiting the window (
q
for exit )
- Raylib (You can install it by following the instructions on Raylib's GitHub)
- g++ or any C++11 (or higher) compatible compiler
- Make (for managing the build process)
-
Clone the repository:
git clone https://github.com/0Shree005/RaylibTemplate.git
-
Navigate into the project directory:
cd RaylibTemplate
-
Build the project:
make
-
Run the game:
./program
- You can adjust the window size and frame rate in
game.hpp
by modifying these constants:const int screenWidth = 1000; const int screenHeight = 800; const int fps = 60;
include/
: Contains header files (game.hpp
).src/
: Contains source files (main.cpp
,game.cpp
).Makefile
: Handles the build process.