| « New Perspectives.. | I don't know what to put as a title.. » |
I've been reading around for a while about developing game engines, and the best ways to start one, etc. There unfortunately isn't a whole lot of "best practices" out there that I've found.
Having spent the last 3-4 years in an application development environment, as opposed to more of a research environment, I've grown used to reading what those who have come before me recommend. I probably own all of the game engine design/implementation books that come recommended and while they're all priceless in their own ways they all suffer from the same pattern; the author writes a game engine and walks you through the process.
I've found this to be very helpful when starting sans clue on where to begin. Once you have an idea on where you want to start, and the basic design and components of your engine they become fairly cumbersome. The actual implementations, geometric tests, scene graphs, etc, all remain useful, however the class hierarchies, API, and language specific implementations become a crutch.
I'm currently in the early stages of building my own graphics engine to add to the, currently non-existent, components of my own game engine. While working on it I've found myself, on multiple occasions, thinking "how did the book implement this class?" instead of thinking of the code relationships and deciding on the implementation myself. I think the main reason I'm drawn to look at the book for structure is because of the lack of guidelines amongst the available game development resources I've seen.
I'm a huge fan of books like Scott Meyers' "Effective C++". The reason being that there are a lot of things to keep in mind when implementing something like a graphics engine. Having something like Meyers' book to sit on your desk, or in your bag, to remind you of some little known hurdle and to provide information about a solution would be invaluable.
Seeing as how this is my first true game engine (I don't think my VESA library from '97 counts, nor my basic XNA library) I certainly don't have the experience to come up with anything targeting game engine development of the quality of a Meyers book, but I think I'll be spending some time experimenting, and see what I can come up with.
The current iteration of my engine isn't even crawling yet, but it is being implemented in C++ and OpenGL under OS X. The goal is to make it modular enough that different graphics APIs can be swapped in to support other platforms (DirectX, OpenGL ES, etc.). Which leads us to Item #1,
It is very tempting as you start building code to implement your graphics engine to immediately duplicate the work for another platform. The feeling of seeing your first renders happen simultaneously under DirectX and OpenGL is awesome. However, if your engine isn't fully planned out then every time you make a change, you'll have to duplicate those changes for each platform you've started. This can quickly build up, until the bulk of your time is spent updating the code on each platform to keep everything in sync.
By choosing a target OS, and graphics API, you can build a working engine and test out your ideas before you're fully committed to multiple platforms. This will allow you to be more flexible when you do run into a problem or unexpected obstacle.
This unfortunately does not allow you to lazily implement your engine under the constraints of your target OS. The constraints of each platform will need to be understood so that your engine will translate well to the underlying graphics API. Fortunately, most modern graphics APIs follow the same general flow, but knowing the differences between the APIs you want to use will help to lessen any frustration later.
As I plan out my graphics engine, I'll post what I come across and any suggestions that I think might help others out. I won't be posting my implementations, only advice that can help others develop their own engine without the crutch of a known implementation.
Oh, and don't think I'm brushing off books on game engine development. Quite the contrary. Two of my favorite game development books are Eberly's "3D Game Engine Design" and "3D Game Engine Architecture" books. Both of which talk specifically about his Wild Magic game engine. I just think the game development community could use more resources on the Whys, and less on the Hows.
A developer's journal.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | ||||