Saturday, September 1, 2007

Game Demo Progress

I think I should post my progress as long as I have this Web Log and people are forced to listen by virtue of a feed associated with a certain User Group of a certain class of operating systems. I probably never mentioned this in the first place, but I've been commissioned (probably no money involved; I had a discussion with a friend, I'm pretty sure I can still technically say "commissioned") to make a 2D game engine.

I initially chose C, with Python for scripting. Then I decided that for a prototype I should just do it in Python. Then I figured, why the hell not just make most of the actual product in Python? I would just use C for anything time intensive, such as looking for collisions ( O(N^2), unless there's some industry trick there that I have to learn ) and image effects (generated fire, as opposed to pre-animated fire).

So far I've drafted up my requirements and cleared it with the guys planning the game itself. It was a decent sized doc too, I'm reasonably happy about getting that done. Next is code design, but it was pretty hard to think of how to design it without trying to code it first (a catch 22 of sorts), so I decided to make a prototype(/demo) to help give me the ideas. Turned out downright vital that I did this because things came up that I didn't anticipate at all, as I'm sure is always the case.

For starters, I'm working on the Actor framework. Everything in this game is an actor. They send messages to each other, they have actions every frame, and then they draw. I'm not even worried about them showing themselves at this point, I'm mainly worried about laying out the code and making everything communicate properly. Input isn't really pressing either. I'll probably make a curses output module for starters, just for the heck of it, and just to show off (to myself, I guess) the modular nature (I hope) the engine will have. Actually, I'd mainly do it because it would help demonstrate that everything's working properly, and it's faster to get working than SDL, I would imagine.

So I just got message passing going. I think next I'll put in a quick framework for input (but not bother implementing it yet), but soon go onto other important things like searching for collisions, etc.

After this thing is done, or at least showing enough interesting aspects of my engine, I hope to have a presentation for this user group about game programming and Python. This would probably be my first presentation; I'm not used to doing them and it might be a while before I get around to that.

In this post I'd also like to chime in and say I'm impressed that Gnash works on Youtube, at least on a rudimentary level. Not Google Video though, sadly. So now I won't have to bust my head, having a 64 bit system, until Gutsy comes out and I can easily use the nspluginwrapper (I went from a naive Windows user that would install programs in a semi-irresponsible manner to a naive Linux user that refuses to install anything not from an official repository). Heck I may just stick with gnash, I've heard that it uses Open GL, so it should be faster than Flash. I think it is, really, the load time for the YouTube app is damn near instantaneous, though my computer is fast. Maybe I'll run a little comparison.

No comments: