Jan 12 2006

Platform Decision

So back when I started thinking seriously about writing this game- The game I still haven’t really talked about much from a “what’s it about” standpoint, but is “big”- I had a MAJOR dilemma. I’m a serious GNU/Linux user. I use GNU/Linux for nearly everything…. Except games.

I wanted to make a cross-platform game, and it became quickly obvious that using SDL/OpenGL was the only sensible choice for a very 3D-intensive game. So I went in search of books on SDL… There really aren’t any that were of interest. Quite a few on OpenGL, 2 of the better ones are now in my library. So I read and followed some tutorials online, and did some cute little technology demos. I’m not one to not do something because it’s “hard”, but it became quickly obvious that a lot of it was at a lower-level than I had hoped it would need to be. Some very simple (in my head) things were exceptionally complex. I found a series of great articles on SDL on IBM DeveloperWorks … But the game discussed is vapor still, even though the articles are old (c1999), which isn’t so encouraging.

I then started looking at *gasp* DirectX. [TANGENT] Despite what some otherwise cool people say, Microsoft IS evil. There are people (some that I know/have met, even) that are not, but any company that tries to upset the homeostatic balance of nature and churns out crap is evil. This does include companies that claim they aren’t evil, by the way. [/TANGENT] Tangent aside, DirectX is the defacto standard in game development, so it was worth a look. At first glance, DirectX wasn’t much/any better than SDL/OpenGL. In face, some things were even MORE low-level… Then I discovered I wasn’t reading about the higher-level APIs that take care of a lot of minutia for the developer… Wow. Power, feature, flexibility and… ease. And tons of documentation.

So I spent some time (3 weeks) doing parallel development. The engine modules I was working on would duplicate everything. For every class (where applicable), there would be two: one with _dx9, and one with _sdl. For every function (where applicable), there would be two: one with _dx9, and one with _sdl. This was exceptionally useful for evaluating the ease of coding (SDL/OpenGL requires more code to do the same thing, usually) as well as the performance (on my development system, DirectX renderings were faster, and took less of a footprint, in general than SDL/OpenGL).

I am still writing all of my engine code very agnostic, so theoretically, I can swap out libraries, rewrite some engine code, but the engine API will be stable and the games built on top of them can run unchanged. But for now, DirectX is the only real way I can feasibly write a game of the size I’m working on, without it dragging on even longer than it already will….
Sometime soonish, I swear, will be the big reveal on what the hell I’m writing.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes