# raylib-game-template: the two folders and a Makefile that starts a C game

> raylib-game-template is a skeleton for a small raylib game in plain C, pre-configured for Visual Studio and CMake, with a README full of placeholders to fill in. It solves the boring half of starting a project: the build setup, the folder layout, and a licence you can ship.

**raysan5/raylib-game-template** — A small template to start your raylib game

- Repository: https://github.com/raysan5/raylib-game-template
- Stars: 716 · Forks: 135
- Language: C
- License: Zlib
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/raysan5-raylib-game-template

## A template whose real content is the build setup

The README calls it the raylib game template and describes it as providing a base structure to start developing a small raylib game in plain C. That word small is doing work, because the repository layout says the same thing. The top-level entries are a .github directory, a .gitignore, a CMakeLists.txt, a CONVENTIONS.md, the LICENSE, the README, a projects directory, a screenshots directory and a src directory. There is no engine, no asset pipeline, no scene format and no runtime abstraction. What the template does provide is the configuration that a raylib project needs before a single line of game code exists, and the README says the repository is also pre-configured with a default LICENSE (zlib/libpng) and a README.md, this one, to be properly filled by users, with the freedom to change the LICENSE as required. It is a starting point, not a framework, and anyone expecting a larger scaffolding should stop here and read the repository itself.

## On Windows the raylib folder has to sit next to the template

The Windows setup instruction is the part that trips people up, because it is a layout requirement rather than a command. After extracting the zip, the parent folder raylib-game-template should exist in the same directory as raylib itself, so the file structure is a parent directory containing a raylib folder with the contents of the raylib repository, and next to it the raylib-game-template folder with this README and all other template files. Visual Studio users then open projects/VS2022/raylib-game-template.sln, select raylib_game in the solution explorer and use Project > Set as Startup Project, and the Local Windows Debugger with the green play arrow runs the project. The projects directory in the repository root is therefore not decorative: it holds the solution that points at the neighbouring raylib checkout, and that relative path is the thing that breaks if you move the template folder somewhere else.

## Linux builds through a Makefile with raylib cloned at branch 6.0

The Linux route is a shell sequence, and it is the clearest statement of what the template expects. The README gives the dependencies page in the raylib wiki for working on GNU Linux, then says you can use the template with Visual Studio, with CMake, or with your own build setup, and that this repository comes with Visual Studio and CMake already set up. The Makefile path looks like this:

```sh
mkdir ~/raylib-gamejam && cd ~/raylib-gamejam
git clone --depth 1 --branch 6.0 https://github.com/raysan5/raylib
make -C raylib/src
git clone https://github.com/$(User Name)/$(Repo Name).git
cd $(Repo Name)
make -C src
src/raylib_game
```

Two things stand out. The raylib checkout is pinned to the 6.0 branch with a shallow clone, so the template is tested against a specific raylib generation rather than a moving head. And the build happens inside the src directory of your own repository with make -C src, which is why the src folder is at the top level rather than nested in a project directory. The final line runs the produced binary as src/raylib_game, so the output name is fixed by the template rather than chosen by you.

## The README is a form you are meant to fill in

A surprising amount of the repository is a document with placeholders in it, and the README is explicit about the contract. All the sections defined by $(Data to Fill) are expected to be edited and filled properly, and it is recommended to delete the disclaimer message after editing the README.md file. The placeholders are not decoration. The game title appears as $(Game Title) in both the heading and the screenshot caption, the description is $(Your Game Description), the features are three numbered slots from $(Game Feature 01) to $(Game Feature 03), the controls are three keyboard slots, and the developers section has three placeholder entries with a role field. There are also link placeholders for YouTube gameplay, an itch.io release page and a Steam release page. This is a convention rather than a tool, and the payoff comes when a project is published: the same README shape, filled in, tells a reader what the game is and where to get it.

## Screenshots and conventions, both aimed at publishing

Two directories exist for the game rather than for the code. The screenshots directory holds the image referenced by the template README, screenshots/screenshot000.png, and the README carries a TODO asking you to show the game to the world with animated GIFs recommended. That is a small signal about the intent of the project: the template is built around the assumption that the output is a game you publish on itch.io or Steam, and the README structure is shaped for that. The CONVENTIONS.md file at the root suggests the same thing from the other direction, a set of agreed conventions for the code, and the .github directory plus .gitignore point to a repository that is meant to be published and worked on collaboratively rather than kept as a local scratch project. Neither the contents of CONVENTIONS.md nor the .github configuration is visible in the documentation, so their exact rules are something to read rather than assume.

## A licence chosen for shipping, and the freedom to change it

The licence is one of the few concrete decisions the template makes for you. The README states that the template is to be used with raylib and is licensed under an unmodified zlib/libpng license, and the License section of the template README repeats that the sources are licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software, with a pointer to the LICENSE file for details. The zlib licence also appears in the repository's classifier set, matching the LICENSE file at the root. Two caveats are worth stating. The word unmodified matters, because the template is explicit that it is unmodified and the README opens by saying you feel free to change the LICENSE as required, so if you relicence your game, that is your call and not a bug. And the static linking permission is the reason this default works for a commercial game, which is a detail that a game jam template that shipped with a copyleft licence could not offer.

## Where this template is the wrong starting point

The limits are inherent in the design. A single-binary C project with a Makefile and a Visual Studio solution does not scale to a team that wants continuous integration, a shared asset pipeline, hot reload or a scene editor, and nothing here provides any of that. The Windows layout requirement, where the template must sit next to a raylib checkout, is convenient for a solo developer with a tidy folder layout and awkward for a build server that wants a hermetic dependency set, since the raylib clone is pinned to branch 6.0 in the documented command and would need to be re-pinned deliberately for a different raylib generation. The template also assumes you will want the shipped README shape, which is a liability if your game belongs on a platform that expects a different kind of page. There is no GitHub release for this repository, so there is no tagged version to pin, and the last push was on 2026-08-13, so the practical reference points are the raylib branch you clone and the commit you copied.

## Conclusion

raylib-game-template suits a developer who has already chosen raylib and wants the project skeleton, the Visual Studio solution and the CMake configuration handed over rather than assembled, and the two-folder arrangement on Windows is a constraint worth internalising before the first build. It is the wrong tool if you want an engine with a scene graph, an asset pipeline or a build system that scales to a team, because this is a single-binary C project with a Makefile and a Visual Studio solution, and it is the wrong tool if you plan to ship the game under a different licence without noticing that the template ships with an unmodified zlib/libpng licence that the README says allows static linking with closed source software. Verify first which raylib branch you are targeting, since the documented command clones the 6.0 branch explicitly, and replace the LICENSE and the placeholder sections before you publish anything.

## FAQ

### How do I set up raylib-game-template on Windows with Visual Studio?

After extracting the zip, the raylib-game-template folder has to sit in the same parent directory as a raylib folder containing the raylib repository contents. Then you open projects/VS2022/raylib-game-template.sln, set raylib_game as the startup project and run with the Local Windows Debugger.

### What build systems does raylib-game-template support?

The README says you can use the template with Visual Studio, with CMake, or with your own build setup, and that the repository comes with Visual Studio and CMake already set up. The documented command line path uses a Makefile with make -C src.

### Which raylib version does the template target?

The documented setup clones raylib with git clone --depth 1 --branch 6.0, so the template is set up against the raylib 6.0 branch rather than the default branch.

### What licence does raylib-game-template ship with?

An unmodified zlib/libpng license, described as an OSI-certified, BSD-like license that allows static linking with closed source software. The README notes the LICENSE is pre-configured and that you are free to change it as required.

### What are the $(Data to Fill) placeholders in the README?

They are the sections you are expected to fill in, covering the game title, description, three features, three keyboard controls, three developer entries and the YouTube, itch.io and Steam links. The README recommends deleting the disclaimer message after editing the file.

## Sources

- [Issues](https://github.com/raysan5/raylib-game-template/issues)
- [License: Zlib](https://github.com/raysan5/raylib-game-template/blob/main/LICENSE)
- [raysan5/raylib-game-template on GitHub](https://github.com/raysan5/raylib-game-template)
- [README](https://github.com/raysan5/raylib-game-template/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/raysan5-raylib-game-template
