Category Archives: MUA Games - Page 2

Threading annoyances follow up

So, last time I was complaining about the horrible threaded mess I created for myself when I thought I could make do without any real structured networking system. If you read it, you know I was wrong.

The first thing I did was rip out my old code and implement twisted. I forced the threadedselectreactor to play nice in my code, but nothing happened when I made network calls. No errors, no connections, no feedback. The twisted reactor is working correctly, adding and processing events as it should, but nothing happens. I’m sure I did something wrong, but I couldn’t figure out what it was.

However, something good came from this! Working with twisted made me realize how foolish I had been with my code. Now I’ve created a network class and moved all the threading there with a simple callback system. It is much MUCH cleaner and a dream to work with compared to the ugly crap I had before. I haven’t fully changed the code over yet, but I’m so much happier about it already that I felt the need to put it down here.

Another lesson to be learned — sometimes your reinvented wheel kicks ass.

Bad decisions and annoyances

The original plan was to quickly throw together a prototype in python, tweak the gameplay to our liking, then port the game over to mobile code. Foolishly, I didn’t use any networking library in the misguided thought that I didn’t want to deal with implementing a large library or tying in the twisted reactor or any of that nonsense. The worst part is, it worked fine for a bit — the menu code all went fairly smoothly. Once I got into the game code, however, things got hairy. Obviously we can’t have the UI hang for every network call, so threads got implemented immediately. That caused a slew of other problems, since openGL doesn’t enjoy being run from threads. The code quickly bloated into a bunch of ugly flags and checks to run the networking threads but update the interface from the main one, all of which would have been fixed with any simple networking lib. Sigh.

Let this be a lesson to you – no project is to small to do ‘right’.

Fuse Update 2011-01-31

Last week Fuse reached ‘playability’ — it isn’t finished by any means, but all the pieces are there to join up and start playing a game with someone. We played around with it a bit, found a boatload more bugs, and tweaked the gameplay. After these bugs are smashed and I code up the features we decided to add, we’ll look for some alpha testers.

Not much change in the screenshot department — the latest changes have all gone into making the game multiplayer over the internet.

Twitter Weekly Updates for 2011-01-30

  • Reached the "playable" milestone for fuse. It isn't pretty, but the main pieces are there. #

Twitter Weekly Updates for 2011-01-16

  • New project officially started! #