Rogue is a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. It is generally credited with being the first "graphical" adventure game, and was a favorite on college Unix systems in the early to mid-1980s, in part due to the procedural generation of game content.

-- http://en.wikipedia.org/wiki/Rogue_(computer_game)

Tuesday, May 18, 2010

Adding the Bells and Whistles

Yet another reason why I like programing. At the end of the day there is some form of tangible progress. Some days it isn't easily quantifiable, like yesterday's refactoring, but today saw two notable features added to the Connect Four. First was adding the "Dropping chip" animation. The animation was fairly simple. Depending on how many ticks since the last screen refresh, move the chip down a certain amount.

The trick was realizing that I had gone from a simple Boolean state to needing to be in one of four states depending on what was going on. Thus the old problem of the player_chip_added mentioned before rearing its ugly head. The end result was create a enumerated type of what "state" the game was in. And which methods should be run. The advantage I got out of this new device was that I can now easily add a fifth state to say it is the AI_PLAYER's turn. So the hook for adding a computer player is also in place.

The second accomplishment was kind of unplanned. I was quickly able to whip up TextImage object to hold, display and modify text for the output screen. It works well enough for Connect Four, but it needs a few more tweaks to offer the flexibility that I will want going forward.

This only leaves adding sound effects, and computing the actual AI left. I also plan to put in a simple starting splash screen and the choice to play single to dual player. Depending on how much time I have, I may even add a few more graphic elements, but for now it seems to be working nicely enough.

The sound portion is both easy and tedious. If I though making art elements was time consuming, try sifting though various sound effects to find something close to what I am thinking. I have seen enough behind the scenes production making films to know that Folly artists are a very curious lot. You never realize how important they are until they are not there. I also always though it was one of the coolest jobs out there.

As such I am not making my own sound effects. I barely have the facility to make simple art objects. Audio production is another kettle of fish. Even limiting myself to free sounds, there is a lot to sift though.

The AI will be interesting. It is one of those areas that will just require some thinking on my part for valid strategies. It will start fairly simple with a handful of rules then some randomness for fun. Connect four has been around long enough that there is a mathematical ideal play. But at this point I don't know what it is and I don't think I would want to make the game impossible. Though I might do so later.

0 comments:

Post a Comment