RandyGaul/cute_headers logo

RandyGaul/cute_headers

Free

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games

FreeFree tier
Type
Open Source
LinksX

About RandyGaul/cute_headers

cute_headers is a collection of single-file, cross-platform C/C++ libraries with zero external dependencies, designed primarily for game development. It includes libraries for 2D collision detection (cute_c2), networking over UDP with reliability (cute_net), parsing Tiled map exports (cute_tiled), loading .ase/.aseprite files (cute_aseprite), audio playback with OGG/WAV support (cute_sound), PNG loading/saving and texture atlas compilation (cute_png), runtime 2D sprite batching (cute_spritebatch), synchronization primitives and a task system (cute_sync), and TLS/HTTPS connection support (cute_tls). Each header is self-contained and can be included directly by defining an implementation macro in one translation unit.

Key Features

Single-file headers for easy integration into any C/C++ project
Zero external dependencies – no linking or third-party setup required
2D collision detection with primitives, manifolds, raycasts, and shape sweeps (cute_c2)
Networking library with optional reliability layer over UDP and built-in security (cute_net)
Efficient Tiled map loader for JSON format (cute_tiled)
Aseprite file parser for .ase/.aseprite files (cute_aseprite)
Audio playback supporting WAV and OGG (via stb_vorbis) with mixer and crossfade (cute_sound)
PNG image loading/saving and texture atlas compilation (cute_png)
Runtime 2D sprite batcher that builds atlases in memory (cute_spritebatch)
Synchronization primitives including read/write lock and threadpool/task system (cute_sync)

Pros & Cons

Pros
  • Cross-platform (Windows, macOS, Linux, etc.)
  • No external dependencies – drop-in and compile
  • Single-file headers simplify project organization
  • Covers a wide range of common game development needs
  • Each library is focused and well-documented with examples
  • Community support via Discord and Twitter
  • Open source with permissive license (MIT)
Cons
  • C/C++ only – not usable in other languages without binding
  • Limited to 2D graphics; no 3D rendering support
  • No built-in GUI or windowing system
  • Some libraries may lack advanced features compared to full frameworks

Best For

Building 2D games with collision detection and renderingImplementing real-time multiplayer game networkingLoading and displaying tile maps from Tiled editorParsing Aseprite sprite animation filesPlaying sound effects and music with crossfade in gamesLoading, saving, and creating PNG texture atlasesEfficient high-performance 2D sprite rendering without precompiled atlasesMultithreaded task scheduling and synchronization in game engines

FAQ

What's the point of making a single file?
Single-file headers are easy to integrate; you just drop them into your project and include them. No complex build configuration or dependency management is required.
How do I use these headers?
Include the header normally. To define the implementation, define a LIBNAME_IMPLEMENTATION symbol in exactly one .c/.cpp file before including the header.