HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
RandyGaul
cute_headers
C2019–2025
RandyGaul / cute_headers

cute_headers

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

7Distinct people
9Mentions
0Explicit recommenders
5.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2019-03-10 00:31:55 UTC to 2025-02-08 22:37:54 UTC.

01232019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC211
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC312

What Hacker News says

9 sources
I was just taking a look and couldn't help but notice the switch statement for your operator[], which likely causes a lot of unnecessary bad speculation at runtime: https://github.com/RandyGaul/cute_headers/blob/755849fc2819d... I fixed this exact problem in a highly used library in high energy physics: https://gitlab.cern.ch/CLHEP/CLHEP/-/commit/5f20daf0cae91179... Many believe the C++ compiler will magically optimize the switch away, but in some cases, like the example above for CLHEP, it doesn't happen, so you end up with bad performance.
In Collection of one-file C/C++ libraries with no dependencies, primarily for games
BTW, the basic idea of keeping a texture atlas that contains a cache of the most used render elements isn't really that novel. It has already been done way before in the past by game engine devs who were trying to create 2D sprite renderers that automatically batch sprite textures to save draw calls (on runtime without any preprocessing step). Some examples I could find: - https://docs.cocos.com/creator/2.4/manual/en/advanced-topics... - https://github.com/mattdesl/gl-sprite-batch - https://github.com/RandyGaul/cute_headers/blob/master/cute_s... It's a simple and relatively straightforward approach that a sufficiently bright programmer would come up in their own while looking at the design constraints though, so overall I find it a bit meaningless to find the ultimate person for the "original idea".
In How many colors are too many colors for Windows Terminal?
The verdict for indie developers (not using Unity/Unreal) seems: just bite the bullet and license FMOD (or Wwise or any of the popular proprietary audio engies). I was actually searching for a good open-source audio library to use, and found out that my options aren't that good. SoLoud is a pain in the ass to install and integrate into an existing codebase, and OpenAL doesn't have any good implementations available (either proprietary or LGPL). I'm now just using a simple single-header audio library in cute_headers (https://github.com/RandyGaul/cute_headers/blob/master/cute_s...), but will probably switch to MiniAudio once the high-level API is finished (https://github.com/mackron/miniaudio/issues/196)
In How does a game engine work? an overview (2016)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.