August 9, 2014
For several weeks now I've been working on a 3D game library called stardazed.
“Yet another 3D game engine? Just use Unity or subscribe to the newly open-sourced Unreal Engine 4! Dozens of programmers working it. You can't keep up with that. Etc. etc.” nobody in particular said, but they would if I communicated with other humans. The bastards.
No, the why of this project is not about an easy way to make Yet Another Angry Yet Flappy Birds clone-game, but now in 3D! but rather to have fun. As I mention in the repository readme this is my raison d'être:
Learning new skills by implementing concepts
I've been programming for about 30 years now — essentially my entire life — but there is always something new or unfamiliar. In this case:
Modern 3D engine math and physics
Current high-end game engines not only wrangle tons of vertexes, normals, textures and quaternions, but also employ lighting techniques that approach full ray-tracing complexity with all the lighting fun that accompanies it.
New GPU access APIs
New, “thinner” APIs are becoming the norm, yielding more control and thus more work to the engine implementers and opening up more of the full rendering and compute power of modern GPUs.
If you've played 3D games in the last couple of years, chances are you've seen a lot of boxes. Boxes being stacked, boxes falling off other boxes, boxes serving as make-shift platforms, boxes being shot and shifting position slightly, you name it. Game engines these days have highly sophisticated physics engines that enable boxes to interact in the most realistic way possible. Boxes1, the building blocks of life.
If I sound a bit hand-wavy, that would be exactly right! I'm learning all this stuff as I go, that's the whole point, and again, the fun of this project.
And then of course there is the library itself, that must function to provide access to all these features, and quite a few more, to the app. Building the library, with many re-revisions along the way, is just plain fun!
Keeping it real
Now, I indeed cannot keep up with a full team of programmers who have been writing 3D engines since 1996, so I'm keeping things as exclusive as possible:
- C++14 codebase. C++98 can suck a dead donkey's doodle, I need my lambdas and other stuff I've grown accustomed to in other languages.
- The code currently only works with Clang 3.4 and libc++ on Mac OS X. I have put in provisionary cross-platform support but it's not on top of my list.
- 64-bit ISAs only.
- OpenGL 4.1+, mostly since 10.9 only supports 4.1, Metal being the new hotness 'n all. I have modeled the code to support other rendering APIs though, because the flesh is weak.
Basically, I only make a part of the library if it tickles my fancy and I focus on current-day techniques and hardware.
Fly away with me
I really, honestly, fo-realz this time, plan to keep this blog updated as I fall down this rabbit hole. If you are also busy in this area or if you are an expert and read me spout total nonsense, please please please send me a tweet and we can all come out of this as better people.
I'm at GDC Europe this year and hope to meet some new people there too and if it's the future and I've already met you there: Hi, welcome to my blog, stay in touch!
- and crates. ↩
Reply @zenmumbler to discuss this article.