Skip to content
@cpp-toolbox

cpp-toolbox

cpp-toolbox

A collection of repositories which use eachother to build up more complex programs.

The goal is to stop writing same code, and doing it in a slightly different way each time, but rather improve the quality of existing code.

Most of the content will be taloired for game development so there will be examples of sound, physics, etc...

The code should run on on windows, mac and linux, with an emphasis on linux first as anyone with a computer can get linux, but not everyone can afford windows or mac.

Anyone is welcome to contribute, but it's best to join the discord server first to chat about what changes you are looking to make, also feel free to join if you're having trouble with anything.

NOTE: Before you do anything else, read this article to understand why the structure is the way that it is

Projects

The projects in this repo should do one thing well, and only do that, try not to have multiple goals when creating new projects in this organization.

All projects use submodules to facilitate the integration of subprojects, subprojects need to be setup to link to eachother using sbpt, for managing external libraries we use conan so install it on your system and follow their docs for preliminary setup on how to generate a profile before you run any conan commands.

First cd into the root of the project, then:

# get all subproject content
git submodule update --init --recursive

# generate dynamic includes to linked subprojects
cd sbpt
python sbpt.py initialize ../src
cd ..

# install required packages
conan install . --build=missing

# generate build system and then build
cmake --preset conan-release
cmake --build --preset conan-release

cd build/Release
# now run the executable

From there run the executable, note that if you try running the executable from anywhere else it will probably fail because it depends on paths of resources being relative to this folder, which may be fixed in the future.

If you are looking to develop existing code, note that we use a consistent style guide to keep things organized, we use clang-format for this, to populate the project with the correct settings, go to the root of the project and do:

cd clang_formatting
./create_symlinks.sh

Sub Projects

Anything denoted by SUBPROJECT is a repository of files, which probably will not work on it's own, but is to be used in a larger application, there are 50+ repositories here so listing them out would be too long, instead read about how to interact with them in the tools section

Minimal Working Examples

Along with these SUBPROJECTS we also have some minimally working examples that use the subprojects:

tools

Every project here uses conan for package management, due to that you usually have to run the command cmake --build --preset conan-release a bunch, which is tiresome, and while you can go back in your terminals history I wanted a more robust way to deal with this, as a cherry on top when compilation finishes there is a success or fail sound so you can stop staring at the build process and continue working in the mean time.

When subprojects use other subprojects you usually have to hard-code includes to those locations which differ based on file structure, therefore this script was created to fix this issue.

IDE's have a lot of features, but language servers are catching up, one feature that's nice that a language server doesn't have right now is simply creating new .cpp/.hpp pairs for a new class or file you want to make, this generator does so.

When working with a cpp-toolbox project there are usually four main things you want to do

  1. build the program
  2. run the program
  3. debug the program
  4. use git

the editor configurtion repository tries to facilitate those needs in a simple manner for whatever editor that the developers currently use. Since I use neovim then I have those configurations there to start neovim with these terminals opened (in buffers) run python scripts/editor_configurations/launch_nvim.py or from a running instance of nvim :source scripts/editor_configurations/cpp_terminal_autostart.vim.

Making new cpp projects can become tiresome, setting up the required files takes time away from coding, but in our context we have to be able to make a lot of different projects for testing purposes and the creation of mwe's therefore this script helps manage that process to be much faster than usual

When you're working in projects mainly composed of submodules, then when you make various changes around the project you'll notice it takes a longer time to commit those changes because you have to visit each submodule seperately and give it their own commit, while this is fine, the moving around part and figuring out where you need to go part is tiresome, this script fixes that.

When you're building up new projects you'll find that adding submodules can be cumbersome, in order to know what submodules you have you have to look at the web interface go to the project, copy the clone url and so on, this script solves this by providing a command line interface to list and select submodules automatically.

Popular repositories Loading

  1. mwe_sound_world_with_character mwe_sound_world_with_character Public

    3d world with controllable character with positional sound using openal-soft

    C++ 2 1

  2. mwe_glfw mwe_glfw Public template

    a minimal working glfw example to build from

    C++ 1

  3. mwe_font_rendering mwe_font_rendering Public

    C++ 1

  4. mwe_physics_world_with_character mwe_physics_world_with_character Public

    minimal working physics world with character controller using jolt physics

    C++ 1

  5. mwe_networking mwe_networking Public template

    A simple networking example using enet

    C++ 1 2

  6. physics physics Public

    SUBPROJECT

    C++ 1 1

Repositories

Showing 10 of 83 repositories
  • cpp-toolbox/equivalent_datatype_conversions’s past year of commit activity
    C++ 0 0 0 0 Updated Nov 3, 2024
  • multiplayer_physics Public

    SUBPROJECT

    cpp-toolbox/multiplayer_physics’s past year of commit activity
    C++ 1 0 0 0 Updated Nov 3, 2024
  • cpp-toolbox/shader_standard’s past year of commit activity
    Python 0 0 0 0 Updated Nov 3, 2024
  • physics_debug_renderer Public

    SUBPROJECT

    cpp-toolbox/physics_debug_renderer’s past year of commit activity
    C++ 1 0 0 0 Updated Nov 3, 2024
  • vertex_geometry Public

    SUBPROJECT

    cpp-toolbox/vertex_geometry’s past year of commit activity
    C++ 0 0 1 0 Updated Nov 3, 2024
  • batcher Public
    cpp-toolbox/batcher’s past year of commit activity
    Python 0 0 0 0 Updated Nov 3, 2024
  • .github Public
    cpp-toolbox/.github’s past year of commit activity
    0 0 0 0 Updated Nov 2, 2024
  • cpp-toolbox/font_atlas’s past year of commit activity
    C++ 0 0 0 0 Updated Nov 2, 2024
  • scripts Public

    infrastructure script for working with cpp-toolbox projects

    cpp-toolbox/scripts’s past year of commit activity
    Python 0 0 0 0 Updated Nov 2, 2024
  • cpp-toolbox/build_notifier’s past year of commit activity
    Python 0 0 0 0 Updated Nov 2, 2024

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…