Creating a 3D Game Engine (Part 1)
This is the first part in, what I hope to be, a long running series of articles about creating a 3D game engine. Just to be completely honest, I have never created a 3D engine before. Granted, I have worked on many games but usually in the casual and social space (read: 2D). However, I do have some years experience using other people’s 3D engines as a hobbyist. So I’m not a complete noob, far from it. But this is very much a learning process for me. I hope to detail this process, mistakes and all, in a series of articles. At the end, hopefully I will have a fully functional 3D game engine. In the process, I will log basically all the steps needed to create said engine. Maybe eventually these notes could be the basis of a book. Who knows? I think the information will be valuable, and I hope it will prove helpful to other people walking this path.
So the big question is: why would you want to create yet another 3D engine?
That is actually a good question. Before you embark on a (potentially long) journey of creating your own engine, you probably want a good reason to do so. There are tons of engines out there, some even free, and many of them will be suitable for a variety of projects. This is true. There is also the advice that says “make games, not engines.” This is also sound advice for most people. Especially if you are on a deadline from school or a client, it makes absolutely no sense to waste time building an engine. Just make the game, and finish the project. Get your grade, or get paid.
For me, however, I’d like to learn exactly what goes into a 3D engine, as I feel this knowledge will be very useful. Even if I, ultimately, end up using a pre-existing engine. So knowledge is a big part of this. I don’t mind if my engine takes years to complete. I don’t expect it to compete with the big commercial engines. I just want something I can use for my own little projects and demos, and that I have absolute full control over.
Another aspect is limitation with current options. Many of these “all-in-one” game engines will get you 90% of the way there but you will struggle and twist the engine to get that last 10%. In some cases, you will encounter show-stopping bugs that you just have no way of fixing without the source code. In other cases it just means you have to “dial back” your vision to get things working. Some engines have restrictive licenses, or complex revenue sharing models that I’d like to avoid. Some of them are just too darn expensive (I guess this is a financial limitation more than anything). Some 3D engines look great, at first, but don’t include the types of things you would need to complete a game (like a proper level editor). There are lots of reasons to be dissatisfied with the popular options out there.
More concretely, I’d like to explore how using virtual reality can aid in the game development process. So some features that I consider requirements simply aren’t available today. For example, full stereoscopic 3D rendering not only in-game, but also inside the editor. Supporting 6DOF (degrees of freedom) motion controllers to place and orient objects, again, in the editor. Intuitive 3D model editing and texturing, no external content creation tool needed. Motion capture tools built straight into the engine, so you could literally animate a character in real-time as you play the game and save those animations out. I know this all sounds very “blue sky” but these are things within the realm of possibility. I believe it can be done, and this is a motivating factor for me. Maybe your vision is different, but I think this series could be helpful none-the-less.
I’d really love feedback on how I’m doing, or topics that you might be interested to have me cover. Remember, this is as much a learning experience for me as it will be for you. Surely mistakes will be made, just post a comment and correct me, or post a fix for the problem. I really have high hopes for this series, and I want this to be as much of an interactive experience as possible. So keep reading, have fun, and let me know what you think. Thanks.