# Raylib C++ Starter Template: a VS Code project that runs on F5

> This repository is a minimal C++ scaffold for raylib on Windows and Visual Studio Code, with a bouncing ball demo, pre-configured build tasks and the GNU runtime DLLs already committed. It is built for a first raylib program on Windows, and it is not a general cross platform game project setup.

**educ8s/Raylib-CPP-Starter-Template-for-VSCODE** — Raylib C++ Starter Template for VSCODE

- Repository: https://github.com/educ8s/Raylib-CPP-Starter-Template-for-VSCODE
- Stars: 800 · Forks: 55
- Language: C++
- License: MIT
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/educ8s-raylib-cpp-starter-template-for-vscode

## A scaffold aimed at one first program, not a game project framework

The README describes the repository as a minimal C++ project scaffold for Visual Studio Code on Windows, and it says plainly that it includes a bouncing ball demo and zero boilerplate friction. The badges set the boundaries: language C++, raylib 4, 5 or 6, platform Windows 10 or 11, editor VS Code.

That combination of constraints is the interesting part of the project. Most starter templates try to be neutral across operating systems and toolchains. This one commits to the Windows case and says so, which makes it a smaller promise and a more specific one.

The audience is visible from the shape of the deliverable. The table in the README lists three things: a bouncing ball demo using raylib's core 2D drawing API, pre-configured VS Code build tasks so there is no manual setup, and a note that it is tested on Windows 10 and 11 with raylib 4, 5 and 6 working out of the box. That is a description of an entry point for someone starting out, and of the teacher who wants their students pressing F5 rather than reading a toolchain tutorial.

The repository contents back this up. There is a main.cpp, a main.code-workspace, a .vscode directory, a Makefile, and, unusually for a starter template, two committed runtime libraries, libgcc_s_dw2-1.dll and libstdc++-6.dll, sitting at the repository root.

There is also a video tutorial linked from the README, which is how the author expects the three steps to be learned.

## The three step workflow: open the workspace, open main.cpp, press F5

The getting started section is three steps, and there is no configuration step hidden inside them.

1. Double-click main.code-workspace to open the project in VS Code.
2. In the Explorer panel, open main.cpp.
3. Press F5 to compile and run.

The .code-workspace file is the mechanism that makes this work. A VS Code workspace file is not a folder, it is a file that describes a multi root workspace, and opening it applies the settings, tasks and launch configuration that the .vscode directory contains. So the third step, pressing F5, is not the user running a build command, it is the user triggering the task that ships with the workspace.

This is the difference between the template and a plain repository of source files. In a plain folder, F5 asks you to pick a debugger and a build target, and if nothing matches your compiler you get an error before any code runs. Here the task is pre-configured, and the README's claim of no manual setup rests on that file.

The tradeoff is that the template carries its build assumptions with it. The configuration was written for one machine layout, and if your raylib installation is somewhere else, the task has to be adjusted. The README does not document the task definitions, so a reader who wants to know exactly which target F5 runs has to open the .vscode directory and read them.

## What the bouncing ball actually teaches about the raylib loop

The demo in main.cpp is small enough to read in one pass, and it is a reasonable first raylib program because it shows the shape of the frame loop rather than a clever algorithm. The opening of the file looks like this.

```cpp
#include <iostream>
#include <raylib.h>
using namespace std;

int main()
{
    const int SCREEN_WIDTH = 800;
    const int SCREEN_HEIGHT = 600;

    int ball_x = 100;
    int ball_y = 100;
    int ball_speed_x = 5;
    int ball_speed_y = 5;
    int ball_radius = 15;
```

The rest of the file is the loop: InitWindow creates the window at the given size, SetTargetFPS(60) fixes the target frame rate, and the while loop keeps running while WindowShouldClose() returns false. Inside it, the ball position is updated by the speed values, and a boundary check flips the sign of a speed when the ball reaches an edge. Drawing is bracketed by BeginDrawing and EndDrawing, with ClearBackground(BLACK) and DrawCircle drawing the ball, and CloseWindow() at the end.

For a learner this is a decent skeleton, because the order of the calls is the order every raylib program uses. For an experienced developer it is small enough to be replaced within a minute.

One thing the sample does not include is any asset loading, input handling, or cleanup of resources beyond CloseWindow. It is a 2D drawing demo, and the README describes it that way.

## The Makefile: upstream raylib build with a Windows compiler path

The Makefile in the repository is the raylib desktop makefile, with the copyright header of Ramon Santamaria and the zlib style permission text, and the template overrides a handful of variables in it.

```bash
PROJECT_NAME       ?= game
RAYLIB_VERSION     ?= 4.5.0
RAYLIB_PATH        ?= ..\..
COMPILER_PATH      ?= C:/raylib/w64devkit/bin
PLATFORM           ?= PLATFORM_DESKTOP
```

Those five lines are the actual configuration of the template, and each one is a decision you inherit.

PROJECT_NAME decides the output binary name, and it defaults to game rather than something project specific. RAYLIB_PATH points two directories up with a Windows style relative path, which assumes the raylib source tree sits alongside this checkout in a particular arrangement. COMPILER_PATH points at a w64devkit MinGW toolchain under C:/raylib, which is the assumption that ties the template to a specific machine layout rather than to whatever compiler is on the path.

The PLATFORM variable is set to PLATFORM_DESKTOP, and the comment above it lists the other values the upstream makefile supports, PLATFORM_RPI, PLATFORM_ANDROID and PLATFORM_WEB. That list is the clearest sign of how the template could be adapted, since the makefile underneath is multi platform and only the variable values are pinned to Windows.

The header of the makefile also carries its own licence notice with the conditions about origin and altered versions, which is worth knowing if you redistribute the template.

## Why the DLLs are committed, and what that says about the target machine

The two DLLs at the repository root, libgcc_s_dw2-1.dll and libstdc++-6.dll, are the GNU runtime libraries that a MinGW compiled program needs at run time. Committing them is not standard practice for a game project, and it is the clearest single indicator of how this template is meant to be used: clone it on a machine that has a w64devkit toolchain at the expected path, build there, and run the produced executable next to those DLLs.

The upside is that the built binary works on another Windows machine without installing a toolchain, which is what you want when a student submits an assignment or a demo runs on a machine that is not yours. The downside is that the runtime DLLs are pinned to the toolchain they were taken from, and they are updated by hand whenever someone refreshes them. A template that says zero boilerplate friction also means the toolchain setup happened once, offline, by the author.

There is a related detail worth checking before you build. The badge claims support for raylib 4, 5 and 6, while the Makefile default is RAYLIB_VERSION 4.5.0 and RAYLIB_PATH points outside the repository rather than at a vendored copy. So the versions are supported in principle by the configuration, but nothing in the repository pins the raylib sources you will actually compile against.

The README also names a working directory requirement only implicitly, through the relative RAYLIB_PATH, which is the kind of detail that costs a beginner an afternoon if it is not set up as expected.

## Where this template is the wrong tool

The clearest wrong case is a platform other than Windows. The compiler path, the relative library path with backslashes, and the committed runtime DLLs are all Windows arrangements, and while the upstream makefile supports other platforms, this repository does not configure them. On macOS or Linux the honest path is to use the upstream raylib build for your platform and keep only the demo source from here.

The second wrong case is a real project with an existing build system. If your team already has CMake, a package manager, or a different IDE, a checked in VS Code workspace with a Makefile and two DLLs is clutter at best and a conflict at worst. The template's value is concentrated entirely in the zero configuration first run, which is worth nothing once you have a build you like.

The third is version drift. The repository publishes no releases, so there is no tagged version to pin a student assignment or a workshop to. You take whatever is on the default branch at the time you clone, and the last push was on 2026-04-25, so the copy you receive today is not necessarily the one someone described in a tutorial video.

The alternative approach, and the one the upstream raylib project supports, is to take the demo source and the upstream makefile for your platform, then configure the compiler yourself. You spend an hour on setup and you own the result, instead of inheriting a workspace tuned for one machine.

## Licence, activity and what the repository does not tell you

The template itself is MIT licensed, with the licence text in LICENSE.txt at the repository root. The Makefile inside it carries a separate notice, the zlib style permission text with the raylib author copyright, which says the software is provided as-is and requires that the origin not be misrepresented and that altered versions be marked as such.

That second notice matters if you hand the template to students or redistribute it: the makefile is upstream raylib code under its own terms, so keep the notice intact when you adapt it, and mark your changes. The DLLs at the root carry their own licensing from the GNU runtime distribution, which is a separate question from the template licence and is not documented in the README.

On activity, the repository is not archived, the last push was on 2026-04-25, and there are no GitHub releases, so there is no changelog and no version history to consult. The topics list names raylib, raylib-cpp, raylib-examples, raylib-game, raylib-vscode, template, visual-studio-code and vscode, which is the project's own description of what it is for.

What the README does not document is worth listing too. There is no stated raylib installation step, no explanation of the expected directory layout for RAYLIB_PATH, no description of the VS Code tasks, no mention of how the DLLs were produced or which toolchain version they match, and no troubleshooting section for a build that fails on a machine with a different compiler. The video tutorial is the intended answer to all of that.

## Conclusion

Use this template if you are writing your first raylib program on Windows with VS Code and want a workspace that compiles and runs without setting up a build by hand, and if raylib 4, 5 or 6 and Windows 10 or 11 match your machine. Do not use it as a base for a macOS or Linux game project, since the checked in compiler path and the DLLs at the repository root are Windows specific, and do not expect a maintained release stream, because the repository publishes no releases and the last push was on 2026-04-25. Before you start, confirm that a raylib distribution exists at C:/raylib/w64devkit/bin as the Makefile expects, check whether the default RAYLIB_VERSION of 4.5.0 matches the raylib version you intend to use, and read the .vscode tasks to see which build target F5 invokes.

## FAQ

### What is the Raylib C++ Starter Template for VS Code and who is it for?

It is a minimal C++ project scaffold for Visual Studio Code on Windows that includes a bouncing ball demo, pre-configured build tasks and the GNU runtime DLLs committed to the repository. It is aimed at someone writing a first raylib program on Windows 10 or 11.

### How do I run the raylib starter template in VS Code?

Double-click main.code-workspace to open the project, open main.cpp in the Explorer panel, and press F5 to compile and run. The workspace file carries the build tasks, so no separate configuration step is needed.

### Which raylib versions and platforms does the template support?

The README badges list raylib 4, 5 and 6 and Windows 10 and 11, and the feature table says it is tested on Win 10/11 with those raylib versions out of the box. The Makefile default is RAYLIB_VERSION 4.5.0.

### Why are libgcc_s_dw2-1.dll and libstdc++-6.dll in the repository?

They are the GNU runtime libraries a MinGW compiled program needs at run time, and committing them means the built executable can run on another Windows machine without a toolchain installed. The README does not document which toolchain version produced them.

### Does the raylib starter template work on Linux or macOS?

Not as configured. The Makefile pins a Windows compiler path at C:/raylib/w64devkit/bin and a Windows style relative RAYLIB_PATH, and the committed DLLs are Windows binaries. The upstream makefile does list PLATFORM_RPI, PLATFORM_ANDROID and PLATFORM_WEB as alternatives.

### What licence does the Raylib C++ Starter Template use?

The template is MIT licensed, with the text in LICENSE.txt. The Makefile inside carries a separate notice from the raylib author under zlib style terms, requiring that the origin not be misrepresented and that altered versions be marked.

## Sources

- [educ8s/Raylib-CPP-Starter-Template-for-VSCODE on GitHub](https://github.com/educ8s/Raylib-CPP-Starter-Template-for-VSCODE)
- [Issues](https://github.com/educ8s/Raylib-CPP-Starter-Template-for-VSCODE/issues)
- [License: MIT](https://github.com/educ8s/Raylib-CPP-Starter-Template-for-VSCODE/blob/main/LICENSE)
- [README](https://github.com/educ8s/Raylib-CPP-Starter-Template-for-VSCODE/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/educ8s-raylib-cpp-starter-template-for-vscode
