2024's small template to start your raylib game. Featuring 3D, C 2017, Raylib 5.0, OpenGL 3 and a modular architecture.
- C++ 2020 / C 2017
- RayLib 5.0
- OpenGL 3.30
- Targets:
- Win64 (Windows)
- Linux
- SteamDeck (Windows/Linux)
- HTML5 (WebAssembly)
- Discord (WebAssembly)
- Graphics
- Render: PostProcessing Bloom, AA MSAA, Texture Filtering
- Camera: ThirdPerson, Follow
- Lighting: World Lighting, Player Lighting, Player Shadows
- Meshes: Meshes, Textures, Shaders, Materials, [ ] Texture tiling
- Sky: Color, Cubemap, Fog
- World
- Physics [ ] hitbox [ ] gravity
- Simulation: Tick Systems
- Scripting
- Console
- Animation
- Character
- Input
- UI: lauch screen, settings menu
- Input: Keyboard, Arrows, Gamepad
- Control: [x] Tank control, [ ] Third Person
- Other
- 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
CMake:
- Download the
v3.28.3
release ofCMake
at 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
Community
version ofVisual Studio 2022
release of Visual Studio at https://visualstudio.microsoft.com/downloads/ - Run the installer...
- Run software
Visual Studio Installer
- When asked for, click on
modify
underVisual 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.bat
Run (press Ctrl+F5, or Menu > "Run" > "Run without Debugging")
Debug (press F5, or Menu > "Run" > "Start Debugging")
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
,*.iqm
formats: usematerial[0]
*.m3d
,*.glb
formats: 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
)
- C
- CMake
- Monorepo
- VS Code
- Raylib
- Quality
- Model3D Format
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