Tiny C games you can compile and run RIGHT NOW.
Tools and libraries are available for making cross-platform C games, but simple examples can be hard to find.
This project is an example of how you can get started making a game in C that will work on Windows, Mac and Linux.
A Tetris clone which is getting way too large. Cool animations, sound, controller support, multiplayer etc. This is too much for a "tiny" game so I'll be paring it down and moving the fully featured version to its own branch or repo.
The original tiny game. It's just Flappy Bird in only around 200 [normal] lines of code. So no dumb tricks, I hope :)
A Minecraft (Infiniminer?) clone with too many features once again. Dynamic lighting and overly complex procedural generation. Also needs to be simplified for this repo.
A top-down adventure game with an overworld and a dungeon. Very minimal, no ending. Too much procedural generation!
A quick hack to make Zel into more of a 2D platformer. Very rough around the edges. The intention is to add a simple level editor.
Anything that supports CMake should work. But here are some suggestions for various platforms:
-
Install Visual Studio (you can use the free Community Edition) Make sure to check the box for "C++ CMake Tools for Windows." This may be under "Desktop development with C++"
-
Install the Vulkan SDK (needed for the Vulkan headers and the shader compiler)
-
Open the tinyc.games folder in Visual Studio. It should detect the CMake config and set everything up
-
Use the play button to build & run, e.g.
blocko.exe
-
Install CMake and Vulkan-SDK (Depends on your system)
-
Create a build directory inside tinyc.games
mkdir build cd build -
Run CMake to fetch libraries and create build scripts
cmake .. -
Build!
cmake --build . # build all games cmake --build . --target=blocko # build only blocko -
Run, for example, blocko
./blocko
-
Install CMake. For example if you have Homebrew, run
brew install cmake -
Install the Vulkan SDK for macOS (provides MoltenVK, which runs Vulkan on top of Metal)
-
Create a build directory and generate an Xcode project file
mkdir build cd build cmake .. -G Xcode -
Open the project file with Xcode
After you're done playing an exhilirating demo game, open a .c file in your favorite text editor. You're now looking at the actual code you just ran. So feel free to tinker and run it with your changes. Or use it as a starting point for your own game!


