- Notifications
You must be signed in to change notification settings - Fork122
A small template to start your raylib game
License
raysan5/raylib-game-template
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
DISCLAIMER:
Welcome toraylib game template!
This template provides a base structure to start developing a small raylib game in plain C. The repo is also pre-configured with a defaultLICENSE (zlib/libpng) and aREADME.md (this one) to be properly filled by users. Feel free to change the LICENSE as required.
All the sections defined by$(Data to Fill) are expected to be edited and filled properly. It's recommended to delete this disclaimer message after editing thisREADME.md file.
This template has been created to be used with raylib (www.raylib.com) and it's licensed under an unmodified zlib/libpng license.
Copyright (c) 2014-2025 Ramon Santamaria (@raysan5)
When setting up this template on linux for the first time, install the dependencies from this page:(Working on GNU Linux)
You can use this templates in a few ways: using Visual Studio, using CMake, or make your own build setup. This repository comes with Visual Studio and CMake already set up.
Chose one of the follow setup options that fit in you development environment.
- After extracting the zip, the parent folder
raylib-game-templateshould exist in the same directory asraylibitself. So, your file structure should look like this:- Some parent directory
raylib- the contents ofhttps://github.com/raysan5/raylib
raylib-game-template- this
README.mdand all other raylib-game-template files
- this
- Some parent directory
- If using Visual Studio, open projects/VS2022/raylib-game-template.sln
- Select on
raylib_gamein the solution explorer, then in the toolbar at the top, clickProject>Set as Startup Project - Now you're all set up! Click
Local Windows Debuggerwith the green play arrow and the project will run.
- Extract the zip of this project
- Type the follow command:
cmake -S. -B buildif you want to configure your project to build with debug symbols, use the flag
-DCMAKE_BUILD_TYPE=Debug
- After CMake configures your project, build with:
cmake --build build
Inside the build folder is another folder (named the same as the project name on CMakeLists.txt) with the executable and resources folder.
In order for resources to load properly, cd to
srcand run the executable (../build/${PROJECT_NAME}/${PROJECT_NAME}) from there.cmake will automatically download a current release of raylib but if you want to use your local version you can pass
-DFETCHCONTENT_SOURCE_DIR_RAYLIB=<dir_with_raylib>
$(Your Game Description)
- $(Game Feature 01)
- $(Game Feature 02)
- $(Game Feature 03)
Keyboard:
- $(Game Control 01)
- $(Game Control 02)
- $(Game Control 03)
TODO: Show your game to the world, animated GIFs recommended!.
$(Developer 01) - $ (Role/Tasks Developed)$(Developer 02) - $ (Role/Tasks Developed)$(Developer 03) - $ (Role/Tasks Developed)
- YouTube Gameplay: $(YouTube Link)
- itch.io Release: $(itch.io Game Page)
- Steam Release: $(Steam Game Page)
This game 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. CheckLICENSE for further details.
$(Additional Licenses)
Copyright (c) $(Year) $(User Name) ($(User Twitter/GitHub Name))
About
A small template to start your raylib game
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
