Monthly Archives: April 2011

Paying the Sandman

                I was prepared to write a long exposition about how restarting is the hardest thing, about how, after three days off, getting back on track and writing some actual code is next to impossible. It turns out that’s not the hard part, at least not this time.

                On Monday Randi and I went to the concert—which was awesome—and we didn’t get home until after midnight. Tuesday I have already written about. By the time I finished the bit of code I was working on, it was after 12:30 when I finally went to sleep. After the baseball game and a rather stressful Wednesday, we finally shuffled in out of the cold at 10:00. Needless to say—but said anyway—I haven’t gotten much sleep this week.

                When I sat down to write last night, the code came pouring forth in a torrent which defied my earlier prediction. In fact, I nearly finished the flexible system which will display stats for the player. (Side note: it’s amazing that a system which doesn’t affect actual game play can take so much work; people ought to keep that in mind when they next wonder why a game is taking as long as it is.) By 8:30, though, my consciousness was fading. Fifteen minutes later, I was asleep at my keyboard.

                It’s interesting—and timely—that I recently heard a tidbit about how it’s possible to accrue a sort of sleep debt which has to be paid back before normal body function is restored. It’s the science behind why a person sleeps for ten to twelve hours after pulling a few long days. While I understand completely why my body is exhausted, it’s nevertheless annoying.

                So here I am at quarter to five Friday morning writing a blog post and working on my code. I’d like to say that this whole experience has taught me a thing or two about my limits and how I need to prioritize, but that would give lie to the fact that I’m awake this early working. My alarm isn’t even supposed to go off for another hour and a half!

A Happy Distraction

                I felt bad last night when I was going to the concert. After the concert, though, I was glad I went. Tomorrow Randi and I are going to a Twins game, and I’ll probably feel guilty about that. After the game, though, I’m sure I’ll be glad I went. Today, though, was something entirely different, and even though it meant I made very little progress tonight, I am still in a spectacular mood.

                As I posted earlier on the twitter feed, I started the evening off by resisting the urge to curl up on my previously-mentioned comfortable couch and play Stem Stumper. After working for a few minutes, I decided to check Skype for a contact I’ve been meaning to ask about my Yeti Microphone—the one I will likely be using to record most of my voice overs. That particular contact wasn’t online, but an incredibly good friend of mine was.

                When Randi and I were planning our wedding back in 2006, I asked my friend Jim if he would stand with me. He enthusiastically said that he would. I even pre-paid the favor by being one of Jim’s groomsmen when he and his wife Erika said their vows just a month before Randi and I did, and I was honored to do it. Shortly before our ceremony, however, Jim was deployed to Arizona and thence to Germany, Iraq, and, finally, South Korea. We have seen him once since then when he stopped in Texas for a training exercise. We haven’t seen his wife since they left 5 years ago. We have tried to stay in touch over the years, but lives being what they are, we haven’t always been as good at this as we would like.

                Imagine how excited I was this evening, then, when I scrolled down my Skype contacts and discovered that Erika was online. I had added both Jim and she to my contact list when Randi and I were still living in Hawaii, but I never once saw either of them logged on. Talking to Erika was too good a chance to pass up, especially when it turned out that Jim came home on his lunch break shortly thereafter, and I had the privilege of talking to him as well.

                It is an incredible experience to catch up with two people we have both held so dear to us for so long, and I don’t regret a moment of it. Both of our lives are better for having Jim and Erika in them, and if our catching up with two old friends means I miss a day of work, so be it. This is a part of life that is always welcome to take precedence over my hobby.

                All that aside, I have perfected the default method code for the menu system, which means I will now be able to make menus function as message boxes. This will come in handy when the player wishes to check round, fight, and career stats. And because this is Python, and because Python is even more winning than Charlie Sheen, I will be able to use this same code for all of my upcoming projects.

                There will likely be no development tomorrow unless the baseball game gets over early or delayed on account of rain. Even so, I’m still chomping at the bit, and I fully intend to work my butt off on Thursday.

Guilty Pleasure

I have made no secret about the fact that developing this game won’t be as fast as any of us would like due in large part to my having to develop and program opposite my full-time job. When I started blogging and laying out the details for my game plan, I did so right in the middle of my Easter break. Because of the large amount of time I have had available I have been able to make some outstanding progress over the past four days, and I’m pleased with the results. Tonight, though, Randi and I are going to see Jonathan Coulton and Paul and Storm in concert, and I’m taking the evening off. I’m feeling incredibly guilty about that.

I suppose it’s because I’ve been a programming fool these last few days, and I know when the work week starts up again tomorrow, I’m going to come home exhausted and much less inclined to program. Even though we’ve been looking forward to this concert for months, I still feel like I’m taking a vacation day on faith. Now that I’ve announced my intentions to the world, I can’t shake the feeling that I’m on a schedule, and I worry that I’m going to be letting people down if I don’t put my shoulder to it as hard as I can. Talk about a double-edged sword!

I’m sure I’ll get over my guilt right about 7:30 when the Opening Band starts. After all, programming this game is just one facet of a full life. In the meantime, though, I’m going to roll up my sleeves and do the best I can with the few hours I have left this afternoon. That and go a quick 3 rounds with my conscience.

Small Steps

                I started today with the idea of refactoring my menu code to make it prettier and applicable to more situations and games. After banging my head against it for three hours, though, I realized I have absolutely no idea how to proceed at this point. I’m sure the idea will come to me eventually, but it hasn’t shown up yet.

                As a result, I turned my mind to other matters, like streamlining match and round code. My current setup has a game object to manage the whole framework, a match object to start rounds and create opponents, and a round object to handle things like the clock. Each one of these objects was, until a few hours ago, in its own module. In an attempt to slim things down, I’ve combined round and match into a single file. Now if I can just find out why the game doesn’t run anymore…

                On a more positive note, I have tweaked opponent and round code so that the opponent will now read the proper round’s punch chart. It used to be that at the start of the next round, he would revert to the previous round’s chart. Not so anymore, which means he’ll soon be a real fighter.

The Status of the Game

The following is a copy of a message I sent to the Audyssey list earlier today detailing my progress on the game. Reduce, reuse, recycle.

Dark and Willem,

I appreciate the kind words. As I wrote in my previous post, skepticism is warranted. As you both said, though, there is enough here that it’s not just an “I’m planning to do this” type announcement. In fact, here’s exactly what exists at this point:

  • There is an opponent object, and he is able to throw a full range of upper and lower punches from achingly slow to too-fast-to-dodge.
  • There is a player object, and he can throw his four basic punches and an ultra punch. He can dodge and block.
  • Both the player and opponent can be knocked down and can stand up. In the case of the player, this requires some serious button mashing. This also includes a referee who will count the player or opponent out if he is down too long. It also includes the TKO rule: if a fighter is knocked down 3 times in one round, the fight is over.
  • There are methods in place that allow the player to do extra damage depending on how he counters his opponents’ punches.
  • All this being said, it is possible to have a complete fight with the test opponent, provided the fight doesn’t last into the second round.

What I still need to do:

  • Build the framework for stat tracking: I want to display the stats of a given round after it has ended. Right now, though, the code I have in place to do that is ugly as sin and needs to be refactored. I need to pass each round to the fight and eventually pass each fight to the career stats. That’s my mission for today.
  • Build in a record system to keep track of player and opponent wins and losses: If an opponent beats you, and you challenge him to a rematch, his win/loss record will need to reflect that he beat you. Ditto for yours.
  • Finish the code to win/lose a fight: When you win or lose a fight right now, the only thing that happens is that the bell rings. That needs to be changed.
  • Build code so that the player can win/lose by decision
  • Wrap the game in a menu system so that the fight doesn’t start as soon as you launch the game
  • Finish programming the opponents: In most cases this will be a matter of laying out punches. For a few specific opponents, however—the pirate, the cowboy, the creation (more on that soon)—it will require a few extra methods. That will come once I’ve completed the alpha.
  • Finish with sound design: That’s probably my biggest hurdle, and it’s going to take some time. I picked up a Yeti microphone, and I love it, but I’m having trouble getting Sound Forge to recognize it. I suppose I could use Garage Band to record the voices, but I’m not good enough with GB at this point to just bust out the Mac and record those files on the fly. I don’t even know if you can monitor GB for clipping. That, too, will come after the alpha.
  • Design the achievement system: There are stats in place to check for achievements, but nothing is being done with them. I need to come up with specific achievements and start implementing them. That’s another beta-level undertaking.
  • And, of course, there’s the complete lack of documentation that currently exists. As a matter of fact, this is the most I’ve ever written about the game.

As you can see from the above, the blog, and my previous posts, this is all incredibly new. It is progressing, though. I never would have dreamed 4 months ago that I would have a working proto-type of a game. While there is a lot yet to accomplish, especially since I’ll be developing in the evenings opposite my full-time job, completion isn’t that far off.

As always, I’ll keep you posted.

Best,

Ryan

One more Tool

It’s days like today that remind me how much I have yet to learn. Such days are frustrating because they keep me from making tangible progress on the game, but they usually teach me something valuable that will come into play later. Today, it was distutils.

About a month ago I started developing a menu object that I’ll be able to carry with me from game to game. It’s a sweet little piece—if I do say so myself—with the ability to set wrapping or not, pick custom music, use either text to speech or sounds, and a lot of other things. When Chris looked it over, though, he pointed out some of its immediately apparent errors. One of the most glaring was the fact that the menu code lacks any kind of support for sub-menus.

Chris incorporated my existing code into a package that we will be able to install directly into our respective python libraries, and we have since started working to improve it. However, upon downloading the package to start debugging it today, I realized that I have no idea how to read a package. Why is there a dist folder? Why is there a build folder? Why is there a lib folder? Why are there two versions of the code, and which one should I be modifying?

To answer these questions I went on a Google hunt, and I eventually came across the distutils manual, a detailed document explaining more than I ever could have hoped to learn about packaging and installing Python modules. The technical nature of the document, however, forced me to run a bunch of secondary Google searches to figure out what the heck I was reading about. It’s like being stuck inside a giant see-also loop in the dictionary.

The end result is that I’m a bit smarter than I was before, and I have a better idea of what is required to put together reusable code, but it also means my development was on hold for a bit today. On the bright side, I won’t have to learn this again, and I now have one more tool in my toolbox.

The Basics

The boxing game, which does not yet have a working title, gives homage to Nintendo’s Punch-Out! from the early 80’s. The concept of dodging punches and responding with a furious combo has been preserved in spades, but some changes have been made to make the game more accessible to audio gamers. I will write more about these as development progresses.

In the meantime, however, I can let everyone know that the basic concept of the game pits you, the under-dog player, against a series of particularly crazy opponents including a pirate, a clown, a mad scientist, and many others. I have already coded most of the fighting engine, and I am now refactoring code and working on systems to hold the game together—systems like the between-round stat menus and the between fight scenes.

My plan is to be finished with a working alpha by the end of the Easter break. Sadly, however, I have no current plans to make the demo available to the general public. As I mentioned in my previous post, I am still learning to program, and I have no idea how to encrypt my source code and files at this point. As a result, I hope you will all be content with the sound demos I promise I’ll post as soon as everything starts to come together.

Why blog? Why now?

I have been programming my boxing game for just four months, a figure which is significant because I have only been programming for four months. With all the learning, designing, actual coding, refactoring, and testing I’ve been doing, I’ve had my hands quite full. Upon reflection, though, I haven’t had my hands quite as full as they could have been …

When I’m not coding—a condition which is quite common—I work full-time at BLIND Inc., a non-profit, National Federation of the Blind training center located in Minneapolis, MN. After a full day of teaching, I have the privilege and pleasure of coming home to my wife, my cat, and an extremely comfortable couch. At such times it is easy to slip into a cozy lethargy of non-productive bliss—doubly so if I spend an hour or so exercising. As a result, I have spent many evenings whiling away my hours playing “Ouch! Ouch! Please stop biting my arm! Ow!” with my cat, reading a good book, catching up with people on messengers, screwing around on Facebook and Twitter, reading articles on Cracked and The Onion, playing my guitar, and, of course, spending time with my wife. While all of these activities are important for my mental stability, and the last, of course, is critical to my marital stability, I find myself all-too-often wasting more time on the first several activities than I spend on getting actual work done. Does this mean the game could have been done by now? I doubt it. It certainly could have been much further along, however.

                Part of the reason I haven’t said much—okay anything—about the project I’ve been working on is because I want to avoid the inevitable pressure that far too many accessible game developers have lamented—the type of pressure like “When are you going to release the game? When? When? When? Can I have a free copy? I want to beta test! Release the game! You’re lazy! I hate you but want you to release your product!” In worrying about this, though, I’ve realized three things.

First, the screamers are few and far between, and the nastiest of them can easily be taken care of by a smart tap of the delete key. Second, and far more important, I’ve left the community out of the development process—those of you with a real passion and love for the art form that is gaming. In worrying about a small handful of individuals, I have completely ignored the 99.9% of decent, fun-loving people out there whom I have spent the past eleven years forging relationships with. Finally, I have allowed my secrecy to act as a crutch on those days when I was just too lazy to develop. It is way too easy to tell myself that since nobody is aware of my project, nobody will mind if I take off tonight.

We need a change.

Starting today, I am pulling back the veil of secrecy to reveal the fledgling, often moody, Strunkenstein project that is my boxing game. I’m creating a development blog to keep everyone abreast of just what I’m up to, how the game is progressing, and any random thoughts which rise through the grey matter as I continue this journey. This means that you, the members of the blind gaming community, will get a first-hand look at what’s happening as it happens.

Are you ready? I am.

Let’s do this!