Game-in-a-month day 7 – first screen!

Sep 24, 2007@10:51pm

Well, a whole week is definitely more of an absence from updating than I would have liked, but such is the reality of doing coding in your spare time. More writing = less coding. Still, I’ve got time tonight for a pretty good status report.

Silas - A room with some lampsTo the right is a screenshot of the development code as it stands now. I’ve created a few objects to populate the room, and the lights are able to be turned on and off with a mouse click. I had a bit of fun generating the light texture, as I didn’t have one yet. even though the game itself is coded in C++, I find Java extremely useful for simple data manipulations like the generation of procedural textures such as this one. All told, it only took about 30 lines of code, including braces, to generate, and I think it turned out much better than I was expecting, with additive blending it almost looks like a bloom effect (I’m not using any shaders at the moment). The other textures are all done in GIMP, because I’m too resourceful cheap to buy a real imaging program.

Everything clips along quite happily at 60 frames a second on my laptop, with less than 1% processor usage. I’m curious to see how much that goes up once I get some roaches roaming around.

I’ve realized as I’ve been working just how important having a good, solid framework is when doing something like this. I’ve seen a lot of advice flying around the ‘net about not worrying about how game code looks, or if it’s elegant or not, since in the end so long as it runs on our target platform/hardware configuration at a reasonable speed and doesn’t lock up, nobody cares how it’s written. I think that’s true in the general sense, but in the case of the programmer(s), it’s extremely important that your low-level “building blocks” be good enough that you can plug them together and rip them back apart with fairly little difficulty. Sweating the small stuff is definitely the way to go with game coding; taking a few extra hours to really make your game components easy to integrate with each other will save many more hours later on. There is nothing worse than wanting to make a conceptually simple change, but finding that there are so many interdependencies between your hastily designed objects that it becomes an incredibly herculean task.

Filed under: Games,Roach Roundup - Comments (0)

Leave a Reply

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