Trial By Fire.

15 days left. The gameplay is done and in “test” (a bunch of friends are playing through it). Thus, I had that terrifying moment where you send out your creation to the world and hope that it works.

…then someone reports that there’s a serious bug which you quickly fix.

That’s how it goes.


The Gameplay Prototype

So when last we spoke, I had set my schedule. I had just a few short weeks to get a complete gameplay prototype running. So I started where every game developer seems to start: With the graphics.

I mentioned before that the graphics were simple. Polygonal, no textures. Writing that took about a day (very, very simple code). I checked it in on August 12th.

Next up: Input. No sense in gameplay if you can’t PLAY it. I took the input code that I wrote for my old NES emulator and modified it slightly for my new uses. That gave me automatic keyboard/joystick control.

Side note: Never initialize DirectInput after initializing Direct3D, because it does bad, bad things to the window interface. DirectInput subclasses the window, which Direct3D doesn’t like, so D3D doesn’t like to restore the state of the window correctly after doing a Reset (i.e. for switching between fullscreen/windowed).

Blah blah blah, wrote a bunch of stuff, got the gameplay test done. Only a few days behind schedule, on September 4th.

A Note on the Art Path

So, my original “art path,” as it were, was amazingly complex.
It kinda went like this:

  1. Create object in AutoCAD.
  2. Export from AutoCAD to .3ds
  3. Use a 3D modeling package to import the .3ds
  4. Manually fix up the incorrectly exported colors
  5. Export to .ase
  6. Run custom converter from .ase (an easily parseable ASCII file format) to my own mesh format.
  7. Profit!

This eight-hojillion step process was a pain and, moreover, had one fatal flaw in it.

Check out step number 3. AutoCAD was incorrectly exporting the object colors.

As it turns out, AutoCAD has the ability to set truecolor values to objects, but it also has a built-in 256 color palette (likely left over from the olden days). Now, when ACAD would export, instead of exporting my delicious true colors, it would export the nearest match in the color palette. Consequently, I had to fix them up later.

This became a problem when I tried to do my first test background – Fixing up all of the colors was way too time-consuming, so I had to find a better way.

FIRST I tried to import the DXF directly into the 3D modeler. However, it ALSO screwed up the import.
SECOND I tried to write my own DXF reader. As it turns out, the object that I’m using as my building block (the REGION) is one of the only TWO types of ACAD object that are encrypted in the DXF. Which is stupid.
THIRD I found a third-party program to convert REGIONs into PolyLines, which I WOULD be able to read. However, this program also dropped the same color information I was trying to preserve, thus ensuring that every last person in the universe has screwed up the color import/export with ACAD files.

The Solution!

I found out that AutoCAD has its own API for writing plugins called ObjectARX. Essentially, I downloaded it and wrote an export function from AutoCAD directly into my mesh format. It does the following things: Scan the scene for regions, and for each region it finds, triangulate it (using ear clipping) then write that to the file.

So now, my art path has become:

  1. Create object in AutoCAD
  2. Export directly to my mesh format, with correct colors intact.

Much better.


I don’t have any new screenshots. What I *DO* have are two of the songs from the game.

The first one is the song that will play during the main menu on game startup. It’s the piano version of the main theme.

Piano of Destiny

The second is the first-level music, which IS the main theme (thus, both songs have the same melody).

Theme of Destiny

Anyway, it’s amazingly late and I work tomorrow, so that’s all I have time for today. Backgrounds truly begin tomorrow!

Leave a Reply

Your email address will not be published. Required fields are marked *