Monthly Archives: September 2011

Pouring

                I guess I always knew somewhere deep down that there were going to be down sides to programming, but of late they’ve been cropping up in some very unexpected places. I expected to have to face some of the legendary heckling and complaining that almost all developers have encountered, but the community has been blessedly understanding and kind about the whole thing.

                Perhaps I’d better back up a bit here. A few weeks ago I received an email on the Audyssey list from a user who told me that Block Party wouldn’t run on his system and that he was getting error X. Having no idea what error X involved, I put out feelers, and I was told to put a specific line of code into the main module that would fix everything. I placed the line of code where I was told and uploaded the new executable to the site.

                I then went back to work on the boxing game, building in support for multiple punch types and perfecting existing sounds, only to discover that my current keyboard code didn’t support things like holding down keys. If I wanted to press up and A at the same time to throw a left hook, I could, but I couldn’t hold up and tap A at some future point and achieve the same result. Some people might argue that it makes no difference, but for some reason, the lack of being able to hold keys feels awkward to me, and I’d like to be able to fix it.

                So I started working on a solution. I went out and started researching Pygame, a Python library specifically designed for game development. (Some of you may recognize Pygame as the library used to code Sound RTS.) I figured if I imported the Pygame keyboard module, I could build in support for a lot of the keyboard-based stuff I really wanted. There’s also the added bonus that Pygame supports mice and joysticks as well. But just as I started my research, life started happening.

                First came the emails from the Audyssey list telling me that the new version of Block Party wouldn’t run on 64-bit Windows 7. I have to pause here to point out that the emails I have received thus far have been extremely cordial, and I cannot stress enough how much I appreciate that. After the emails, though, came a mountain of work at my job, and after that came some previously-made engagements which have taken up a significant chunk of my time.

                Today I finally had time to sit down and research the problem, and I came to the conclusion that I needed to roll back to the previous version and find another solution to the problem, only to receive more kind emails from people telling me that They—the emails’ authors—could now happily run Block Party’s latest version on their computers. Argh! Now I have to trouble-shoot Windows 7 64-bit!

                The most interesting and awesome thing about this whole ordeal is the response I have received from the blind gaming community. As I wrote earlier, I have received no negative emails about Block Party’s refusal to play nice with everyone’s computers. Especially given some of the epic flare-ups which have previously occurred on the Audyssey list, I was expecting to have to dawn my ceramic suit and dive for cover to escape the flaming. Instead, everyone has been very understanding and patient with me as I research and learn in an attempt to solve the problem.

                Which is probably why I feel so bad.

                You all have been waiting for months for the boxing game—almost as long as I have. I have been giving out teasers and snippets from time to time and writing about my progress in various forums, but real, tangible results of this project have not been forthcoming. I know deep down that there will be setbacks; I’ve written about them in a previous post or two, but I hate that they’re occurring at all. More than anything I want to finish this game and release it to the general public, but for some reason things just keep coming up. Maybe this is all a bit melodramatic, and maybe I’m just on edge after the whole Qwitter thing, but I keep feeling like there’s a clock hanging over my head, and when it strikes, there goes my credibility. The funny thing is: it’s not you; it’s me.

                Holy crap. I have to stop writing now before something even more cheesy comes out of my keyboard: “maybe we should just be friends.”

                Anyhow, thanks for letting me get that off my chest, and thanks for being so awesome about the whole thing. I promise I’ll make the end result worth it, and we’ll all have a lot of fun.

A Worthy Challenge

                When you start out programming, people tell you it’s a good idea to start with something small. It’s why almost all program tutorials start you out with printing “Hello world!” to the screen. In the case of games they tell you to produce Guess the Number or a Space Invaders clone or something equally unsatisfying from a gamer’s prospective. But in spite of this good advice, the starry-eyed gamers want to produce something exciting, something revolutionary, and they either wind up failing or producing something ugly. I’m a big believer that you only truly fail when you give up, so I don’t believe I have failed to produce a great game. I do think, though, that the current incarnation of boxing is pretty unattractive.

                A big part of the reason behind this ugliness is that I started with an extremely limited skillset. I could only conceptualize how to produce the kinds of things I wanted with some very limited tools, and my code and design reflect this fact. It’s why I’ve been writing on the Twitter feed recently about how I’ve been going back through all of my modules and stripping out/refactoring a lot of the detritus that has collected there.

                But as my knowledge has been evolving, so has my vision for the direction I’d like to take the boxing game in, spurred on in no small part thanks to some bona-fide geniuses on the Python tutor list. When I look at their code examples, their suggestions for different work-arounds, their ideas for alternative—and better implementation—I realize that I’ve only been scratching the surface of what this game is truly capable of. I don’t, for example, have to stop at four basic punches, especially when boxing offers a whole host of new ones. I don’t have to limit the game to blocking and not blocking when I can easily build in slipping, bobbing and weaving, stepping in, and so much more. Did you know that a classic boxing combination is to throw an uppercut with the power hand, then follow it up with a devastating hook with the other hand? Apparently the first punch lifts the jaw into prime position, and the follow-up punch lays the opponent out. I didn’t know that before yesterday, but now that I do, I want to build it in! Now that I have more tools at my disposal, I can do that—and what’s more, I can do it with relative ease.

                This probably comes as a bit of a disappointment to people who were hoping I would release the game yesterday, but I promise that the mechanic change will make the game a lot more fun for all involved. Instead of just mashing a particular button repeatedly and getting away with it, players will have to make strategic decisions and play off of their opponents. They’ll have to learn which punches to lead with and when to throw a proper combination, and the opponent will be learning right back. If they throw the old one-two too many times, the opponent will start to anticipate it.

                While I think future players will really appreciate these changes, I’m also making them for my own sake. Nothing is more frustrating than spending lots of time on a project that is no longer of interest, and I don’t want to become frustrated with the boxing game. I want this to be an exciting journey for all involved, but since I’m steering the ship right now, I need to make sure I don’t fall asleep at the wheel. Thankfully, we’re bound for Tahiti.

                And I’d better stop with the nautical metaphors.

                Oh hey—random thing: Did you know that coffee gives you super powers? No, really. I use it all the time when coding to help me stay strong. In fact, I might go have some right now!