Nov 032009

I’ve been dabbling with computer game design for half a decade (I had crazy dreams about making games way before that, but didn’t write code back then). It’s been strictly a part-time hobby, but for the amount of time I’ve spent I don’t have much visual evidence of my work.

Compared to coders who churn out games in a couple weeks, it’s fairly embarrassing. This seems to be a common joke among game creators, as everyone on the net claims to have the “best” idea for their game and none are ever produced. I’d bet most game ideas don’t even turn into a single line of code, and those that do are soon abandoned. I’m trying to rationalize how this doesn’t apply to me…

My motivation has varied over the years, but the project has slowly progressed. I believe I can safely say that I’m devoted for the long haul if I haven’t completely given up after four years. And now that I’ve thought about it seriously, it looks like there will be a few more years before anything substantial appears.

The largest factor is that you must have a game engine to build a game. Many people use pre-built game engines, but a fair portion build their own from scratch. Those that use pre-built can have a game prototype in a few days. Those that build their own can spend years before any part of the game is ready.

I certainly started the project expecting to build every single component from the ground up. My rudimentary physics/collision engine was functional, but I quickly adopted the Bullet physics engine after seeing how clean and functional it was. After two years of playing with the internals of OpenGL, I introduced myself to OGRE and built it into my game engine. Each of these steps was rewarding and educational, but it left me feeling that my efforts were paltry compared to freely available open-source tools. I’m hoping that trying everything from scratch will give me useful experience when using and expanding more established tools.

Now I’m confronted with the fact that my entire game engine is an amateur prototype. I’ve been in search of an engine that will mesh with my chosen tools (OGRE, Bullet, OpenAL, etc), but the only project I could consider usable was OGE. After a lot of soul-searching, I made up my mind that I just couldn’t re-invent the wheel again. I already knew that it was a work in progress, and imagined I might be able to help out. The architecture seemed well thought out: I had come to consider OGE because the lead developer had very clear, practical ideas on game engine design. I wasn’t happy that I’d have to clean up a lot of pieces before use in my game, but I convinced myself it would be much less work than starting from scratch.

And then I read that the primary developer had burned out and was taking a break from the project! I’m quite personally acquainted with this feeling, but it made me strongly reconsider my plans. It was suddenly a lot less attractive putting lots of work into some else’s abandoned game engine, but the idea of forking left a bad taste in my mouth.

I haven’t started writing code yet, but it looks like I will be building my own engine. I will be able to use a lot of the ideas and some of the code from OGE, but I expect the end product won’t really look like a fork: The OGE team started with a single-user design, with the intention of adding network support. While this is likely to yield better short-term results, I’ve decided that a cleaner design will be possible if the engine has its foundations in the network and is built from there.

My second justification is that OGE seemed to be designed as a game engine for any game. While this is a good goal, I have a feeling that almost all good games have to tune their engines quite a bit. Some of the built-in capabilities of OGE are not desirable to me. My game will diverge enough from the intentions of OGE that a fork may have been required anyway.

So, once again I’ll be building something from scratch. Hopefully my code has matured enough that this will be a useful project, but I have to face the possibility that it won’t stand up against OGE. And I’ll be writing a game engine instead of making a game. But in the end, I’ll know a lot about game engines, will have thought about some very hard problems, and may even have a great game. It seems that the technical details are more interesting to me than the playable game, although I am looking forward to that part.

The journey is the destination.

  One Response to “Write a Game or a Game Engine”

Comments (1)
  1. I’ve been continuing to ponder these issues and have refined my plans. While I still feel that many portions of the game engine will have to be manually constructed, I’ll re-use as much existing code as I can. And I’m not going to spend another 10 years of development without a game prototype. It’s going to have to be a balance between producing something playable and constructing a robust engine.

    There are a lot of wise, experienced developers loudly steering novices away from writing their own engines. I found this advice to be very practical. A lot of code will have to be revised and improved throughout the development process, so don’t start from the beginning assuming you can do everything right the first time. Piece the game engine together as the game matures, and rewrite modules when necessary.

    I’m even considering finishing a prototype before implementing the Entity System referenced here. This will result in a fairly major refactoring of code when the Entity System is implemented, but it will give me a chance to think about the problems a second time and get those niggling details done right. And I’ll have something actually playable before worrying so much about all the details.

    The biggest influence on me was this post. In short, an “ideas man” was proposing to design and manage a huge game development project without any experience or funding. I’m not quite in the same situation, but I’m going to frequently ask myself if I’m being just as naive. I’m serious about this project, but I have to be serious in the sense that I’m actually getting something done.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(to be displayed above your comment)

(for moderation; your e-mail address will not be made public)