Thursday, September 03, 2009

TKO - Designing a fighting game - Part 1

The Long Road
TKO had a very long and winding road to the light of day. At the start of the project it was a reskin of Adult Swim's Naked Toonbots, a turn-based multiplayer "fighting game" which was really just fancy RPS (rock, paper, scissors)... with super moves.

Then this evolved into Naked Toonbots but you could build your own fighting robot by choosing arms, legs, torso and head. These parts would have different attacks and visual looks.

Then that evolved into real-time mutliplayer robot fighter where you could build your own robots. Luckily, at some point I decided the build-your-own feature was insanity so it was cut.

Beginning
So now we were making a "real" fighting game for the Cartoon Network demographic. Now the following statement may sound uninspired but it's the most important part of my job, I had to figure out what were the minimum features needed for a solid fighter. Our team is small and we have to make numerous games a year. Even the most most frugal game design is a huge amount of work. I needed a feature set that would produce a good fighting game (good for kids and yet solid enough to be a "real" fighter) and still be doable by our team in about 6 months.

Without a few key features a fighting game seemed pointless to create.
  1. You must have jumping attacks, standing attacks and low attacks. Fighting games are an elaborate series of RPS guessing games and this is the core system you must have.
  2. You must have at least 1) fast light-damage moves and 2) slow-heavy damage moves. This is a core risk/reward system for attacking. Range of attacks also plays a large role.
  3. You must have blocking and as a result you must have a move that defeats blocking (i.e. throwing)
  4. You need combos, they are fun.
  5. Characters needs to feel significantly different. They should require different strategies to play. For this, attacks unique to the character are required.
  6. You need a significant number of characters for players to play, at least 8 to cover the expected styles of fighting game characters.
Looking at this list, it's obviously a ton of work. However, there are many excellent fighting games on the market. The bar is set very high and without these key features the game would lack any value of production.

In addition to the unsaid requirement of making a fighting game. there were some explicit requirements as well.


Requirement - Simple controls.

Core attacks
I wrestled with numerous control schemes, 6-button, 2-button, 3-button. 6 seemed too many and 2 or 3 seemed too few. We explored doing things like direction + a button to keep the button number low but that was more complicated than having more buttons. I finally settled on 4 buttons, light punch, heavy punch, light kick and heavy kick.

Throws
We needed a throw and I think explicit throw command (not distance related move change) with throw miss animation is the best execution. We used both light attacks pressed at the same time ala Street Fighter 3 3rd Strike and Street Fighter 4.

Special Attacks
I decided to keep things simple all character would have the exact same special attack command, toward > toward > attack. While I think down > toward > attack is more classic for fighting games and easier to input, accidental special attack execution would be a problem when moving from crouch to forward.

Super Attacks
I wanted these to be very simple to execute. At the start I wanted the input to be all 4 attack key pressed at the same time. However, I discovered many keyboard will not accept more than 3 simultaneous key presses! While I did not want to add another key, using the SPACE key worked out well.

Requirement - One-click multiplayer gaming
Our last multiplayer game, Ben 10 Bounty Hunters, taught us a very important lesson, our site traffic is too great for the normal "make a room and let players join." The rooms churn too fast and this makes for a very frustrating experience. We opted for auto matching people and allowing them to either rematch with their current opponent or find a new one.

Requirement - In-browser
Another lesson from Bounty Hunters, our audience will not download a client. We had to make the game in Flash. Since Flash does not support P2P (without special Adobe software which was not released at the time, I am not even sure if its released now) this also meant that the game has to be client-server and not P2P. In addition to all this, there were a few extra challenges. Unlike many other multiplayer games, like racing and shooters, you cannot do movement prediction. To our knowledge, no one has ever made a real-time multiplayer fighter in Flash so our guys were doing the most difficult thing possible with no frame of reference. Our programming wizards spent a few months working out a system to get the needed messages passed as fast as possible and coming up with a slick server system to manager players.

The Plan

Now we know what we wanted to do, now it was time to plan the how. Stay tuned for Part 2 where I will detail our plan for animation production, character design and the importance of frame data, hitboxes and testing.

Labels: , , ,

Friday, April 03, 2009

Managing Multiple Game Objects in AS3

Managing loads of objects in a game can be one of the most challenging aspect of game programming. In sprite heavy games you are constantly making, moving and destroying objects. While much of my code is reused from game to game I always find myself trying to find better/easier ways to manage enemies, bullets and effects.

While I was teaching at AIA I tried teaching the "make an object that holds sprite vars and place it in an array" method. This is a commonly accepted method of managing sprites and their variables. This method was much too complicated for the programming level of the students so I tried to work up and easier way. I found you can simply use the Display List.

Step 1: Object Containers
Create a container for every groups of objects. Enemies, bullets, effects, etc. If you plan on only having sprites use a sprite for your container, if you will be adding movieclips use a mc for your container.


var cBullets:MovieClip;
...
cBullets = new MovieClip();
addChild(cBullets);
...


Step 2: Adding Objects
This is a bit old school but just dump you variables into your sprite/movieclip and add it to the container.

var aBullet:Bullet = new Bullet();
aBullet.speed = mySpeed;
aBullet.angle = myAngle;
aBullet.life = myLife;
cBullets.addChild(aBullet);


Step 3: Loop the container
Now loop through the container and operate on the objects


var i:Number = cBullets.numChildren;
while(i--){
var sp = cBullets.getChildAt(i);
sp.x += Math.cos(sp.myAngle) * mySpeed;
sp.y += Math.sin(sp.myAngle) * mySpeed;
//you can put collision here or whatever else you need
sp.life--;
//if your game sprite is a Sprite
if(sp.life == 0){
cBullets.removeChildAt(i);
sp = null;
// yes, a factory would be ideal
}
//if your game sprite is a MovieClip
if(sp.currentFrame == sp.totalFrames){
cBullets.removeChildAt(i);
sp = null;
}else{
sp.nextFrame();
}
}


I have not tested the efficiency of this method but it makes for very fast prototyping

Labels: , , ,

Monday, August 18, 2008

Ben 10 Bounty Hunters

Ben 10 Bounty Hunters, the CN Games Studio's biggest game ever! Ben 10 Bounty Hunters is an 8-player multiplayer battle. (Sorry IE only for now)

The Idea
Inspired by games like Soldat and Gunster, I wanted to make a 2D free-for-all battle game that was kid friendly. Kid friendly means, no real guns, no killing, etc. I also wanted to simplify and add some light auto-balancing features.

The Design
Ben 10 is an awesome property but it was impossible to use the main aliens from the show. The sizes are too radically different for a multiplayer game (Humongasaur vs. Gray Matter would be pretty unbalanced) and the show was moving towards the new Alien Force brand. We needed a setting that worked for story and game design.

The Mythos
We spoke with the show creator about the idea of 2 factions of bounty hunters (Six-Six is a favorite) that constantly wage battle to keep the other from finding the Omnitrix. While we were not using the core Ben Aliens as playable characters we highlight the setting of the Ben universe. The 2 factions of bounty hunters, Steglocks and Zyllids, fight on Wildvine's home planet among the ruin of a Gray Matter city or on the volcanic homeworld of Heatblast.

The Weapons
Kid friendly means no killing so the bounty hunters use "capture gel" weapons. Players are suspended for a moment is a bubble of goo. The weapon designs were tough. We wanted them to be recognizable as the core battle weapons (e.g. rifle, shotgun, SMG, etc.) but not look like real guns. I think they turned out perfect.

Players only have 1 primary weapon at a time and a backup weapon if primary weapon runs out of ammo. Primary weapons run out of ammo quickly. If a player is dominant with the shotgun, they run down to their backup weapon and give other player a chance to take them out at least once.

Weapons are designed for player skill and balance. The rifle does good damage but is hard to use due to the required precision. The shotgun does crazy damage but you have to be right next to your opponent. Both these weapons can be difficult to use so we have the spread gun. It is a mix of shotgun and rifle; it does a bit less damage but it easier to use.

Oh yeah, we have 2D sniping.

Capturing
The use of the "capture in place" mechanic worked out well. Players are released right where they are captured stacked with a few seconds of invincibility. This means no spawn camping. No area camping either because if you capture someone in a well-defensible area (or next to the rocket launcher spawn you were camping) you better run because they will be coming at you with invincibility in a few moments.

Levels
I was fretting over level design from the beginning. That was a big mistake that hindered the game in the early stages of design. I was focused on making a really flexible system for level design. In the end it didn't seem to matter as long as I followed a few simple rules (no dead ends. mix open and closed areas, etc.). Placement of items was used primarily to affect the level design as needed.

One thing I am really proud of if the level cropping. The levels are designed for 8 players but they are also designed to be cropped smaller for 2 or 4 players. No more running around a huge 8 player level looking for the 1 other guy on the map.

What's Next?
We couldn't simulate the kind of traffic CartoonNetwork.com brings so some unexpected bugs have popped up. We are fighting stability issues and making updates as fast as possible.

A great many things were cut for this release (what is that XP bar for?) but keep an eye our for all those goodies in a future update :)

Labels: ,

Thursday, August 30, 2007

Speaking at SIEGE

I haven't been active is quite a while. I suffered a major back injury and had to have surgery. I have been out of work for 2 months but I am going back next week. Good thing, I am going stir crazy.

I will be speaking at the Southern Interactive Entertainment& Game Expo (SIEGE) in early October. I racked my brain trying to think of a good topic and I think I finally came up with something. I wanted to find something unique. My game design position is a bit odd but I feel it allows me to see things other game developers/designers don't get to experience: volume.

Since I became a game designer at Cartoon Network I have worked on over 100 Flash/Shockwave games. I have worked with numerous people/companies on games and I see the same handful of mistakes repeated.

I have helped work out solutions for these issues so now when they come up its an easy fix.

This is not a slight against the companies that make games for CN. These are really smart, talented game developers. Our internal team has made some of these same mistakes but now that i have seen them so many times I recognize them easily and have checks in place so I don't make them from the beginning.

My talk will be these handful of mistakes. What are the mistakes? Why are they made? What are the solutions? I will present examples (not from actual games to conceal the identity of the innocent) of the mistakes and outline the solutions we use.

This talk will be applicable to anyone making Flash games or 2D games.

Labels: ,

Tuesday, May 29, 2007

New Game - Magnetface

Another new game!

Magnetface

So this was an idea I had a while back. I wanted to make a platformer with magnetic powers. I had seen other games with magnetic powers but I thought they were often overly complicated. These games I played were practically physics simulations, play with attraction and repulsion, etc.

I just wanted to bounce heavy objects off my character and make him fall down.

As luck would have it, in this episode of Billy & Mandy, Billy gets a magnetic face. There is SO MUCH cut from this game. I have many other ways to use this mechanic. Maybe one day we can make a sequel.

Our new game designer Adam Wolf (adamwolf.net) helped with testing and level design. Much of level 3 is his doing.

Labels: ,

Tuesday, May 01, 2007

New game - Outer Space Trace

We just finished up Outer Space Trace.

This is one of 5 games which will launched over the next 5 weeks. The CN Games Studio is doing the 1st and 5th games.

With this game I really wanted to push myself to make a mouse-based game. I have to use a special mouse and as a result my mouse dexterity is very poor. Due to this I have developed a bias to keyboard controlled games.

From the outset I was really excited about this design. I really felt it was one of my better designs, simple and easy to play, while still having enough variety and strategy for deeper play.

The programmer really helped realize this design. He & I worked together ironing out many design issues. I am so happy with the result.

My best connection is 28.

Labels: ,

Tuesday, April 03, 2007

New Game - Utter Nonsense

In a previous post I mentioned I wanted kids jumping around and yelling in front of their computer. Loco Motion was the jumping around, now here is the yelling.
Utter Nonsense

You get to talk to Cheese from Foster's Home for Imaginary Friends! Originally concepted for Fred Fredburger (from Billy & Mandy), the only lines of voice over were "Fred Fredburger", "Yes" and "AGH!" Utter Nonsense has 72 lines of VO!

I really wanted to make the game very easy. Again, we are dealing with a new way to play so I wanted to limit frustration as much as possible. So when you give your input its very easy to not fail but its not that easy to get a "Perfect" score. I think it worked out well.

Thanks to the CN Games Studio for doing such an awesome job.

Labels: