Special Design Issues for Sports GamesSports games face a number of design issues that are either rare or irrelevant in other kinds of games. Physics for Sports GamesDuring play, your game will be running a physics engine that determines the behavior of moving bodies in the match. The physical behavior of an inanimate object such as a baseball is comparatively easy to implement. The physical behavior of humans , however, is much more complicated. Early sports games tended to treat a running athlete rather like a rocket: She had a velocity vector that gave the speed and direction of her movement, and an acceleration vector that gave the force and direction with which she was pushing. Modern sports games have much richer simulations with a great many variables , taking into account such things as the friction coefficient of the playing surface ”for example, rain and snow make fields slippery and reduce traction. Designing the physics simulation for a sports game is a highly technical problem and is beyond the scope of this book. However, we offer one caveat: Because a sports game is a simulation of the real world, it is a common error to think that the physics in a sports game should be as realistic as possible. They shouldn't be, for two reasons:
For both of these reasons, it's necessary to fudge the physics to make the game playable . We slow the pitch so that the batter has a reasonable chance of hitting it, and we artificially adjust the position of the bat so that it intersects the path of the ball. It doesn't matter whether the physics perfectly copy the real world as much as whether they seem to be producing a reasonable simulation of the sport as it is played by professionals. Even in a highly realistic game, your objective is to provide an enjoyable experience, not a mathematical simulation of nature. Rating the AthletesOne of the biggest tasks you have in designing a sports game is developing a rating system for the skills and athletic abilities of all the athletes in the game. The rating system provides the raw data that the physics engine needs to simulate the behavior of the athletes accurately. As your programming team develops the physics engine and game AI, you should work with them to determine what ratings are needed. Researching the athletes' performance and setting the ratings for them is a task that can take many months, and you will probably want to delegate it to junior designers or assistant producers . In most team games, the athletes have one set of ratings common to all of them, plus specialized ratings that apply only to athletes playing a particular position. Common RatingsThese are examples of the kinds of ratings that might be common to all the athletes in a game:
Specialized RatingsThese ratings apply to a specific position ”in this case, the quarterback in American football:
Athlete AI DesignThe AI in most computer games is rather crude. In action games and first-person shooters, the player's AI-driven opponents typically have a small number of behaviors triggered by specific events (appearance of the player on the scene, being shot at, and so on). When they're together in a group , they very seldom act in concert or assign special roles to particular individuals, nor do they help each other. It's every monster for itself. When there are no stimuli, they go into a simple idle loop, walking aimlessly around or standing still. These kinds of actions aren't acceptable in a sports game. People don't mind if a monster in a first-person shooter wanders randomly around, but the athletes in a sports game must behave like humans, and that means deliberate , intelligent action. Particularly in team games, each athlete is working with the others on the team to accomplish particular goals. The position the athlete plays dictates behavior to some extent, but within those boundaries, the athlete still has to respond intelligently to a number of possible events. In a relatively simple sport such as tennis, there might not be many of these events, but in a highly complex sport such as American football, with 22 players on the field at a time, there can be hundreds. Defining the State SpaceThe best way to design sports-game AI is to map out a game's states as a giant flowchart. There could be far more states than you realize at first. Corner kick in soccer is not just one state, but several. There is the period before the ball is kicked, after it has been kicked but has not yet touched another athlete, after it has been touched by another athlete, and so on. See Figure 12.2 for a partial example. Figure 12.2. A flowchart detailing part of the "corner kick" situation in soccer.
Consult the official rules of the sport as you construct the flowchart: They will often describe states in detail, with special rules applying to each. However, the rules alone are not enough; they describe game states for the purposes of listing legal and illegal actions, but not for tactics or strategy. Whenever something changes that requires the athletes to adopt a different tactic, the game has moved into a different state. Setting Collective and Individual GoalsAfter you define the game states, you can start thinking about what the team should do in that state ”where each athlete should be trying to go and what he should be trying to do to support the team's collective goal at that moment. In some cases, these activities are defined with reference to a specific individual on the opposing team, trying to prevent him from doing his job. The software must have a way of matching up athletes with their opponents, just as the real athletes do. When you have defined what the team should be trying to accomplish in a particular state and have assigned each athlete a role, you then must define exactly how the athlete is to perform that role: what direction he moves, what other movements he makes, which animations should be displayed, and so on. If the role is a defensive or supportive one, such as covering an opposing athlete, the individual AI for it might still be fairly complex. For example, a soccer player dribbling the ball might make a feint, trying to fool his opponent into thinking he's passing the ball. The software knows perfectly well that this is a feint, but sometimes the defender should be fooled and sometimes he shouldn't, depending on his awareness rating and, in either case, how he responds. An athlete with nothing to do shouldn't just stand still. Most sports games include fidgets , short animations in which the athlete shifts his weight, stretches his arms, or makes some other neutral action every few seconds. Even if play is underway but the athlete is not closely involved ”the third baseman on a fly ball to right field, for example ”he at least should turn and watch the action. InjuriesInjuries are a sad but common side effect of sports, and serious simulations take them into account. Because they occur somewhat randomly, they're outside the player's control and can be frustrating. Most sports games allow the players to turn off injuries if they don't like the effect that they have on the game. Although it's possible for an athlete to injure herself simply by running or jumping, this doesn't provide the player with any visible explanation for why the injury occurred. A lot of sports games therefore limit injuries to cases in which there has been a collision of some kind, usually between two athletes. To determine whether an injury has occurred, you should include such factors as the relative speed of the two athletes, their weights, their respective susceptibilities to injury, and a random factor. The heavier an athlete is, the more force she imparts in a collision, and it is the force that does the damage to the other athlete. Some positions , such as the pitcher in baseball, are simply so stressful that they can result in injuries without a collision, especially the longer the pitcher stays in the game. You can compute the probability of an injury on every pitch and raise it slightly with each one. You can also decide which part of the body sustained the injury and the length of time for which it will disable the athlete. Study reports of injuries and recovery times for the sport you are simulating. If your game tracks athletes over a period of time, you will have to consider the cumulative effect of injury and recovery time on their careers. Arcade Mode Versus Simulation ModeArcade mode versus simulation mode is a realism switch that lets the player adjust the behavior of the game to suit his tastes. Arcade mode makes the game more exciting at the expense of realism ; simulation mode makes it a more accurate simulation of the real sport at some expense in fun. For example, in baseball, an athlete is doing well if he has a .333 batting average ”that is, gets a hit only one time in three. Some players might find that a little dull. Switching the game to arcade mode could let the player get a hit 50 percent of the time or even more. It skews the play toward lots of action and relatively few strikeouts or walks. In American football, you could artificially increase the number of completed passes by improving the quarterback's throwing accuracy and the receiver's catching skills. To implement arcade mode, you'll have to decide what sort of changes to the real game would make it more exciting. If you want your game to have both arcade and simulation modes, we recommend that you start with the serious simulation first and then design the "fudges" that make it arcadelike. Serious simulations are much more difficult to tune, and it's important to get them right first. If you start with an arcadelike design and then try to make it serious, you might never get it right. Simulating Matches AutomaticallySports games that can play an entire season for a whole league of teams often provide a means of simulating matches automatically, without the player having to play them. For example, each team in professional baseball plays 162 matches in a season . With 30 teams and 2 teams in each match, this is a total of 2,430 matches ”only the most rabid fan would want to play them all personally . To generate results for matches that the player doesn't play, you need a way of simulating a match. Of course, you'll want the resulting scores to accurately reflect the relative strengths of the teams: A bad team should be able to beat a good team occasionally, but not often. Computer Versus ComputerThe simplest way to simulate matches automatically is to let the computer play out the match in computer versus computer mode, as described in the section, "Competition Modes," earlier in this chapter, and record the results. If the game's simulation model is good, it should produce scores that reflect the real abilities of the competitors . Unfortunately, this is a slow way to do it. If the player wants to generate results for a match that she doesn't really care about, she probably wants it done quickly. Simulation Without GraphicsOne solution is to simulate the whole match exactly as in computer versus computer mode, but to turn off the graphics so that nothing is displayed. Because displaying the graphics often takes up the majority of the computer's time, an entire match can be simulated in a few seconds. Electronic Arts' Earl Weaver Baseball game did this successfully. It makes the programming more complicated, however, because throughout the whole program, there have to be checks to see if the game is in simulation mode or display mode. When you do this, test the game to be sure that the results without graphics are the same as those with graphics. Faking ItThe alternative many games adopt is to fake it ”in effect, to roll dice to generate game scores. The dice are loaded somewhat so that good teams get high scores and bad teams get low ones, and whichever team rolls the highest score wins the match. You will need to devise a suitable algorithm for generating point values: In games such as American football and rugby, in which different numbers of points are awarded for different kinds of scores (touchdown, field goal, and so on), certain score values are much more common than others. It's extremely rare, for example, for a team to end an American football game with a score of 2. You'll also need to make sure that your algorithm creates a reasonable random distribution; no professional soccer game should ever end with a score over about 15. One disadvantage of this dice-rolling technique is that it doesn't generate any other statistics besides the scores themselves . In a particularly statistics-rich sport such as baseball, if you don't generate performance data for each individual player, some fans will consider your game to be a lightweight, not a serious, simulation. It's up to you to decide just how important that market is to you and how much effort you're prepared to exert to meet their expectations. Licenses, Trademarks, and Publicity RightsMany years ago, small developers could make and sell computer games using names such as "NFL" and get away with it, because the National Football League never knew it was happening. You can't do this now. Interactive entertainment is big business, and you have to be scrupulously careful to avoid violating trademarks or personal publicity rights. Team and League TrademarksThe exact details vary from league to league and country to country, but generally in America, the name, logo, uniform design, and other indicia of all the teams in a league, plus the name and logo of the league itself, are licensed for use by the league. You, or your publisher, will have to negotiate an agreement with the league to use these symbols in your game. Before Electronic Arts signed an agreement with the NFL, early versions of John Madden Football referred to teams only by their town names (such as San Francisco or Chicago) rather than by their team names (the 49ers and the Bears) and did not show any logos. The colors of the uniforms were similar but not exactly the same. You can pull this trick, too, if you dare, but you're risking a lawsuit if you get too close. Individual sports, such as gymnastics or figure skating, are often governed by a variety of bodies in different countries around the world. The names and indicia of particular events, such as the Kentucky Derby, are owned by the organizations that produce them ”in this case, the Churchill Downs racetrack. In recent years, these groups have begun to exploit their intellectual property rights in a variety of ways, so they tend to come down hard on anything that seems to be an infringement. Don't assume that just because an event has been around for decades, you can freely use its name. Personal Publicity RightsYou cannot use the name or photograph of a real athlete without permission. An athlete's name and likeness are part of his personal publicity rights, and, of course, famous athletes sell the rights to use their names for millions of dollars when they endorse a particular product as an individual. You might need to negotiate with an organization that licenses the rights to use all the players' names collectively. This might be the league, in some cases; in others, however, including the NFL and Major League Baseball, you have to contact the athletes' unions. And unless you have the endorsement of a specific athlete, you must make sure that your game displays all athletes in approximately the same way, or endorsement could be implied . You can't make it look as if an athlete has endorsed your game when that's not the case. Photographs present further difficulties. You must obtain a license from the person in the photograph and also from the person who took the photograph: the photograph's copyright holder. Again, some governing bodies have special clearinghouses for these kinds of things: NFL Photos is a special department of the NFL that licenses still photos for all the photographers who are accredited to take pictures at NFL matches. The license, however, does not grant you the personal publicity rights of the athlete in the picture; you have to obtain those separately. You can also license photos from the trading card companies, as well as from journalistic bodies such as the Associated Press, and from private photo libraries. In short, the whole issue of rights in sports games is a legal minefield. Nowadays, even the stadiums might claim special rights, and many stadium owners auction the name of the stadium to the highest bidder, as with 3Com Park in San Francisco. As a designer, you probably won't have to deal with obtaining all these licenses yourself, but you should know that it's not safe to specify simply that a game will use all the team and player names and photos. Obtaining them and the right to use them is a very costly and time-consuming business. It's best to design the game in such a way that it doesn't depend on having these things, unless you're certain that they will be available. Audio CommentaryMost sports games try to reproduce the experience of watching the sport on television. An important part of that experience is hearing the announcers' commentary, or play-by-play. Most TV and radio sports broadcasts include at least two people, the play-by-play man and the color commentator . The play-by-play man describes the play on a moment-by-moment basis. The color commentator, usually a retired coach or player, offers insights about strategy and tactics, as well as background material on the teams or individual players. A third voice that you occasionally hear is that of the stadium announcer over the public address system. His remarks tend to be quite formulaic, although they do occasionally include requests to move misparked cars , retrieve found children, and so on. Defining the Events to DescribeA good way to size up the job of duplicating the audio experience is to record a TV broadcast of a real match and then transcribe everything that is said and by whom. Do this for two or three matches, and you will begin to notice patterns in the play-by-play: The announcers tend to announce the score at particular times, they use certain repetitive language, and so on. As you watch the match on videotape, take note of the different kinds of events that occur and the different remarks they elicit from the commentators. The color commentator's events aren't the same as the play-by-play man's. The color commentator speaks at more dramatic moments, or when an athlete has done something particularly spectacular (or particularly bad). For example, in tennis, you might have a color comment like, "She's having a terrible time with those double faults" when an athlete commits four double faults in a single game. Be sure you play it only once, however ”not on every subsequent double fault. When you have a set of match events that you want to create commentary for, sit down with the programmers and discuss them to make sure they are detectable. Some, such as a strikeout in baseball, will be uncomplicated, but a lot of them will be judgment calls. For example, a dropped pass in football that the player really should have caught is not so easily detectable; you can detect the dropped pass, but what determines whether he should have caught it? It must be calculated from such things as the receiver's dexterity rating and the accuracy with which the pass was thrown in the first place ”provided that it wasn't tipped away by a defender. It's always best to err on the side of caution in these cases: Don't design judgment calls that the player is likely to disagree with, or he'll think your game is stupid. As the saying goes, "It's better to remain silent and be thought a fool than open one's mouth and remove all doubt." Don't forget the introductory and wrap-up material at the beginning and end of the match ”for example, "Welcome to Mile High Stadium for today's game between the New England Patriots and the Denver Broncos. It's a cold and windy day." Writing the ScriptWhen you have established the events that need audio commentary, you can start to write the audio recording script that will implement it. For each event, you will typically want to record four or five variant comments so that the players don't hear the same thing every time the event occurs. Obviously, the more comments you can write per event, the better your game will sound. The number of comments is really limited only by the available space on the distribution medium and the number of things you can reasonably think of to say about a given event. As you write the script, you will discover places where a name or number will need to be included, usually the names of athletes or teams or the current score. If the sport is one with a large number of athletes, you cannot afford to record the sentence with every possible athlete's name in it. Instead, you will need to record the sentence as a whole using a sample name and edit the resulting audio file into clips, one part before the name and one part after. Your programmers must devise a method of streaming the sound clips, inserting the correct name in the right place in such a way that they sound seamless. When you record the sentence , use a sample name that begins and ends with a T or a K sound so that it doesn't slur into the rest of the sentence and so that it can be cut cleanly. For example, "Merrick steps up to the free throw line" enables the engineer to cut between Merrick and steps , whereas "Rogers steps up to the free throw line" would produce a slur from Rogers into steps . Whenever possible, you should try to write the script in such a way that names are at either the beginning or the end of a sentence. You can then have your voice talent record the names of all the athletes who appear in the game. Each name will need to be recorded twice, once using the voice inflection for the beginning of a sentence, and once at the end. Don't try to record the names by themselves; record a complete sentence and then throw away all but the name, for example, "Thomas takes it" and "I'll pick Thomas." Again, using the T and K sounds adjacent to the name allows a clean cut in the audio.
Other PeculiaritiesThe following sections detail a few other issues peculiar to sports games. Invented SportsFrom time to time, someone tries to create a sports video game of a completely invented sport, as opposed to a take-off of an existing one. Empire Interactive's Speedball 2100 was one such game. Experience shows, however, that this is a risky enterprise. Hardcore sports gamers are seldom interested in completely new sports; they'd rather play a game that simulates a sport that they're already familiar with. Other types of gamers aren't that interested in sports games anyway and aren't very likely to want to play a one-off sports game unless it appeals to them for some other reason. If you're thinking of inventing a new sport specifically for a video game, we advise you to design it as a video game, without concerning yourself with what it might be like in the real world. This is how Speedball was designed; although it was theoretically a sport, it included powerups and other arcade-game elements to make it more interesting. As we said earlier, one of the trickiest aspects of sports game design is mapping real-world activities to a limited input device. Players are willing to tolerate some awkwardness in the user interface when it's a real sport because they understand the problems. With an invented sport, they're unlikely to be so generous. When designing a completely new sport, you might consider working backward from the controller to the sport itself, designing around the limitations of your hardware. Instant ReplayInstant replay is now an essential part of watching sports on television, so naturally video game players want it as well. It's not difficult to design, although it might be difficult to implement. Your game will need to keep track of the exact position and animation step of every player and other key objects on the field in each game frame. When the player requests an instant replay (usually through a pause menu), the game can play them back. Of course there is a limit to how much of this information you can keep around, and some natural boundary is likely to suggest itself ”in baseball, the time since the most recent pitch; in American football, the time since the ball was snapped. In continuously flowing games such as basketball , you might have to establish an artificial time limit. The best instant-replay mechanisms allow all the following features for maximum flexibility:
Instant replay lets the players see the action from perspectives that they can't use when actually playing the game. For the game's publisher and developer, it's an invaluable tool for grabbing dramatic screen shots or gameplay footage for sales and demonstrations . You should consider it an essential feature of any sports game that you design. Camera Difficulties in Games with Widely Separated ActionIn most sports, the focus of the action is in one location. In a race, it's on the leaders . In any soccerlike sport (soccer, hockey, basketball, water polo, and so on), it's on the object that's supposed to go into the goal; similarly, in any tennislike sport, it's on the ball. Baseball and cricket are unusual in that the action takes place in two places at once: where the ball is and also where the runners are. In baseball, this can be as much as 400 feet away. You can't show both the runners and the ball without zooming out to a blimp view so high up that nobody can see anything clearly. To solve this, most baseball video games implement a picture-in-picture solution: The camera follows the ball, but a small diagram of the baseball diamond in one corner of the screen shows the positions of the runners, often as no more than colored dots (see Figure 12.3). When a runner reaches a base, his dot changes color to indicate that he is safe. The player controlling the fielders watches the main screen, and the one controlling the runners watches the diagram (keeping one eye on the main screen to see if the ball is coming). Because cricket has only two stumps instead of four bases, this arrangement is even easier. Figure 12.3. 3DO's High Heat Baseball . Note the inset showing player positions. The round dots adjacent to the bases are runners taking their leads.
Home-Field AdvantageConsiderable debate has raged over the years about whether to build a home-field advantage into sports games. Although the home-field advantage is statistically significant in a number of sports, we recommend against it. Players like to feel that they are playing a fair game, and if they know that the odds are artificially stacked against them whenever they play an "away" game, they will resent it. It's also unclear exactly how the home-field advantage should be implemented. The phenomenon is normally observed from win-loss statistics, but, of course, the computer can't simply turn a loss into a win. It could shave off a percentage of goal-scoring attempts, but even this is likely to have odd side effects. If a scoring attempt that clearly should have succeeded fails for no visible reason, the players are bound to notice it.
|