britown

Creative-Type Impersonator

🌸请别在工作死🌸


I sometimes like working on never-to-be-finished video game projects


Right now I'm making a game called Chronicles.


Wanna make a game? Here is a list of great C++ libraries to use.


I maintain a Letterboxd in much the way that I assume people maintain bonsai trees.


This is Owen:
Owen
And this is Molly:
Molly
Furthermore, this is Max:
Molly

I used to be really dogmatic about handcrafting every single component of a game from physics engine to platform modularity under the auspices of learning new things but the truth is that I really just hated CMAKE and would rather get a root canal than integrate giant bloated dependency chains.

Thing is there's a lot of nerds who feel the same way and there's a ton of just fantastic enormous solutions to common game problems that are zero-dependency or header-only.

  • SDL2 - Didnt feel the need for this to be here because it's obvious but it's good! You can use the prebuilt binaries or else if you're using visual studio you can drop the existing project vcproj files directly into your solution and build it alongside your app!
  • ImGui Single-handedly revolutionized how I develop native applications. Works with whatever back end or render library you want, has a ton of support. I actually kind of want to write a blog post about building a game inside ImGui's drawlists, maybe someday!
  • STB - These are public-domain single-file C++ libraries that do everything from STL structure replacements to waveform synthesis. Perlin noises, tile map editors, voxel renderers, you name it. I particularly use stb_image everywhere in all of my code because decoding image formats is a capital-N Nightmare.
  • Single File Libs This is a great index of single-file libraries
  • Recast Navigation Hugely useful and powerful 3D navigation/pathfinding library. It has a Viewer tool that is really impressive!.
  • GameControllersDB This crowdsourced text file loads into SDL to translate all the different scancodes from any gamepad you can think of.
  • cpp-httplib Tiny, perfect little http requests library with a good API. Pair with stb_json or tinyjson!
  • RayLib A ton of games-centric components for getting you up and running with making games! Has great Premake scripts that get you up and running with a project super fast, and can be used as the basis for your own engine. (Thanks @BrodyBr)
  • Soloud A simple portable C++ audio engine by @sol-hsa
  • Sokol An SDL2 alternative for cross-platform game development with STB-style components! (Thanks @heart-full-of-skye)
  • Box2D Venerable 2D physics Engine. Physics is something that can sink a project unless you really like math, Box2D has been around a long time! The readme has cmake and dependencies and all that but it's all for the testbed application, you can drop the source and include files into any barebones build and it'll build with no fuss!
  • Bullet 3D physics engine, same deal as Box2D, source drops into any project easily.

Tell me some more libraries like this in the comments and I'll add them!


You must log in to comment.

in reply to @britown's post:

If you all haven't used Raylib, it is a really nice collection of zero/low-dependency C libraries for making games. Has great Premake scripts that get you up and running with a project super fast, and can be used as the basis for your own engine.

https://github.com/floooh/sokol
Sokol is a wonderful collection of single header libraries that collectively fill a similar role to SDL:

  • graphics API
  • OS window
  • Input handling
  • and much more!

They even have a very slick ImGui integration!


Speaking of, Dear ImGui changed my life:
https://github.com/ocornut/imgui

Wonderful minimalist immediate mode UI framework. Native C++ but with integrations across many languages and frameworks.

Pair with this FOSS icon font for a huge and easy to use library of icons:
https://github.com/juliettef/IconFontCppHeaders

Idk if it fits here but I really like dos-like. It's purposefully made very easy to build, and it has loads of nice things integrated, and I'm not just saying that because I helped with a tiny fragment of it. Also it's made up of a bunch of single-file headers with permissive licenses so you can actually just like, pick and choose the parts you like and take 'em out and put 'em in something else entirely.