Loading video...
Video Failed to Load
for years I've self-selected out of writing game engines from scratch because everyone says "it's too hard". but is it? This is my progress after 2 weekends of work. I use AI to explain me to topics I don't know, and then verify with online articles or youtube videos. 🧵
2,663,741 views • 1 year ago •via X (Twitter)
12 Comments

I think one of the reasons people think writing engines is too hard is that they imagine something like Unity or Unreal. but it's much simpler than that. For instance, here's my first implementation for directional lights. No editor, no scene-graph. I just change the values directly in the shader and the game reloads.

another question I often get is: "ok, but why not just use Unity? why reinvent the wheel". I can probably spend hours talking about that, but I'll just point you to this video 👇 DOTS is Unity's main project to deliver "ground breaking performance". It's been running since 2018. The engineers working on this project are incredibly smart (I know some of them). Still, a guy on the internet gets 4x the FPS and 9x less memory with a simple OpenGL implementation. Why? Main reason is that the guy that wrote the system from scratch doesn't have to deal with millions of lines of a 20 years old code base that needs to support hundreds of use cases and hundreds of thousands of customers. Turns out the easiest way to write fast software is to write less software.

My hope with this engine I'm writing is to reset the complexity required to make a game. First for my own game, and hopefully for many other games when the engine is open sourced.

If you're not learning AI in 2024, you're falling behind. Join 500,000+ readers and learn how to use AI in just 5 minutes a day (for free).

Yes, it is. You're barely scratching the surface with 3D transformation and simple lighting. This is relatively harder compared to other dev areas, but still the easiest part in the graphics journey which is well covered with blog posts and various web content. The more complex algorithms you add to rendering, the more complex your rendering pipeline gets, and once you start seeing the performance problems, you'll begin to understand why its hard. You'll need to master the language, hardware and mathematics all together to overcome some of the challenges that'll show up later in your journey, as opposed to getting something to render on screen. Doing it efficiently with an extensible architecture is where the hard part lies.

I understand that from reading this post it might look like I'm just starting out, but I've been in the industry for a long time, shipped multiple games. I agree that large scale game engines are very complex, my point with the post is that you can still write engine code specific to your game, and this isn't as hard as it looks. Also saying "making engines is hard" misses the point of how things evolve. Yes, writing a proper PBR renderer that supports global illumination is hard, but writing the pipeline for basic shading and pont lights is simple, and you can evolve for that.

Nice work but loading and rendering a single static mesh, and thinking you have any sense of what developing a game ENGINE means, just shows that you’ve got a long way left to go before giving anyone else advice,

it's true, I never worked on a commercial engine codebase. but I've shipped several games, including in UE4 with source access. I understand that large scale game engines are extremely complex and far ahead what I have here. My goal with the thread was precisely to say that you can write something much simpler for your own game, and doing this is "not that hard". goal was not to dismiss the difficulty of writing a large scale engine, but to incentivize people to build more from scratch.

The real problem is not how hard it is, but the amount of time it takes. To do it solo takes forever. I know because I am making one:

it does take more time, but you can strongly simplify your first game to get it out of the ground faster. For instance mine is something I believe I could do solo in about 2-3 months. Because these estimates are always wrong, I imagine is going to actually take me ~6 months. But still, it's an achievable target.

Doing the same thing. Using rust, I got a cross platform app to make a circle move around using the ash crate in two days. When I started I didn’t even know a single thing about graphics programming. Now I understand a bit, but need to find time to develop these skills farther.

building projects is the best way to learn. good luck! :)
