C++ Gaming — 02 — Raylib Project Template
Hello! I am Samuel Asher Rivello, a professional game developer with over 20 years of game development experience. This series aims to share my learning journey with C++ gaming.
C++ for Game Dev
“Learning C++ gives you invaluable skills for game development.”
Raylib for Game Dev
Raylib is an open-source game development library that’s gaining popularity due to its simplicity, ease of use, and lightweight nature. It focuses on learning, education, and developing small-to-medium-sized games with fewer dependencies than traditional game engines like Unity or Unreal.
Key Features of Raylib:
- Minimalist API: Small API, easy to learn
- Cross-platform: Windows, MacOS, Linux, iOS/Android, Browser
- OpenGL-based: Raylib provides direct access to OpenGL, allowing for powerful rendering capabilities.
Raylib C++ Project Template
To get started with Raylib and C++, I’ve created a project template that streamlines the setup process. It includes all the necessary files and configurations to quickly compile and run Raylib projects.
Features
This template is designed with simplicity and ease of use in mind, making it an excellent starting point for C++ Raylib projects.
- Coding Standards — Follow guidelines, maintain consistency
- Project Structure — Organize files, directories logically
- C++ IntelliSense — Enable code completion, suggestions
- C++ Compilation — Configure build tools, optimize speed
Project Structure
The organization is simple to navigate and expand upon.
{root}
└── Raylib/
└── src/
├── assets/
└── scripts/
├── client/
│ └── Main.cpp
└── tests/
Best Practices
The template follows best practices. These techniques are accepted as being most effective. Checkout my video (Not C++ Specific) for more.
Getting Started
One of the major drawbacks of C++ game development is learning how to get started. It’s MUCH more complex than Unity, Godot, or Unreal. By far, the HARDEST part is step #1 below. Luckily for you, the template simplifies everything.
Download: GitHub.com/SamuelAsherRivello/raylib-cpp-project-template to get started!
Follow the official steps including:
- Setup Environment — Install prerequisites, check versions
- Setup Project — Download and initialize
- Build Project — Compile and run the game
- Enjoy — Now learn and create with ease!
When you build the template you will see it running in a new window.
Conclusion
This Raylib C++ Project Template serves as a fast and efficient starting point for your gaming projects. With C++’s powerful capabilities and Raylib’s simplicity, you have all the tools you need to create performant and engaging games.
Stay tuned for more articles in this series, where we’ll dive deeper into game development with C++ and Raylib.
Resources
🦜 Contact
- Samuel Asher Rivello has over 20 years of game dev XP. He is available for remote, contract hire as a game developer and game dev educator.
- Contact Sam today to say hi and discuss your projects!
📜 Articles
- C++ Gaming — 01 — Overview
- C++ Gaming — 02 — Raylib Project Template
- C++ Gaming — 03 — The rBitrage Game Engine