A small C codebase / game engine combo, made from scratch with 0* external dependencies, made for game or app developers who love making things from the bottom up and learning low level programming.
The primary motivation behind this project was to get a better grasp of
graphics programming, game engine architecture, and the C language as a whole,
and also make a complete, easy to use, albeit highly opinionated framework / engine* for
anyone to make their games or apps with.
This project was designed trying to follow Handmade Hero's, or the Hidden Grove's philosophy of building something from nothing, with minimal libraries and tools.
The plan is to support any rendering framework and any operating systems, however, for now, rendering features are implemented mostly for Windows and OpenGL.
While I want to keep library usage to a minimimum, there are some thing I just won't code myself. This includes:
- Base Layer
- Context Handling
Getting information about the current OS, compiler and processor architecture. - Logging
Basic logging functionality, provided through macros for now. - Memory Management
Mememory management via static arenas. - Data Types
- Renamed Primitives
- Strings
- Hashmaps
- Math
- 2D 3D 4D Vectors
- 3x3 4x4 Matrices
- Quaternions
- Context Handling
- OS Layer
- File IO
'CRUD' operations with files, directories and general content. - Path Utilities
(windows 💀) - Time Utilities
- File IO
- Render Layer
- Camera
- Perspective Camera
- Ortographic Camera
- ... more rendering things, mostly specific to OpenGL for now.
- Camera
- Input Layer
- Check out the input layer readme.
- Draw Layer
- TOOD(calco): Start draw layer abstractions.
In all honesty, if your goal is learning more about low level programming, I would recommend making your own codebase, and maybe use this as inspiration / help whenever you need it.
Addendum: A rudimentary build.sh was added, following the exact steps
described in this document. You can just run and use that for now.
This project uses CMake as a build tool, with Visual STudio 2022 generators on Windows. Other generators should work, but if not, feel free to open an issue 👍 .
For those on Windows, due to troubles of getting vcvarsall on windows added to path automatically, you have to manually add the path to your C libraries in CMakeLists.txt.
Example path: C:/Program\ Files\ (x86)/Windows\ Kits/10/Lib/10.0.19041.0/um/x64/
Inside the root folder create a build directory, then, from within the newly created directory run:
cmake .. # Specify any other settings you want
cmake --build . # Specify any other settings you wantFor now, this does not copy the assets folder to the generated executables location.
Will be auto-generated via Doxygen in a later version, but considering the project is still under heavy development and hasn't even reached version 0.1, documentation is non existent.
The roadmap can be seen here, on Trello!
Distributed under the MIT License. See LICENSE for more information.
As I have already mentioned, the main inspirations behind this project are:
- Casey Muratori's Handmade Hero
- Ryan Fleury's Hidden Grove
Alongside them, other great codebases which were used as inspiration and help include:
- Pixel Rifts' C Codebase
- Mr. 4th Programming's Youtube Videos
- Randy's Resources Page
- All of Ryan Fleury's blog posts, can't link them all but they are highly valuable.
All libraries linked in tech stack!