Category: Game Coding

Sep 02 2007

Back in the Saddle Again

The Game… Ah, yes. Basically I got to the point that I needed more skills- More knowledge- before I could advance. I needed to understand 3D modeling. I needed to understand rigging, and extrusion, and polygon counts. I needed to build my toolkit before I could take what I’ve done with the “easy” parts of game design- the concepts, the 2D art, the pen-and-paper mechanics, the plots, and the engine- and actually make them come alive. So, they’re coming alive now. I’ve built my first terrain. I’ve built my first NPC model. Things are moving along. Not by leaps and bounds, by baby steps: But they are moving along, and it feels great to be back in the saddle again.

Jan 14 2006

LOL… As Fate Would Have It

Ironically, after writing the last post, I found that some/most of my programs weren’t compiling anymore. Turns out Microsoft discontinued support for VC++6 in the latest SDKs… So I either shell out shittons of money for a new compiler, or find my love elsewhere… Ugh… Maybe SDL/OpenGL …

[UPDATE] After uninstalling the newest SDK, and installing an older version, everything builds ok again. There are a number of discussion on the net about how to get around it. I’ll probably give it a try sometime, but for now I don’t need anything in the newest SDKs. They also broked DirectShow out into the Platform SDK, so ugh… Also, I found a cool C++ IDE called CodeBlocks… I plan to look into it more sometime.

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.

Jan 11 2006

Wonders Never Cease

MS has released DirectX tools for Maya, Photoshop, PaintShop Pro, and 3DS Max… Cool. Get the December 2005 (or newer, I hope) DirectX SDK.

Jan 11 2006

Gamelets: R1

I’ve packaged a pair of gamelets that use the engines… I need some cool name… “The engines” just isn’t good enough… Anyhow… lights.exe uses a point-source light on a rotating cube. The billboard.exe file loads a pair of cheesy images I snagged from somewhere, and shows 2D billboarding on a 3D level. I guess these are more “technology demos” than “gamelets”. The gamelets will come… For now, here’s this. (DirectX 9.0 or newer required)

Jan 11 2006

Game Programming

So I’ve been programming- seriously programming- for about 15 years. I’ve written some small diddly games: A pair of text based games in GWBASIC, a graphical side-scroller in QBASIC, and a minesweeper-esque whack-a-mole-esque game in Visual BASIC. Yeah, when it comes to DOS/Windows, I’ve used SomethingBASIC for everything gaming. I have done substantial C++ programming on Windows, just not in the “gaming” space.

So, in all my whacked-out wisdom, I decided to write a game- a big game- in Windows… Using C++ and the DirectX system. I decided a few weeks ago to blog about the progress … and, well… I am. :)

So, to catch ya’ll up, I’ve written several thousand lines of C++ thus far (6412). Writing a number of parallel engines: 3D, 2D, Input, Networking, Inventory Control, and… my favorite… wait for it… wait for it… Scripting. I, uh, embedded the Perl interpreter into my scripting engine… So I can write Perl scripts to implement game-related shit. My A#1 goal is to expose absolutely as much as possible to the scripting engine, thus minimizing the amount of C++ I have to write, and maximize the amount of Perl. This has the added benefit of making the game infinitely configurable/scalable/adaptable by myself.

NPC AI is done through scripting. Assembling the world is done through scripting. Rewards and punishments… Scripting. Random encounters….. Yeah, scripting. Mission database? 100% scripting.  I’m doing a series of little test gamelets that show off various pieces in order to make sure my engines- and scripts- actually work. I may post some here for the fun of it… soonish…

WordPress Themes