Sunteți pe pagina 1din 17

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Username: Barry James Book: Game Mechanics: Advanced Game Design. No part of any chapter or book may be reproduced or transmitted in any form by any means without the prior written permission for reprints and excerpts from the publisher of the book or chapter. Redistribution or other use that violates the fair use privilege under U.S. copyright laws (see 17 USC107) or that otherwise violates these Terms of Service is strictly prohibited. Violators will be prosecuted to the full extent of U.S. Federal and Massachusetts laws.

Example Mechanics
In this section, well discuss some mechanics commonly found in games across different genres. Well use Machinations diagrams to show how these mechanics can be modeled, but well also use the diagrams to discuss the mechanisms themselves in more detail. You can also find digital versions of all these examples online. When reading through the example mechanics, you will notice that we often isolate and model different mechanisms individually. This is done partly because models of complete games grow complex very quickly. It would be difficult to grasp all these mechanics from a single diagram for a game, especially because the printed diagrams in the book are static. In many cases, it is simply not necessary to look at all the mechanics in a game to understand the most important ones. After all, games are often built from several dynamic components. Thoroughly understanding each component is the first and most important step toward understanding the dynamic behavior of a game as a whole, even when (as in most games of emergence) the whole is definitely more than the sum of its parts. Power-Ups and Collectibles in Action Games The gameplay of action games emerges primarily from interesting physics and good player interaction. The levels of many action games are fairly linear: The player simply needs to perform a number of tasks, each with a certain chance to fail. His objective is to reach the end of a level before running out of lives. Figure 6.33 represents a small level for an action game with three tasks (A, B, and C). Each is represented by a skill gate that generates a number between 1 and 100. The player is represented by a resource that moves from pool to pool. If the player fails to perform a task, there are two options: Either he dies (as is the case with tasks A and C) or he is sent back to a previous location in the level (as is the case with task B).

1 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.33. Level progression in an action game Most action games are more than just a series of tasks, however. They usually have an internal economy that revolves around power-ups and collectible items. For example, in Super Mario Bros., the player can collect coins to gain extra points and lives, while power-ups grant the player special powers, some of which have a limited duration. Power-ups and collectibles can be represented in Machinations diagrams by resources that are harvested from certain locations. Figure 6.34 shows how this might be modeled using different colored resources to indicate different power-ups or collectibles. In this diagram, the player must be present at a certain location to be able to collect the power-up. This diagram also shows how power-ups and collectibles can be used to offer players different strategic options. In this case, the player can progress through the level quickly and fairly easily if she goes from location I to II and V immediately. However, she can also opt for the more dangerous route through III and IV, in which case she can collect one red and two extra yellow resources.

2 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.34. Collecting power-ups from different locations in an action game (lives are omitted from this diagram)

Tip In Figure 6.34, the blue power-up and the task that requires it constitute an example of a lock-and-key mechanism. Lock-and-key mechanisms are the most important mechanisms that games of progression use to control how a player progresses through a level. Lock-and-key mechanisms rarely incorporate feedback loops and so seldom exhibit emergent behavior. We will examine lock and key mechanisms in more detail in Chapter 10, Integrating Level Design and Mechanics. Power-ups might be needed to progress through a game, and in that case, finding the right power-ups is a requirement to complete a level. Other power-ups might not be needed but are helpful all the same; in this case, the player must decide how much risk she will take to collect one and how much she stands to gain from it. For example, in Figure 6.34, the blue power-up is required to perform the final task to complete the level, while the red power-up makes that task a little easier. Limited-Duration Power-Ups Power-ups frequently operate for only a limited amount of time. The construction in Figure
3 of 17 09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

6.35 shows how you can use delays to create a temporal power-up to aid in a task. The power-up respawns to be available again after it has been consumed.

Figure 6.35. Limited-duration power-up Collectibles also offer a player a strategic option. For example, if the player must risk lives to collect coins and must collect coins to gain lives, the balance between the effort and risk the player takes and the number of coins to be collected is crucial. In this case, if a player has collected nearly enough coins to gain an extra life, taking more risk becomes a viable strategy. Figure 6.36 represents this mechanism. Note that it forms a feedback loop. In this case, the feedback is positive, but the players skill determines whether the return on the investment is enough to balance the risk she takes.

Figure 6.36. Feedback in collecting coins that gain new lives Racing Games and Rubber Banding Racing games can be easily framed in economic terms as a game where the players objective is to produce distance. The first player to collect enough distance wins the game. Figure 6.37 illustrates this mechanism. Depending on the implementation, the production mechanism might be influenced by chance, skill, strategy, the quality of the players vehicle, or any combination of these factors. The Game of Goose is an example of a racing game in which chance exclusively determines the outcome of the game. Most arcade racing video games rely heavily on skill to determine a winner. More representative racing games that include vehicle tuning will probably involve some long-term strategy as well.

4 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.37. Racing mechanism A simple racing mechanism as represented in Figure 6.37 has a huge disadvantage. If skill or strategy is the decisive factor, the outcome of the game will nearly always be the same. Consider the mechanisms in Figure 6.38. It shows two players racing, and their skill is represented by different chances to produce distance. The chart displays a typical game session and indicates spreads of possible outcome. Obviously, the blue player is going to win nearly all the time.

Figure 6.38. An unequal race

Note We have intentionally implemented an extreme form of rubber banding to make it more visible. Real games would use more subtle boosting. Many racing games use a technique called rubber banding to counter this effect. Rubber banding is a technique of applying negative constructive feedback based on the distance between the player and his artificial opponents in order to make sure that they stay close. We have seen a construction like this already with LeBlancs example of negative feedback basketball. In that discussion, we pointed out that while negative feedback used like this might keep the players close together, it will not really make a poorer player win more often. However, there are adjustments that can be made to the rubber-banding mechanism to change that. If the negative feedback is made stronger and lasts for a time, its effects are changed. Figure 6.39 represents this type of rubber banding. The blue player has a skill level of 60%, while the red player has a skill level of 40%, so blue generates distance more quickly than red. The register at the right computes the difference in distance and, depending on which one is ahead, will signal their Boost source to generate a boost. The boost lasts for 20 time steps, and each boost will improve the players performance by 5%. The chart displays a typical game session that results from this mechanism. Note that the chart shows a race in which red and blue take the lead alternately.

5 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.39. Rubber banding with strong and durable negative feedback RPG Elements Many games allow players to build up and customize the attributes of their avatars or of a party of characters. Often the mechanics involved are referred to as RPG elements of the game. In this economy, skills and other attributes of player characters are important resources that affect their ability to perform particular tasks. The most important structure of the RPG economy is a positive feedback loop: Player characters must perform tasks successfully to increase their abilities, which in turn increases their chance to perform more tasks successfully. In classic role-playing games, experience points and character levels act as separate resources that structure the economy. Figure 6.40 shows how these mechanics might be modeled for a typical fantasy role-playing game. In this case, the player can perform three different actions: combat, magic, and stealth. Successfully executing these actions will produce experience points. When a player has collected 10 experience points, he can level up. The experience points are converted into a higher character level and two upgrades that he can use to increase his abilities. (In some games, experience points are not consumed, but trigger upgrades at stated thresholds. You can do this with a source that produces upgrades and an activator to fire it.) To spice up things a little, this diagram also contains a construction that occasionally increases the difficulty of the tasks. Using color-coding, the difficulty of each different task progresses differently. Normally a dungeon master (in the case of a tabletop role-playing game) or the game system would make sure players are presented with suitable tasks.

6 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.40. RPG economy with experience points and levels In Figure 6.40, the positive feedback loop is countered partially by a negative feedback loop that is created by increasing the number of experience points required to reach the next level every time the player levels up. This is a common design feature in the internal economies of many role-playing games. Such a structure strongly favors specialization: As players need more and more experience points to level up, they will favor the task they are better at, because these tasks will have a bigger chance to produce new experience points. This can be countered by applying negative feedback to the upgrade cost or impact for each ability separately (Figure 6.41), either instead of, or in addition to, the increasing costs to level up.

7 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.41. Alternative ways of applying negative feedback in an RPG economy Some RPG economies work differently; they give experience points whether an action succeeds or not. For example, in The Elder Scrolls series, performing an action often increases the player characters ability, even if that action is unsuccessful. In The Elder Scrolls, negative feedback is applied by requiring the action to be performed more times in order to advance to the next level of ability. This type of mechanism is illustrated in Figure 6.42.

Figure 6.42. An RPG economy without experience points controlled by the player FPS Economy At the heart of the economy of most first-person shooters there is a direct relationship between fighting aggressively (thus consuming ammo) and losing health. To compensate for this, enemies might drop ammo and health pick-ups when they are killed. Well show how to model this structure in a Machinations diagram in two steps ( Figure 6.43 and Figure 6.44).

8 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.43. Ammunition and enemies in an FPS game In the first step, ammunition is represented by a pool of resources. When the player chooses to engage an enemy, he wastes between two and four ammunition units and has a chance to kill an enemy. This is modeled by the skill gate between the Engage and Kill drains. In this case, the skill gate is set to generate a random number between 1 and 100 every time it fires. If the generated value is larger than 50, the Kill drain is activated, and one enemy is removed. The register labeled Skill can be used to increase or decrease this chance; it can be used to reflect more or less skilled players. Once an enemy is killed, a similar construction is used to create a 50% chance that five more ammunition resources are generated by the Drop Ammo source, which go into the Ammo pool. To keep things interesting, new enemies are spawned occasionally. Figure 6.44 adds player health to the diagram. In this case, poor performance by the player when engaging an enemy (such as when a number below 75 is generated by the skill gate) activates a drain on the players health. In addition to dropping ammunition, there now is also a 20% chance a killed enemy drops a medical kit (medkit) that the player can use to restore health.

Figure 6.44. Health added to the FPS game economy. Skill gates and random gates generate numbers between 1 and 100. Analyzing the mechanics in Figure 6.44 reveals that in the basic FPS game economy there are two related positive feedback loops. However, the effectiveness of the return of each feedback loop depends on the skill of the player. A highly skilled player will waste less ammunition, lose less health, and gain ammunition from engaging enemies, whereas a poorly skilled player might be better off avoiding enemies. The amount of ammunition a player needs to kill an enemy and the chance that killed enemies drop new ammunition or medkits obviously is vital for this balance. You could add a number of additional feedback loops to make this basic game economy more complex. For example, the number of enemies might increase the difficulty of killing
9 of 17 09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

enemies or increase the chance players will lose health fighting them, thus creating positive destructive feedback (a downward spiral). Negative constructive feedback could be created by having the players ammunition level negatively impact the players chance of killing an enemy. Players with little ammunition would magically fight a bit better, while those with a lot wouldnt fight quite so well. This would tend to damp down the effect of large fluctuations in ammunition availability. RTS Harvesting In a real-time strategy game, you typically build workers to harvest resources. Figure 6.45 represents a simple version of this mechanism with only one resource: gold. In this case, gold is a limited resource. Instead of using a source, the available gold is represented with a pool named Mine that starts with 100 resources. Note that the pool is made automatic so that it starts pushing gold toward the players inventory (the pool named Gold). The flow rate is determined by the number of workers the player has. Building workers costs two gold units. Note that the converter to build workers pulls gold only when there are two gold available: It is in pull all mode as indicated by the & sign.

Figure 6.45. Mining for gold in an RTS Most real-time strategy games have multiple resources to harvest, forcing players to assign different tasks to their workers. Figure 6.46 expands upon the previous one to include a second resource: timber. In this diagram, players can move workers between two locations by activating the two pools representing those locations. Workers in each location contribute to the harvesting of one of the resources. In this case, timber is also a limited resource (the Forest pool). The initial harvesting rate for timber is slightly higher than the harvesting rate for gold. However, as the workers clear the forest, the harvesting rate drops because they have to travel longer distances (you might recognize this situation from Warcraft). This mechanism is modeled by applying a little negative feedback on the harvesting rate of timber based on the number of resources left in the forest.

10 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.46. Mining gold and harvesting timber RTS Building In real-time strategy games, all those resources are harvested for a reason: You need them to build your base and military units. Figure 6.47 illustrates how resources can be used to construct a number of buildings and units. The diagram uses color-coding, and each unit type has its own color. Soldiers are blue, and archers are purple. Building types have their own color too: Barracks are blue, the mill is purple, and towers are red. Different colored activators are used to create dependencies between the building options: You need a barracks to be able to build units and a mill to produce archers and towers.

11 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.47. RTS building mechanics RTS Fighting An efficient way of modeling mechanics for combat between units is to give every unit a chance to destroy one unit of the opposition in each time step. This is best implemented with a multiplier. Figure 6.48 illustrates this mechanism. It features generic units from two armies (red versus blue), each in a pool; blue has 20 units, and red has 30. Every unit has a 50% chance of destroying an enemy unit in each time step. This is implemented with a state connection from the pool (the dotted line marked +1m) that controls how many units the blue army will try to drain from the red army, and vice versa. As blue has 20 units at the beginning of the run, the resource connection between the red pool, and its drain reads 20*50%that is, the 20 blue units each have a 50% chance of killing (draining) a red unit. Similarly, the 30 red units each have a 50% chance of killing a blue unit. In the first time step, the calculation will run, and some number of each armies units will be drained. The state connection will then update the flow rate of the resource connection to reflect the new number of units in each pool.

12 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.48. Basic combat in a real-time strategy game

Note Remember that a state connection always tracks changes in the node that is its origin. In Figure 6.48, the state connections reduce the multipliers that they point to because their origin pools are being drained.

Playing Around with Numbers You should take some time to play around in the Machinations Tool with simple constructions like the fighting mechanism of Figure 6.48. It trains your understanding of dynamic systems. For example, can you predict whether blues chances of winning increase when each sides chance to destroy an enemy each time step is lowered to 10% per unit? Or if blues chances increase if there are fewer units on each side, even if their relative strength is the same? Figure 6.49 was produced from a run with both sides starting with 20 units and a 10% chance of destroying an enemy. Studying this chart reveals a widening gap between the red and blue units starting roughly halfway through. By now, you should be able to attribute this shape to a positive feedback loop kicking in after blue takes a decisive lead in the battle. In some runs of this diagram, the feedback takes effect immediately leaving the winner with many units; in other runs, the feedback never matters much, and the two sides stay close until the very end, leaving the winner with only a few units.

13 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.49. A chart mapping the battle between 20 red and blue units We can expand this basic combat construction in two ways. First, we can take into account different unit types by using color coding. For example, we might distinguish between stronger and weaker offensive units by having each type of unit activate a different drain. This is illustrated in Figure 6.50. Blue units have more offensive power than green units, because they have a higher chance of destroying an enemy.

Figure 6.50. Combat with different unit types Orthogonal Unit Differentiation Ideally, every type of unit in a real-time strategy game should be unique in some way and not just a more powerful (but otherwise identical) version of another unit. This design principle is called orthogonal unit differentiation and was first introduced by designer Harvey Smith at the 2003 Game Developers Conference (Smith 2003). In Figure 6.50, the
14 of 17 09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

blue units have a greater chance of defeating an enemy than the green units, but they are otherwise identical, so they violate this principle. One way to (slightly) improve the design would be to lower the price of the blue units but also to make them available only after constructing an expensive building. This would differentiate their impact on the game: Investing in the blue units presents the player with a considerable risk and with a potential high reward against the fairly low-risk and low-gain strategy of going for green units. We can also add the ability to switch between offensive and defensive modes. This can be modeled using two different pools for attack and defense (Figure 6.51). By moving units from the defense to the attack, you start attacking your enemy. In this case, color coding can be used to prevent immobile units (such as towers or bunkers) from rushing toward the attack.

Figure 6.51. Offensive and defensive modes Technology Trees Real-time strategy games, but also simulation games like Civilization, often allow the player to spend resources to research technological advances that will give him an extra edge in the game. These constructions are usually referred to as technology trees and often add interesting long-term investments to a games economy. More often than not, the technology tree involves multiple steps and many possible routes to various advancements; these technology trees constitute interesting internal economies in their own right. To model technology trees, you should use resources to represent technological advances and have these resources unlock new game options or improve old ones. Figure 6.52 illustrates how a technology tree can be used to unlock and improve the abilities of a new unit type in a strategy game. The player can start building knights only after he researches one level of knight lore. Every level of knight lore also increases the effectiveness of the knights, although the research gets more and more expensive for every level. In this example, researching knight lore requires a considerable investment but rewards the player with stronger units.

15 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.52. Adding research to a strategy game In some technology trees, players can research each technology only once; however, many technologies require the player to have researched one or more technologies before. For example, Figure 6.53 represents a technology tree that is not unlike the one found in Civilization. Keep in mind that the effect of having a particular technology is omitted from this diagram. However, it is easy to imagine that technologies such as the alphabet and writing increase the resources available for research. In this diagram, the red connections enforce the order in which technologies must be researched, while the blue construction keeps track of the number of resources developed and adjusts the research prices accordingly.

16 of 17

09/30/2012 10:37 PM

http://my.safaribooksonline.com/print?xmlid=9780132946728...

Figure 6.53. A Civilization-style technology tree

17 of 17

09/30/2012 10:37 PM

S-ar putea să vă placă și