Game Development

Part 1 of Results of June’s Game in a Day

Click below to track my June 2005 GID development progress:
Part 1
Part 2
Part 3

This blog post and the next one will act as my .plan and document the implementation of my game design for June’s Game in a Day.

While it is supposed to be between Saturday and Sunday, Sunday is my sister’s gradution party. Instead, GID for me was from June 10th through June 11th. After I bought a 24-pack of Mountain Dew, got home from work, and had dinner, I set to work.
I already put six cans of Mountain Dew in the fridge to prepare for the night. It should be a good boost, especially since I don’t drink caffeine often. I also cleared my desk and made sure I had the right books, notebooks, and other tools available.

June 10th

7:00 PM

Cans of Mountain Dew: 0
Subversion Revision: 0

Logged into #gameinaday and ready for coding action!

I set WorkRave to give me 20 second breaks every 10 minutes. It isn’t very disruptive and lets me rest my eyes. At the end of 4 hours, it will force me to take a 10 minute exercise break.

I already setup my Subversion repository for the project and created the normal directories: source, documentation, and resources. The first two are self-explanatory. Resources are things like music, sound effects, images, and other data.

I started by trying to create a basic finite state machine as described by Tony’s Game Programming Tutorial. I didn’t want to just copy the files and use them as my own, since I didn’t like the naming scheme and the C code strewn throughout. I wanted to use Kyra instead of straight SDL. Besides, I will learn a lot more about how the FSM works by writing it out than by copying and pasting.

7:45 PM

Cans of Mountain Dew: 0
Subversion Revision: 6

I’ve written a few source files but it is mostly for infrastructure rather than game code. TomB warned me that I can get stuck trying to build the framework, especially since I am basically doing this from scratch.

Even though I asked people to leave me undisturbed, I still must do some laundry.

7:58 PM

Cans of Mountain Dew: 1
Subversion Revision: 6

First can of Mountain Dew opened.

Still writing the FSM…

8:45 PM

Cans of Mountain Dew: 1
Subversion Revision: 8

The basic FSM game engine is written. Now onto making individual states.

8:54 PM

Cans of Mountain Dew: 1
Subversion Revision: 9

It compiles and builds cleanly for the first time! A window appears and then promptly seg faults since I don’t have any states yet.

9:18 PM

Cans of Mountain Dew: 2
Subversion Revision: 9

Hit my first snag. Everything compiles, but it won’t link. Spent almost an hour before finding that I didn’t declare a static member in the implementation file before using it. Doh!

11:22 PM

Cans of Mountain Dew: 3
Subversion Revision: 10

Oh boy. I’m hitting a wall. I’m not sure how to proceed. A KrEngine is declared within GameEngine, but none of the states know about GameEngine. I ended up making GameEngine a Singleton and having everything accessed through it, which took quite a bit of refactoring.

The result:

Blank Triangle on Black Window

I’ve been working on this project for about five hours now and I don’t have much to show for it. But I can’t get discouraged. After all, I have more done than I did five hours ago.

June 11th

12:48 AM

Cans of Mountain Dew: 3
Subversion Revision: 14

Now I have a splash screen. Yes, it is programmer “art”.

Sprayed on brush metal???

3:18 AM

Cans of Mountain Dew: 4
Subversion Revision: 15

Ok, I’m learning. Virtual destructors and static members are parts of C++ that I am not terribly familiar with, so I am glad I get the chance to fight with them now. Still, I would love to be further along than I am. From splash screen to menu screen. No gameplay yet.

Play the game already!

I’m also getting sleepy. Should I rest or push forward? Push forward!!!

..after a quick bathroom break.

5:27 AM

Cans of Mountain Dew: 4 (-1 bathroom relief modifier)
Subversion Revision: 17

I’ve finally gotten to the point where I can write the PlayState, where the actual game takes place!

I’m used the Gimp to draw up a few images of the main Player. I decided to make a crude alien. The Player class was easy to make since it just has to encapsulate KrSprite and some data about the Player. I can probably get it playable fairly quickly. Even if you can’t do anything else, you should be able to move around and possibly shoot something.

A green alien

For now, I can detect the arrow keys and change the action of the Player. The screenshot doesn’t show it, but his eyes move depending on the direction you press.

5:55 AM

Cans of Mountain Dew: 4
Subversion Revision: 20

About 10 hours later, I finally have the main character moving about the screen according to the arrow keys. He only moves in four directions, but I’m not going to draw up more images for diagonal movement this late in the GID. I’d rather spend my time getting the fusion part of the game going.

I will try to take a nap now, but check out the 1.6MB project (mostly due to the raw images in FuseGB/resources/) so far:

4 replies on “Part 1 of Results of June’s Game in a Day”

Comments are closed.