I want to build a 3D video game engine.
Why?
As a personal, educational exercise worked in on spare time. This therefore means that there is no serious production goal or hard deadlines. With that said, I do intend to make some basic games on the way, and reach a point where something somewhat complex can be made with it in a couple of years.
Sharing this journey provides a means to keep myself accountable and to have a record of my progress, as well as an exercise in writing and communication. Trying to explain something to someone else is a great way to deepen the understanding.
How?
The Engine will be written in Rust, to leverage Rust's ownership and ergonomics, but also because I don't like working in C++ (so far). The high-level architecture will involve a number of loosely coupled crates within a root workspace, they will communicate via handles and ECS.
Initially, I thought of working with Vulkan directly to really get into the weeds, but every time I tried, it felt like trying to learn to dive by going to the deepest place possible. Therefore, I will work with wgpu
and winit
, which are nice abstractions that will simplify multiplatform support as well.
For a feature rich version, the timeframe is long, but nonetheless, I made a basic feature plan. I want to be pragmatic about it, which means that the core features will be built in a reasonable order, and thereafter, things will be added as needed.
High-level feature plan
Foundation
Get the workspace setup and basic windowing up and running. Configure wgpu
/ Vulkan instances and start rendering frames, go as far as clearing the whole window with a solid colour.
Core Rendering
Start handling basic shader compilation, make sure the timing system and resource management work as expected, and get things ready to have a usable render abstraction layer that can be used in a more complex render pipeline later.
Systems foundation
Get ECS (probably bevy_ecs
) setup and working, handle basic input, and finally handle rendering textures and load 3D models.
First Playable
This milestone is here to have a basic game working and to serve as a thorough validation for all things built up until now (although there will be working demos and examples for those as well).
Moreover, implement basic scene management, configure a physics integration (probably via rapier
) and finally get a game prototype working.
Extra features
Fanciful features, a basic lighting system, and audio integration and a more robust / complete Debug UI or minimal editor.
Performance and Tools
Get serious about profiling and improve the debug tooling. Get a basic asset pipeline working.
Maintenance and Improvement
Continuous improvement, this is an ongoing milestone. Improve error handling, fix bugs and simplify / abstract where necessary (if not done already).
On Demand
This is not really a milestone, but a pool of optional features that might be added as needed when building games. It will probably include
- Networking
- Terrain systems
- Level editors
- Post processing effects
- Particle system
- Animation system
- Possibly PBR at some point
If you're interested, keep a tab on this space and see you soon!