3 years into development of my custom game engine
5.7.2024
Technically at the time of release, this is a bit beyond 3 years of development, but I digress. Before we jump
into a lot of backstory and
talk about where we've come, let's address the elephant in the room.
The repo was officially created on 2.28.2021.
That's right - my game engine has been in development for over 3 years, and we haven't yet released a game on
it. Sounds bad, right?
It sure does. But, there are several important things to bear in mind when talking about the timetable:
-
I work on Kohi part-time. This is probably the single most important thing to factor in
when talking about the timetable.
I do hold a full-time job during the day, and also have many other responsibilities outside that and Kohi
(familty time, house maintenance and
projects, etc.). On average, I'm able to log less than 20 hours a week of work on the game engine itself.
The time factor won't ever be able to change
without me being able to go full-time on it, which I have neither the community following nor the capital to
do. I'm fine with this, but it is what it is.
Some of this is also immutable, such as my responsibilities with my family and home, etc.
-
Streaming isn't really dev time. I mean, it is, but not completely. I interact with chat a
lot, which I love, and chat seems to appreciate.
I don't have any intentions to change this. But it should be noted that it does impact the time I have to
actually get things done. It has the tradeoff of
spreading the word about the engine, keeping in contact with the community who will eventually use it, and
of course having fun along the way. I refuse to change
this as I believe it's the most important aspect of the project.
-
Explanation takes time.Another part of this that's true of both the beginning of the series
in tutorial format all the way up through live-streaming is
that explaining things along the way takes time. I'd probably be more than twice as far with this if I were
just developing it without explanations, video editing, live-streaming
the explanations and/or writing up articles such as this one. The tradeoff here is that the series wouldn't
have much value if I didn't explain what I was doing and why - that's
basically the whole point of the series after all.
-
Maintaining social media takes time. Editing all the Youtube shorts videos I release takes
time, but seems to be helping massively with exposure.
It's a cost to dev time, but it's a cost I feel is very much worth it in exchange for getting the word out
about the project. If things grow past a certain point, maybe
I'll be able to hire an editor to do this for me at some point. At the moment it wouldn't pay off to do so
though.
-
Tech debt This is a big one. Due to the way things needed to be structured in the beginning
to make things in small chunks and digestible, a lot of
technical debt built up over the last 3 years. We also tried some things out as experimentation (for
educational purposes) which later had to be refactored and/or removed.
This further added to that debt. That bill has now come due, and must be paid. Much of this would have been
avoided if it weren't for the educational nature of the series.
Again, this is worth it, but there is a cost.
If I were to take all the collective time I have spent over the course of this project, it's probably somewhere
close to around 8 months of full-time development. If I were to factor
out the experimental bits of code, we're probably looking at more like 6 months. The progress we have made in
that time, in my opinion, is quite substantial.
Since the last article on this subject, we have accomplished quite a lot.
Here's a small highlight sampling of
some of the commits that have been made:
- Refactor/xform scene (setup of scene hierarchy and refactor of transform system)
- v0.6.0 release
- Feature/pbr (Addition of PBR pipeline, removal of Phong lighting model, also includes shadow maps and
cascaded shadow maps)
- Standard UI - began the scaffolding of a standardized UI system with standard controls, buttons, etc. (Still
WIP, but started)
- Feature/audio (Yep, we added audio - this includes 3d spatial audio)
- Feature/mipmaps (adding mipmapping)
- Added runtime shader compilation. Removed post-build process as a result. (build system improvements)
- Feature/rendergraph (The first iteration of a rendergraph)
- Feature/wireframe (wireframe view support)
- Created frame allocator interface, hooked up interface in various places. Also minor peformance tweaks.
- Feature/viewport (support for multiple viewports)
- Allow dynamic changing of winding direction.
- Feature/editor gizmo (in-world gizmo to manipulate transform/rotation/scale of selectable objects)
- Feature/raycast (scene raycast for object selection)
- Grids and boxes (debug shapes)
- Material Redux and Terrains (modification to materials to allow terrains/mixed materials)
- Feature/simple scenes (simplified scene container for meshes, lights, skybox, etc.)
- Feature/hot reloading (of game code)
- Feature/plugins (first pass at changing the renderer to a plugin)
- Feature/systems manager (since removed)
- Feature/kvars (global vars that are accessible in the dev console)
- Feature/console (dev console, hookup of logging to console, etc.)
- KSON (custom text-based, hierarchical storage format)
This is by no means an exhaustive list. You can see a list of filtered commits here, including the lastest
in-progress version branch here. Note that the TODO.md file in the repo also lists a lot of this.
Where we are now
At the time of writing, Kohi is undergoing a pretty substantial refactor effort to pay off some of the
aformentioned debt. We've spent about 10 streams on it,
and I believe there will be a few more to get through it the rest of the way. It's a collection of all the work
that's piled up and has been largely ignored
over the past 2-3 years, and needs doing before we progress any futher. We've added a lot of features, and the
more features that we add, the harder this
refactor effort becomes. Therefore I have decided to break now and complete this.
The refactor centers around changes required to make the rendergraph more flexible and configurable (complete
with automatic dependency resolution between noes).
It also is an effort to refactor our 3 current plugins (Vulkan renderer, audio plugin, and standard ui) to fit
into a new standard plugin interface/system versus the
current ad-hoc way of doing it. Additionally, this will enhance the application config to utilize KSON to
configure systems, plugins and even the rendergraph itself.
Some links: