2024's small template to start your raylib game. Featuring 3D, C 2017, Raylib 5.0, OpenGL 3 and a modular architecture.
Big thanks to Raysan5 for his amazing lib. โค๏ธ
- ๐บ Render: PostProcessing Bloom, AA MSAA, Texture Filtering
- ๐บ Lighting: World Lighting, Player Lighting, Player Shadows
- ๐บ Meshes: Meshes, Textures, Shaders, Materials
- ๐บ Sky: Color, Cubemap, Fog
- ๐ฅ Camera: ThirdPerson, Follow
- ๐ฅ Animation: Character
- ๐ฎ Input: Keyboard, Arrows, Gamepad Input, F1 Console
- ๐ฎ Control: Tank control
- โ๏ธ Simulation: Tick Systems
- โ๏ธ File: Scene JSON format
- ๐ฆ C++ 2020 / C 2017
- ๐ฆ RayLib 5.0
- ๐ฆ OpenGL 3.30
Repository layout:
โโโ assets
โย ย โโโ resources
โย ย โ โโโ images
โย ย โ โโโ scene.json
โย ย โโโ src
โย ย โโโ player.blend
โโโ docs
โโโ infra
โโโ lib
โย ย โโโ raylib-5.0_win64_msvc16
โย ย โโโ winmm-10-win64
โโโ platform
โย ย โโโ engine
โย ย โโโ game
โโโ standalone
โ โโโ desktop_win64
โโโ tools
ย ย โโโ blender
ย ย โโโ ci
CMake:
- Download the
v3.28.3release ofCMakeat http://www.cmake.org/download/. - Pick Windows (
Windows x64 Installer). - Run the installer
- When asked for, select
Add CMake to the system PATH for all users. - Run software installation...
Visual Studio:
- Download the
Communityversion ofVisual Studio 2022release of Visual Studio at https://visualstudio.microsoft.com/downloads/ - Run the installer...
- Run software
Visual Studio Installer - When asked for, click on
modifyunderVisual Studio 2002 - Select
Desktop development with C++(contains MVC package) - Click on
modify
PowerShell:
cmake -S "." -B "build" -G "Visual Studio 17 2022"- Pros: basic, no Editor, CI friendly.
- Cons: manual actions intensive.
.\tools\ci\install.bat
.\tools\ci\dev.bat
# OR
.\tools\ci\release.bat- Pros: better integration, 1 step compile+debug.
- Cons: very laggy UI, bad search tools.
.\tools\ci\install.bat- Pros: better code editor, lightweight.
- Cons: 2 steps compile+debug
.\tools\ci\install.bat
.\tools\ci\watch.batRun (press Ctrl+F5, or Menu > "Run" > "Run without Debugging")
Debug (press F5, or Menu > "Run" > "Start Debugging")
- download latest Raylib release https://github.com/raysan5/raylib/releases
- extract raylib-5.5_win64_msvc16 to /lib folder
- download latest Raylib release https://github.com/raysan5/raylib/tree/master/examples/shaders/resources/shaders/glsl330
- copy files \assets\resources\shaders\glsl330
- download latest rlights from https://github.com/Bigfoot71/rlights
- copy rlights.h to /lib folder
- run
.\tools\ci\install.bat - run
.\tools\ci\dev.bat
Installation:
- Download io_scene_m3d.py
- Start Blender
- Go to menu, "Edit" > "Preferences..." > "Add-ons" tab > "Install..." button
- Browse and double click on the downloaded file
- On the "Add-ons" tab, search for "m3d"
- Click on "Enable Add-on."
- Now in the menu, "File" > "Export" > "Model 3D (.m3d)" (and eventually "File" > "Import" > "Model 3D (.m3d)") should appear
Get 3D Models:
- Start WebBrowser...
- https://www.mixamo.com
- Click Characters
- search "X bot"
- Click Download
- Check Format: fbx, pose: t-pose
- Click Download
- Start Blender...
- Go to menu, File > New > General ...Delete Cube
- Go to menu, File > Import > FBX > "X bot.fbx"
- Click on the "Texture Paint" tab > click "new" > type "X_bot_diffuse"
- On right side panel > click "material" > "base color" > "image texture" > select "X_bot_diffuse"
- Go to menu, File > Export > M3D > scale: 2.0 > "X_bot.m3d" > Export
Get 3D Animations:
- Start WebBrowser...
- https://www.mixamo.com
- Click Animations
- search "Slow Run"
- check "In Place" box
- Click Download
- Check Format: fbx, Skin: with skin
- Click Download
- Start Blender...
- Go to menu, File > New > General ...Delete Cube
- Go to menu, File > Import > FBX > "Slow Run.fbx"
- Click on the "Animation" tab > click "editor type icon" > "non linear animation" (new channel editor)
- click "push down action" (new channel)
- Go to menu, File > Export > M3D > scale: 2.0 > "Slow Run.m3d" > Export
Cause: Blender export changes materials indexes (start with 0 or 1) and lighting shader needs to be applied to real material.
*.obj,*.iqmformats: usematerial[0]*.m3d,*.glbformats: usematerial[1]
Condition: GPU: RTX-2060, CPU: i5-9600K, RAM: 32 GB
- Raylib (GL3) "High":
~2500 FPS(AA4x, PostproBloom) - Raylib (GL3) "Low":
~3000 FPS - Unreal (DX12) "Low":
~150 FPS(Settings=Low)
It's JSON, with structure similar to Godot YAML *.tscn files.
- C
- CMake
- Monorepo
- VS Code
- Raylib
- Quality
- Model3D Format
- C Libs
There are several games made with raylib to highlight:
- Hare136: https://play.google.com/store/apps/details?id=games.haremonic.slider
- SideStep Legends: https://store.steampowered.com/app/2077590/Sidestep_Legends/
- Pure Logic: https://store.steampowered.com/app/1861500/Pure_Logic/
There are also many small games (and tools) made with raylib on itchio: https://itch.io/c/380928/made-with-raylib










