tupini07 / raylib-cpp-cmake-template

A small Raylib C++ template that uses CMake, LDtk, and Box2d
59 stars 4 forks source link
game-template raylib raylib-cpp

Raylib C++ CMake Template

This repo constains a small game that you can use as a template for your Raylib games if you wish to use C++ and CMake.

CMake is configured to automatically download the dependencies of your game through git, and pin them to a specific commit version (for example, see how we're importing the raylib dependency). This provides a very flexible mechanism to include new dependencies, or update the existing ones, without having to muck about with your system's package manager, or worrying about linking external libraries at all. It is a bit slower on the first build though, since CMake will need to build everything.

For the moment, the project is using the following dependencies which should be useful in many games:

If you don't know where to start or how to use this template then check out the wiki!

Important files

You can get a good understanding of how things work by reading through the following files:

Questions and comments

If you have any question then feel free to create a new discussion, or if you see any issue then go ahead and open a new issue.

If you see anything that can be improved then feel free to make a PR! Those are always welcome 🙂 Another welcomed contribution is that of going through the wiki and clarifying content or adding new things you think might be helpful for others.