I would like to code games, but the issue is, I only get the algorithms down. I have a hard time creating the user interfaces. I have used Metal for Mac, but this is non-portable. I have considered OpenGL for Windows/Linux, but that is not recommended for Mac. I also use <unistd.h> for directory functions for saving game data. I would just use C++20 filesystem for this (no strong preference for C vs C++), but unfortunately I cannot use that with old versions of MacOS. What are some low-level, cross-platform frameworks suitable for games, in C and/or C++?

1 Answer 1


Hey I'm not sure if this fully fits your criteria for this, since you seem to be asking for a "game framework", "game API" and UI framework, and I'm not sure if you want one of them, any of them or all of them. I'm going with UI framework since that's what you said your problem was.

Have you looked at dear imgui? From the github:

Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline-enabled application. It is fast, portable, renderer agnostic, and self-contained (no external dependencies).

Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal and lacks certain features commonly found in more high-level libraries.

Dear ImGui is particularly suited to integration in game engines (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on console platforms where operating system features are non-standard.

It's cross-platform in the sense that you can choose many different 'backend' for whatever OS/whatever you're running it on.

I don't know how the backend setup process will be for C++, but I know that when I used it in rust it was relatively simple (once I figured out the docs, since they were designed for C++ not Rust).

Edit: Also might want to check out this similar question I want to start making a 2d game engine in C++ . One of the answers mentioned SFML, which I haven't used myself so I can't give you much advice on, but I think it's cross-platform too.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.