2025-05-06 19:12:57 +10:00
2025-04-06 20:34:58 +10:00
2025-05-05 20:23:23 +10:00
2025-03-15 21:25:39 +11:00
2025-04-12 19:36:39 +10:00
2025-05-06 19:12:57 +10:00

# Gears Engine

A game engine started in a pursuit of improving at programming and learning more about the things I've always been curious about. The name is inspired by the paper written on the Final Fantasy 7 engine named "Gears" as it was one of the earliest things that made me curious about programming and technology.

This game engine is built with minimal libraries including no usage of libc except for within the file packer, which I will remove eventually.

It was mostly built in c99 with later changing to c23 for some features (embed directive, typed enums) but I will soon remove usage of these features and move it back to c17 for MSVC compatibility, choosing c17 for static assert functionality but otherwise the style being mostly in line with c99.

## Inspiration/Resources

I learned this style of programming primarily through Casey Muratori's series [Handmade Hero](https://guide.handmadehero.org/), I mostly picked up on the style from the earlier episodes and watched a couple of others at different points in the series as a way to learn about certain things or get ideas, though I think I have strayed somewhat from his style though the heart of it is inspired by the same core ideas.

## Current technical features

- No usage of libc outside of things like stdint.h, etc.
- Multiplatform (though the Windows side has fallen behind but will catch up soon)
- Vulkan renderer implementation, abstracted out in a way where it could be replaced with a different backend renderer
- Asynchronous Vulkan asset loading using pthreads and atomic operations using the c++11 memory model as defined [here](https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html)
- Very basic setup for an Immediate Mode GUI that so far only includes dragging boxes around and clicking buttons, functionality will be expanded on.
- Window creation
- Input handling
- Things like asynchronous features and memory allocation used through platform APIs (e.g. mmap/VirtualAlloc)
- Memory allocators including a Free List allocator and Arena allocator, with memory allocated primarily through arenas to avoid the pitfalls and downsides of the malloc/free style
- Math utility functions
- Asset packer to pack assets into a singular file which will be used to avoid constant accesses to the OS file reading functions
- And more (will be expanded on)
Description
A game engine
Readme 5.4 MiB
Languages
C 86.6%
C++ 5.9%
Shell 2.1%
PowerShell 2.1%
Batchfile 1.6%
Other 1.7%