Note: Github: https://github.com/brandonchui/engine2
Overview
Engine2 is an experimental game engine built on top of The Forge API. Since this is maybe my 3rd engine or so (all tiny ones), I want this project to be more usable. Meaning, making the API cleaner in terms of developer experience, and ensure that cross platform support is there.
The name behind Engine2 is nothing that special, my other previous engines were just called Engine and Engine1 and I'm a bit too uncreative to come up with a meaningful name, hence Engine2.
Why The Forge?
Initially, I came across The Forge from various blogs around visibility buffers, and after going through the open source code of their engine framework, I figured it would be a good API to try out. At first, the lack of documentation was concerning, but the unit tests that are provided are very comprehensive and can get you results quickly. The library is very C - like, which is a plus for me. In addition, the graphics interfaces are similar to modern graphics API, which I am also using in another renderer project I am working on. Since The Forge has been used in many places in the gaming industry, I figured that it will be a fun learning experience.
Development
I want to build out some small games as part of creating the engine to see how the a game development's point of view might look like when using the engine API. My first small initial game was Pong. As such with any modern graphics API, there is a lot of boiler plate that is expected, and The Forge API is the same here. I experiemnted with keeping the engine side of things solely with the backend behaviors of the core engine fundationality, in other words, having a game developer worry about dealing with descriptors or swapchains is a no go.
In favor of still giving game developers some room an flexibility, I am trying to utilize the flecs library to give developers a way to create their own systems and components to use. The engine provides a standard set of components, like transforms already.
At this stage, all features are quite malleable and could change at any moment, so concrete thoughts will not be said here. But I do know there are some features that I want to add that are high priority.
Features
There are many 2 features I know I want to have for this engine project.
Lua scripting
I probabily will not keep the developer experience purely lua, but a combination of both C++ and Lua. I still believe that fast iteration and prototyping is key to game development experience. Lua allows hot reloading easily so testing certain features and mechanism of a game will be way easier then going with a complete C++ solution.
No full 3D
By full 3D, I am talking mainly about having a complete PBR ray trace Unreal Engine like experience. I plan on keeping everything relatively 2D, and even though support for 3D will be made, I don't think I will add any features (by default) that will be a "3D game" experience. In the future, maybe, but I need to get more comfortable working with rigs and animation and physics systems first, since I only scratched the surface on these more niche topics at my universitie's game engine course.
Challenges
My previous experiments with engines were very feature first heavy. In other words, I just went to the trusty Jason Gregory book and tried to implement as many things as possible without consideration of actually creating a usable game.
It is easy to get caught up with checklist of "things I need in my engine" like:
- Windowing
- Graphics
- Math library
- Event system
- Custom container
- Custom memory
- Scripting languages
- Networking
- Serialization
- Asset management
- Profiling
- etc
And then start to implement each one of those and forgetting the point is to use this engine to create a game. Maybe it is just me, but I am striving to creating something that is usable! But I have no regrets falling into this path previously since I did learn a lot from it and how engines work in general.
Next Steps
Development will be an on going process along with my 3d renderer project. I am having a lot of fun doing these projects and I will definitely be working on them for a long time to come. Right now, my "quick wins" for the engine project is getting a sprite batching system working, and perhaps a tiny physics system hooked into the engine level ECS system. I am still experimenting with flecs observers and seeing if it can replace a more traditional event bus way of doing things, but for right now getting textures working properly is key.