https://github.com/atomicptr/cpp-game-template
A simple C++ game template using Raylib for making games on Linux
https://github.com/atomicptr/cpp-game-template
cpp game-development hot-reload raylib template-project
Last synced: 11 months ago
JSON representation
A simple C++ game template using Raylib for making games on Linux
- Host: GitHub
- URL: https://github.com/atomicptr/cpp-game-template
- Owner: atomicptr
- License: 0bsd
- Created: 2024-08-22T10:51:30.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-23T12:05:02.000Z (11 months ago)
- Last Synced: 2025-03-07T00:37:43.822Z (11 months ago)
- Topics: cpp, game-development, hot-reload, raylib, template-project
- Language: C++
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C++ Game Template
A simple C++ game template using Raylib for making games on Linux
## Features
- Code hot reloading
- Web export (emscripten)
- Windows builds (cross compiling / mingw)
- CI and CD using Github Actions, creates a Linux, Windows and Web release build on tags
## Requirements
- Devenv
If not using devenv you need to install these on your own:
- [babashka](https://babashka.org/) - Used for some scripts (required for hot reload)
- CMake (3.30+)
- gcc 14+
- Emscripten (used for web export)
- mingw (for windows cross compilation)
## How to use
### Just run
Just do
```bash
$ just run
```
### Hot reloading
This will launch a babashka script that checks for changes in src/game and builds a dynamic library which the executable will load and replace some function pointers
```bash
$ just dev
```
### Web
This will start a web server usually at port 8080 (look into the terminal) and compile the game. This will also auto rebuild on changes although you need to reload the website (disable cache, do Ctrl + F5)
```bash
$ just web
````
### Building releases
All release commands start with **xbuild-...** and the builds can be found in **build/xbuild/...**
#### Linux
```bash
$ just xbuild-linux
```
#### Windows
```bash
$ just xbuild-windows
```
#### Web
```bash
$ just xbuild-web
```
## License
BSD 0-Clause