c99-raylib5-gl3-3dgame-starter
c99-raylib5-gl3-3dgame-starter copied to clipboard
2024's small template to start your raylib game. Featuring 3D, C 2017, Raylib 5.0, OpenGL 3 and a modular architecture.
3D Game Starter - C 2017, RayLib 5.0, OpenGL 3
:warning: WORK IN PROGRESS !!!
2024's small template to start your raylib game. Featuring 3D, C 2017, Raylib 5.0, OpenGL 3 and a modular architecture.

Content
- Dependencies
- Screenshots
- Features
- Install
- Usage
- Assets
- Resources
Dependencies
- C++ 2020 / C 2017
- RayLib 5.0
- OpenGL 3.30
Screenshots





Features
- Targets:
- [x] Win64 (Windows)
- [ ] Linux
- [ ] SteamDeck (Linux)
- [ ] HTML5 (WebAssembly)
- [ ] Discord (WebAssembly)
- Graphics
- [x] Render: PostProcessing Bloom, AA MSAA, Texture Filtering
- [x] Camera: ThirdPerson, Follow
- [x] Lighting: World Lighting, Player Lighting, Player Shadows
- [ ] Meshes: Meshes, Textures, Shaders, Materials, [ ] Texture tiling
- [x] Sky: Color, Cubemap, Fog
- World
- [ ] Physics [ ] hitbox [ ] gravity
- [x] Simulation: Tick Systems
- Scripting
- [x] Console
- Animation
- [x] Character
- Input
- [x] UI: lauch screen, settings menu
- [x] Input: Keyboard, Arrows, Gamepad
- [ ] Control: [x] Tank control, [ ] Third Person
- Other
- [x] launching screen
Repository layout:
├── assets
│ └── images
│ └── ...
├── docs
├── infra
├── lib
│ ├── raylib-5.0_win64_msvc16
│ ├── winmm-10-win64
├── platform
│ ├── engine
│ └── game
├── standalone
│ ├── desktop_win64
└── tools
└── blender
└── ci
Install
Windows
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"
Usage
CLI (pure CMake)
- Pros: basic, no Editor, CI friendly.
- Cons: manual actions intensive.
.\tools\ci\install.bat
.\tools\ci\dev.bat
# OR
.\tools\ci\release.bat
VisualStudio 2022 (IDE)
- Pros: better integration, 1 step compile+debug.
- Cons: very laggy UI, bad search tools.
.\tools\ci\install.bat
![]()
![]()
VSCode
- Pros: better code editor, lightweight.
- Cons: 2 steps compile+debug
.\tools\ci\install.bat
.\tools\ci\watch.bat
Run (press Ctrl+F5, or Menu > "Run" > "Run without Debugging")
Debug (press F5, or Menu > "Run" > "Start Debugging")
![]()
Assets
Pipeline
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
FAQ
Why Models are sometime unlit ?
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]

What about performance ?
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)


Resources
- C
- CMake
- Monorepo
- VS Code
- Raylib
- Model3D Format
References
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
