Little Multi-Threaded Snag

No Gravatar

My recent interest in Python helped push me a bit into going back to an old task I set aside, namely game programming. To make things more interesting, I’m giving myself the additional challenge in trying to utilize the capabilities of Stackless Python. It’s a multi-threaded world out there, and this little activity should keep my wheels turning.

In my case, the annoying thing about learning to program games is that there’s a lot of infrastructure involved. Many tutorials will teach you how to draw something, manipulate an image, or get user input like mouse clicks or key presses. It gets you started, but very quickly you’ll realize that those items are trivial compared to preparing a proper framework. Controller loops, MVC, object abstraction… this is where it gets interesting. Unfortunately, this is where you tend to find less and less info.

I thought I had a pretty decent (albeit very rudimentary) thread-friendly framework going, until I hit a part which apparently required me to setup some locks. Of course I expected this to happen eventually (I am working with threads), but I just can’t seem to shake the feeling that there’s a better way, something that makes use of the design patterns/models I’ve been applying so far. I can always just move along and get it over with, progressing to designing higher level items, but then again, I am trying to come-up with something different from what I used to do with regular code.

Regardless, I have accomplished quite a bit this day (or rather yesterday), perhaps it’s time to rest (and continue reading Fall of Hyperion). Hopefully, I can come-up with something. If not, well, I’ll resign myself to an old solution. I guess it will depend on what I’m more interested in at the moment: do I want to get to something usable soon or do I want something to puzzle over?

No tags for this post.

Elonian Nomad - 3rd Strike is using WP-Gravatar