One of the biggest stumbling blocks I tripped over when the boxing game came to a screeching halt was the opponent creator. I know people are really excited about that feature; I am too. When I tried to conceptualize a system, though, I found that it kept getting progressively bigger and uglier, and after a while I didn’t even want to deal with it.
The problem, I think, lay in the design of the program. When I conceptualized the opponent creator, I had a continuous timeline in mind. Users would jump into the timeline, place their events, tweak everything so that it was just the way they wanted, save the character, and share it with whomever they chose. I quickly found, though, that people didn’t like this approach. They wanted to be able to create their own combos, build in AI, and perform lots of other functions that I had never even considered. Many of these ideas were good ones, and I thought it would be fun to implement them. In trying to do so atop my existing code, however, I created a Frankenstein mess that quickly became untenable. I had built the system for single events, not combos or AI or anything of the sort, so the system couldn’t easily handle the new suggestions.
So I’ve decided to do a bit of a rewrite, and it’s going to require messing with some of the existing engine. Here’s what I’m changing and what you can expect.
The current setup provides for two opponent conditions: blocking and not blocking. (Eloquent, I know.) When the opponent is blocking, you can’t hit him; when he’s not, you can. Sounds complicated, right? Well … kind of, yeah. One of the things people asked for was the ability to create different opponent behaviors depending on how well or poorly the opponent is doing. If the opponent is winning, perhaps he’d like to go in for the knockout. If he’s losing, he might put up his guard, and therein lies the problem. If the opponent blocking means he can’t be hit, then when the opponent goes on the defense, he is nearly invincible. Using the current system, the only way to avoid this problem would be to have the opponent come out from behind his guard to throw punches from time to time, a behavior that would be at odds with his defensive nature.
In the current system there are three ways to land a punch on an opponent:
- Hit him while he’s swinging at you.
- Hit him after you dodge one of his punches.
- Wait for him to drop his block, then sneak in a few punches. (more on this later)
All of the above factors conspire to create a game where the player is completely dependent on the opponent for his or her openings, which ostensibly makes this game a rich, detailed Bop It. Not cool!
The other issue that currently exists is one of stamina. Like the original Punch-Out! from which this game draws much of its inspiration, I had programmed the player so that he would lose fatigue for punching at a blocking opponent, but he would not lose any fatigue for landing a successful hit. Why? When I look back on this setup, it doesn’t really make sense. You can get just as tired hammering nails as you can from swinging a hammer at nothing, so why do you not lose stamina for successfully landing a punch? If I wanted to fix blocking, I realized, I needed to fix this too.
After banging my head against these issues for a while, I finally decided that the root of the problem lay in the opponents’ ability to become instantly invincible. If the opponent couldn’t block every single punch thrown at him, I reasoned, he could start adapting to different emotional situations without the unfair advantage of becoming a walking tank. With this in mind, and drawing inspiration from many of the mainstream games of today, I’ve started working on high and low blocks as an alternative. If an opponent is blocking high, he can still be hit low. The reverse is true if the opponent is blocking low. This will enable players and opponents alike to adjust play styles depending on how aggressive or defensive they are at any given moment.
But then comes the issue of stamina. Since it’s now possible to land many more punches, there needs to be a check in place that will keep the player from simply unleashing a torrent of key presses and battering the opponent into the ground. Thus, the new system will subtract stamina for both successful and unsuccessful hits, meaning that it won’t be advantageous to just slug away …
Or will it?
That’s all going to depend on the third major facet currently in the planning stages, statistics. Perhaps you’d like to be a bruiser with a take no prisoners attitude. Or maybe you’d rather be a calculating, careful fighter, using your mind and your reflexes to solve the sweet science. Perhaps you’re just a glutton for punishment and can’t avoid getting punched in the face to save your life—or at least your career. With customizable stats in place, all of these should be possible.
My current plan is to have four trainable stats: strength, speed, stamina, and vitality. The player will have the ability to train a few stats at the start of the game, and will gain additional points for participating in fights. This means that if you find yourself getting too tired during fights, you can use your training to improve your stamina in order to stay on your feet longer. If you know the next opponent is going to dish out some serious damage, you might consider dropping a few points into your vitality as a precautionary measure.
Finally, there’s the opponent creator I mentioned at the top of the post. People want combos, and they want the ability to create situation-based events. I want to give them these things, so here’s what I have in mind.
Instead of having a timeline to cover the entirety of the match, complete with too much scripting, opponents’ behavior will be based solely on combos. The game will choose from a set list of combos depending on the current situation—offensive, defensive, normal, etc.—and one will be chosen and executed. The nice part of this system is that it can create as much or as little complexity as the creator chooses. If you want to create a completely predictable opponent, only design a few combos for each situation. If you want someone harder to predict, you can design dozens—even hundreds—of combos, and the game will just choose from a larger set. Combine this with the already-existing ability to create punches of random height and side, and you have an extremely flexible system.
Many of these features are still in the design phase, but I firmly believe that, once implemented, they will combine to create a much richer, more satisfying game with greater replay value. By giving people a more detailed fighting system and a thorough opponent creation utility, I hope I can create something that many of you will be excited to play.
Before I can make any of this happen, though, I need to look through the old code, find out what needs to be kept and what needs to be scrapped, and make the necessary changes to the underlying infrastructure. It’s going to take a lot of refactoring, a lot of proofreading, and a lot of coding. I know. I’m excited too!