A C++ application game template using raylib
- CMake 3.24 or higher
- Ninja build system
- C++17 compatible compiler
- For web builds:
- Emscripten SDK
- Python 3 (for local web server)
.
├── .vscode/ # VSCode configuration
├── src/ # Source files
├── vendor/ # External dependencies (auto-downloaded)
│ └── raylib-5.5/ # raylib library
└── build/ # Build output
-
Configure the project:
cmake -B build -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DPLATFORM=Desktop -
Build:
cmake --build build
The executable will be created in build/default-game/.
-
Configure the project with Emscripten:
emcmake cmake -B build-web -G Ninja -DPLATFORM=Web
-
Build:
cmake --build build-web
-
Serve the web build:
cd build-web/default-game && python3 -m http.server 8080
-
Open
http://localhost:8080/default-game.htmlin a web browser
The project includes VSCode configuration for seamless development:
configure desktop: Configure for desktop buildconfigure web: Configure for web buildbuild debug: Build debug version (desktop)build release: Build release version (desktop)build web: Build web versionclean desktop: Clean desktop buildclean web: Clean web buildserve web: Start local server for web build
Debug: Launch desktop debug buildRelease: Launch desktop release buildLaunch Web Browser: Build, serve, and open web version in Chrome
- Press
Cmd/Ctrl+Shift+Bto build (defaults to debug build) - Press
F5to build and debug - Use the VSCode Command Palette to access other tasks
- The project uses C++17
- raylib 5.5 is automatically downloaded to the vendor directory
- Source files are in the
src/directory - Resources (images, sounds, etc.) should be placed in
src/resources/
[Your license information here]