The Hard Part Jun 17, 2006
This is a general article about my thoughts on what the hardest part of creating a 3D engine & editor is. I occasionally go on a spree where I browse through programming blogs, both well-known ones, and what turns up in a google search. Often after reading an entry I feel like I might have learned something that could help my programming. But then when I think about it, I decide that I really didn't. If I did my job right this will be that type of article =)
Internet
The Internet has really made it a lot easier to get information. You can learn about everything needed to make a 3d engine, without even buying any books. There is even a lot of free usable code on the net, including a bit on my own page. (So far I've avoided using free code myself, but maybe I'm just being a stereotypical all-my-own-code programmer.) This is a lot different than when I first started game programming. I had 4 game programming books, and I'd try to figure out most things myself. I have to reluctantly admit more information is a good thing. It has certainly helped me, and I probably should make even more use of it.
I can't think of a single thing in Kingdoms Creator that I'd consider a "secret." Even though it contains techniques that I made up myself, probably someone somewhere else has already arrived at a similar or even better method and written about it. Shaders
3D Shader effects are cool to show off. Games are getting newer and better shaders every year. Are programmers discovering new unheard of techniques? Maybe to a small extent, but really this is driven mostly by graphics card capabilities. You'll have more and better looking shaders if you target top-of-the-line hardware ( or even future hardware, ) and concentrate less on low-end hardware. You can learn most of the latest rendering techniques from the developer sites of ATI and nVidia. I do appreciate well-done shaders, and wish I had more time to write them myself.
Coding
Is writing good, maintainable, code hard? It seems like this would be the easy, since good code often means code that looks obvious and does things the standard way when possible. Yet, in my old code when I first started my 3d editor I did some things I'd now consider poor coding. I often used numbers for types & flags instead of enums with named constants. I had far too many globals. I made everything in all my classes public. I'd sometimes add code into functions that did something the function name didn't imply. In shorter or even mid sized personal projects this didn't cause me trouble, but I learned for large long-term projects this stuff is actually important. Now, I can easily understand my current code even after not seeing it for years, and be fairly confident changes won't have unintended side-effects. So I guess I'd say good coding practice isn't hard, but I should have taken it more seriously when I was younger.
Architecture
I've sometimes heard that putting everything together into a coherent whole is the hard part. To an extent I'd agree with that. If you want to add projected shadow mapping, it's not just shadow mapping code itself, you then have to put shadows for multiple lights in the proper place in the pipeline, make sure they work right with all your shaders and objects, and optimize them so they don't do many unneeded calculations in a larger level. Also in general there are a lot of little things that need to be considered, like order of functions and how data is passed around.
I actually don't think architecting requires any more talent than everything else. One reason it's harder is experience definitely helps... if you've done something before, you can usually do it easier and better the next time. It will take a long time to get experience architecting a complex 3D engine or editor, simply because it might take years to write all the different parts that are being put together. Everything
Maybe the real hard part is that there are just so many different things to do to make a complete engine that is at least similar in capabilities to other modern 3d engines. I actually haven't mentioned gameplay, compatibility testing, physics, or a host other specific areas. I even forgot to mention tools & editing completely, even though that's what I've concentrated on most in my own programming. For a full game, I'm finding art creation in a time when games are looking more and more like animated movies is the biggest issue. But since this is a programming article, I might as well end it now =)
Link
Thoughts on programming : This page contains some of my random thoughts about programming. |