Well, it's a bit embarrassing that I only found time today to scroll through Reddit (to post this) and Steam Fest. Oh my god, so many games are launching, and they all look super fun and gorgeous. And yet here I am, posting my ugly little game. Ha ha haha
Ok, anyway, I put a lot of work into it, so I'm just gonna post it. I still feel like there's something special about it, haha.
About the 9 months: it really was 9 months, but not 8 hours a day. It's just a hobby. But I have to admit I made a lot of mistakes and learned a ton along the way. Here's roughly how it went:
- I started learning Rust at the beginning of this year.
- After 3 months, I wanted to build something with Rust. Since I come from a Unity/C# background, I decided to take what I'd learned from Unity and rewrite it in Rust. In other words, my own game engine.
- 2 months later, I finished my own ECS library.
- And the rest of the time, I threw myself into learning Vulkan. Oh god, it was a nightmare.
Vulkan was hard for me because:
- I knew nothing about the low-level rendering pipeline. Sure, I can write shaders in Unity, but building a render backend from scratch is a whole != WTF story !!
- There are just way too many systems, things to learn, to remember,etc
Don't ask why I didn't use Bevy. I did look at it! I read through their repo to understand how they use Rust and how they use generics. Oh man, it's so powerful! But early on I really struggled to understand PhantomData, and why impl ATrait for MyData<T> didn't work. Honestly, without repos like Bevy, I probably wouldn't have dared to build a game engine myself!
About a month ago, I finally stopped learning Vulkan. I stopped so I could learn how to make a game without the GPU, and boom, everything went super smoothly.
Back to feeling embarrassed, shy, and excited all at once. My emotions are kind of a mess right now. But I'm still posting this to let it all out...
I also used an LLM (Claude) to learn and look up docs about game engines and Rust. I admit Claude is really smart, it can do a lot of cool stuff, and the code quality isn't bad either. But no matter how good Claude is, I can't become a Master Super Senior Rust Game Graphics Programmer in a week or a month. There's no way I could understand everything it generates! Oh god! Maybe I'm just dumb, everyone else seems so talented, T_T... whatever. Right now I'm pretty hyped that I actually made something with Rust by myself, hahah.
So after the first 1-2 months of overusing AI, I went back to coding the old-fashioned way. Now the only habit I kept is asking Claude to find docs for me. I treat it like a super search engine.
As for the game in this post, it looks really simple, but behind it there's:
- An ECS library with work stealing and async tasks (I don't use them in this game yet, but back when I was working with Vulkan, I had to build async tasks for shader hot-reloading).
- A canvas: it manages its own fixed-size buffer for the whole screen, and automatically scales to fit the app window.
- Clipping techniques for drawing rects, lines, etc., so no compute is wasted when part of a shape is off-screen.
- Syncing between the monitor's refresh rate and the game's update rate.
- A math library. While building it, I finally understood 2x2 and 2x3 matrices for the first time.
- A small 2D physics library, built around simple functions for simple shapes like rects and circles.
- Input, time, etc...
And that's how I made this ugly, dumb little game. Thanks for reading! I hope the way I wrote this doesn't annoy anyone. I'm just a bit hyped right now, and then suddenly disappointed and discouraged, T_T...