Skip to content

SamuelAsherRivello/raylib-cpp-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raylib C++ Project Template

This repo is ideal for new Raylib projects using C++ and Visual Studio Code.

Raylib is a simple and easy-to-use library to enjoy videogames programming.

Note: Raylib is low level and flexible. Its not a full game engine.

Read the full C++ Gaming — 01 — Overview Medium article about this repo.


screenshot

Image 1 - Raylib Programming Library

💖 Support

If you enjoy this content or you find it useful, please share it, and please add a Star.

stars - Raylib C++ Project Template



Table of Contents

  1. Getting Started
  2. Project Overview
  3. Project Details
  4. Resources
  5. Credits


Getting Started

Follow these steps to get started on your computer (e.g. Windows, Mac, Linux).

Setup Environment

  1. Install Prerequisites, all steps, including ...
    • Install Visual Studio Code & Extension(s)
    • Install C++ Libraries
  2. Open the command line
  3. Run each of the following command(s).
    • Run gcc --version
    • Run g++ --version
    • Run gdb --version
    • Run mingw32-make --version
  4. Optional: Any failures? Ensure each is in your Windows System Path Variables, watch this video, and repeat previous step(s)
  5. Done!

Setup Project

  1. Setup Environment per above
  2. Download this repo (ZIP or GIT). Unzip as needed
  3. Open Visual Studio Code & its Terminal Window
  4. Run each of the following command(s). Any failures? Repeat previous steps
    • Run mingw32-make setup
  5. Enjoy!

Build Project

  1. Setup Project per above
  2. Open Visual Studio Code and its Terminal Window
  3. Run each of the following command(s). Any failures? Repeat previous steps
    • Run mingw32-make bin/app && mingw32-make execute
  4. Optional & Recommended: Add keyboard shortcut
  5. Enjoy!

Edit Project

  1. Open Visual Studio Code
  2. Open Visual Studio Code's Explorer Window
  3. Double-click on the Main.cpp file
  4. Edit the Main.cpp file
  5. Repeat Build Project's previous steps
  6. Enjoy!


Project Overview

This repo demonstrates best practices for combining C++ technologies for game development using Raylib. Use cases for this repo include light-weight prototypes, educational projects, and commercial game development.

It is specifically for use in Visual Studio Code.



Features

Here is the status and roadmap of features.

Coding Standards Project Structure C++ IntelliSense C++ Compilation Hot Reloading Unit Testing CI/CD
raylib-cpp-project-template

Screenshots


screenshot

Image 2 - Editor Environment (File Explorer, Terminal, Code Editor)


screenshot

Image 3 - Runtime Environment (Game Window)

Structure

Documentation

  • ReadMe.md - The primary documentation for this repo
  • Raylib/documentation/ - More info specific to the project

Configuration

  • Raylib/Makefile - C++ build configuration file

Structure

  • Raylib - Main project folder
  • Raylib/src/assets/ - User-facing game assets
  • Raylib/src/scripts/tests/ - Add unit testing files here
  • Raylib/src/scripts/client/ - Add runtime files here
  • Raylib/src/scripts/client/Main.cpp - Main file for game logic. Do your work here :)

Dependencies

  • Raylib/vendor/ - Lists vendor as dependencies...


Project Details


Editor Tooling & Libraries

Name Description In Repo? In Steps Above?
Visual Studio Code Source code editor
Visual Studio Code C++ Extension IntelliSense, debugging, and code browsing
C++ Libraries Including compilers for C++
Raylib Simple and easy-to-use library


Raylib vs rBitrage

screenshot

This Raylib C++ Template Project is focused on Raylib, a simple and easy-to-use library to enjoy videogames programming.

However for more power, checkout rBitrage. rBitrage (aka "Arbitrage" aka "Bit Rage") is a custom C++ 2D/3D game engine built on Raylib.

rBitrage is easy to learn, easy to use, and hard to misuse.

How do they these major options compare?


Raylib
2D/3D
Game Editor Game Engine Actors Systems Lifecycle Camera Input Mapping Loader
rBitrage
Raylib


Resources

Here are some resources which may be helpful with C++ and game development.

Samuel Asher Rivello

Raylib


Credits

Created By

  • Samuel Asher Rivello
  • Over 25 years XP with game development (2024)
  • Over 11 years XP with Unity (2024)

Contact

License

Provided as-is under MIT License | Copyright ™ & © 2006 - 2024 Rivello Multimedia Consulting, LLC

About

Raylib C++ template for new projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages