logoalt Hacker News

drnick1yesterday at 8:15 PM3 repliesview on HN

Literally thousands of games have been written in C, and all graphics APIs (OpenGL, Vulkan, DX) are C APIs, so it isn't weird at all. All major game engines are also written in C/C++.


Replies

pjmlpyesterday at 8:32 PM

Khronos APIs are C, DirectX is C++ exposed via COM or WinRT, Metal is Objective-C with C++ for shaders and Swift bindings, on Nintendo and PlayStation depends on which console generation you talk about.

indyyesterday at 8:58 PM

Additionally SDL3 is also C and the most recent version of the Box2d physics library was rewritten in C

jiggawattsyesterday at 8:19 PM

DirectX is C++ (technically a set of COM interfaces) and most game engines are also C++.

Unlike, say, Linux programming where C is the standard, almost all games have been written exclusively in C++ for a long time now, probably three decades.

show 2 replies