Creating a Rust Game Engine: Part 0
Hello, welcome to part 0 of my blog on creating a game engine from scratch.
DEVELOPMENT
Subhro Acharjee
10/5/20244 min read

What is Game Engine?
A game engine is a software that provides game creators with the necessary tools to develop video games. Think of it like a toolbox for making games. It provides features like graphics rendering, physics calculations, and sound management. This means it helps create the visual aspects of the game, the way objects move and interact, and how sounds are played.
For example, if you’re making a racing game, the game engine would help display the cars and the track, calculate how the cars move and collide with each other, and play the sounds of the engines and collisions.
Game engines can save a lot of time and effort as they handle many complex tasks, allowing game developers to focus more on the creative aspects of the game like story, design, and gameplay. Some popular game engines you might have heard of are Unity and Unreal Engine.
Objective of the project?
The primary aim of this project is straightforward yet ambitious: to construct a fully functioning game engine from the ground up. The language of choice for this endeavour will be Rust, renowned for its memory safety capabilities in the realm of low-level programming. This project is anticipated to be a journey of intellectual growth and discovery. I have a profound interest in tackling intricate problems, and the creation of a game engine is undeniably one of the most challenging tasks currently present in the field. I am confident that upon completion of this project, my understanding of game engine operation will be significantly enhanced.
A secondary, but equally important, objective of this project is to foster a sense of community and shared knowledge among those who share my passion for such challenges. My hope is to provide them with comprehensive documentation or a detailed roadmap, potentially serving as a valuable resource for their own endeavors.
My Inspirations
A significant source of inspiration and guidance for this project is the esteemed YouTube content creator, 'The Cherno'. His informative videos have been instrumental in my early development career, assisting me in mastering C++ and fostering my ability to create. I intend to consolidate his wealth of knowledge and transcribe it into Rust, striving to provide the most accurate translation possible. As for the project's name, it draws inspiration from my favorite gaming franchise, the 'Horizon' series. This beloved franchise has not only provided countless hours of entertainment but also serves as a constant reminder of the captivating experiences that well-crafted game engines can offer.
My Process
For the past 3-4 years, I've been immersed in the world of application and backend development. During this period, I've acquired a fair understanding of various backend languages, with Rust being one of them. I'm embarking on this project with the hope that those who choose to follow this journey will bring with them a foundational knowledge of Rust and a few years of development experience under their belts. There will inevitably be instances where I won't delve into basic concepts such as threading, thread pools, and mutexes, operating under the assumption that these are already familiar territories for the audience.
It's important to note that my experience in game development is somewhat limited. My early academic years saw me dabbling in game creation, but this largely involved replicating existing code rather than innovating from scratch. Therefore, the journey from having minimal knowledge about game engines to building a fully functional one will undoubtedly be challenging. The challenge will be compounded by the fact that I won't be using C++, the primary language used in The Cherno's tutorial, which has been a significant source of inspiration and guidance for this project.
Despite these challenges, I'm committed to learning and growing through this process. Whenever I encounter obstacles, I plan to document the experience through various platforms such as my blog, Stack Overflow, and my YouTube channel. This documentation will not only serve as a personal reference but also as a guide for anyone who may face similar challenges in their journey. My aim is to publish a blog post and a video each week, although I must admit that maintaining this schedule consistently might be a challenge given my full-time employment.
The goal of this project is not to create something on par with giants like Unity or Unreal Engine. As a solo developer who enjoys coding in his spare time and creating unique projects, I'm well aware that constructing a game engine of that magnitude, even with a team, would take several years. Therefore, for the minimum viable product (MVP), I will focus on developing the following systems and their basic features, along with their test cases:
Entry Point: This is essentially the system's main loop or the code that manages everything post-launch.
Application Layer: This layer will handle the system's lifecycle, ensuring smooth operation from start to finish.
Event Manager Layer: Comprising a state manager that emits events upon any state change, and a messenger queue that communicates messages to all internal components, ensuring seamless coordination within the system.
Renderer: This is the game engine's rendering unit, responsible for generating the images that make up the game's visual aspect.
Abstract Render APIs: This is a set of APIs that will encapsulate the implementation of the graphic library. We will commence with OpenGL, a widely used and powerful graphics library.
ECS (Entity Component System): This is a design pattern where each object (Entity) in a game's scene has components with data or state. Systems use this data to decide how the entity behaves, providing a flexible and scalable approach to game development.
Physics Engine: A crucial component for any game, the physics engine dictates how objects in the game interact and behave according to the laws of physics.
File and Virtual File System: This system will manage the storage and retrieval of game data, ensuring efficient and organized access to necessary files.
As I navigate through this project, The Cherno's tutorial will serve as my primary source of information regarding system architecture. However, I am open to incorporating any additional valuable resources I discover along the way into my blog.
If you've read up to this point, I extend my heartfelt thanks for your support. Please find the tutorial references below. Your interest and support mean the world to me, and I look forward to sharing this exciting journey with all of you.