game mechanics examples

Upload: nevdull

Post on 03-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Game Mechanics Examples

    1/17

    Username: Barry James Book: Game Mechanics: Advanced Game Design. No part of anychapter or book may be reproduced or transmitted in any form by any means without theprior written permission for reprints and excerpts from the publisher of the book orchapter. Redistribution or other use that violates the fair use privilege under U.S. copyrightlaws (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 differentgenres. Well use Machinations diagrams to show how these mechanics can be modeled, butwell also use the diagrams to discuss the mechanisms themselves in more detail. You canalso find digital versions of all these examples online.

    When reading through the example mechanics, you will notice that we often isolate andmodel 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 asingle diagram for a game, especially because the printed diagrams in the book are static. Inmany cases, it is simply not necessary to look at all the mechanics in a game to understandthe most important ones. After all, games are often built from several dynamic components.Thoroughly understanding each component is the first and most important step towardunderstanding the dynamic behavior of a game as a whole, even when (as in most games ofemergence) 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 playerinteraction. The levels of many action games are fairly linear: The player simply needs toperform a number of tasks, each with a certain chance to fail. His objective is to reach theend of a level before running out of lives. Figure 6.33 represents a small level for an actiongame with three tasks (A, B, and C). Each is represented by a skill gate that generates anumber between 1 and 100. The player is represented by a resource that moves from poolto pool. If the player fails to perform a task, there are two options: Either he dies (as is thecase with tasks A and C) or he is sent back to a previous location in the level (as is the casewith task B).

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    2/17

    Figure 6.33. Level progression in an action game

    Most action games are more than just a series of tasks, however. They usually have aninternal 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, whilepower-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 thatare harvested from certain locations. Figure 6.34 shows how this might be modeled usingdifferent 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. Thisdiagram also shows how power-ups and collectibles can be used to offer players differentstrategic options. In this case, the player can progress through the level quickly and fairlyeasily if she goes from location I to II and V immediately. However, she can also opt for themore dangerous route through III and IV, in which case she can collect one red and twoextra yellow resources.

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    3/17

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

    Tip

    In Figure 6.34, the blue power-up and the task that requires it constitute an example of alock-and-key mechanism. Lock-and-key mechanisms are the most important mechanismsthat games of progression use to control how a player progresses through a level.Lock-and-key mechanisms rarely incorporate feedback loops and so seldom exhibitemergent 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 rightpower-ups is a requirement to complete a level. Other power-ups might not be needed butare helpful all the same; in this case, the player must decide how much risk she will take tocollect one and how much she stands to gain from it. For example, in Figure 6.34, the bluepower-up is required to perform the final task to complete the level, while the red power-upmakes that task a little easier.

    Limited-Duration Power-Ups

    Power-ups frequently operate for only a limited amount of time. The construction in Figure

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    4/17

    6.35 shows how you can use delays to create a temporal power-up to aid in a task. Thepower-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 tocollect coins and must collect coins to gain lives, the balance between the effort and risk theplayer takes and the number of coins to be collected is crucial. In this case, if a player hascollected nearly enough coins to gain an extra life, taking more risk becomes a viablestrategy. Figure 6.36 represents this mechanism. Note that it forms a feedback loop. In thiscase, the feedback is positive, but the players skill determines whether the return on theinvestment 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 playersobjective 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 productionmechanism 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 inwhich chance exclusively determines the outcome of the game. Most arcade racing videogames rely heavily on skill to determine a winner. More representative racing games thatinclude vehicle tuning will probably involve some long-term strategy as well.

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    5/17

    Figure 6.37. Racing mechanism

    A simple racing mechanism as represented in Figure 6.37 has a huge disadvantage. If skillor 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 isrepresented by different chances to produce distance. The chart displays a typical gamesession and indicates spreads of possible outcome. Obviously, the blue player is going to winnearly all the time.

    Figure 6.38. An unequal race

    Note

    We have intentionally implemented an extreme form of rubber banding to make it morevisible. Real games would use more subtle boosting.

    Many racing games use a technique called rubber bandingto counter this effect. Rubberbanding is a technique of applying negative constructive feedback based on the distancebetween 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 feedbackbasketball. In that discussion, we pointed out that while negative feedback used like thismight keep the players close together, it will not really make a poorer player win moreoften. However, there are adjustments that can be made to the rubber-banding mechanismto change that. If the negative feedback is made stronger and lasts for a time, its effects arechanged. Figure 6.39 represents this type of rubber banding. The blue player has a skilllevel of 60%, while the red player has a skill level of 40%, so blue generates distance morequickly than red. The register at the right computes the difference in distance and,depending on which one is ahead, will signal theirBoost source to generate a boost. Theboost 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 thechart shows a race in which red and blue take the lead alternately.

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    6/17

    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 aparty of characters. Often the mechanics involved are referred to asRPG elements of thegame. In this economy, skills and other attributes of player characters are importantresources 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 taskssuccessfully to increase their abilities, which in turn increases their chance to perform moretasks successfully.

    In classic role-playing games, experience points and character levels act as separateresources that structure the economy. Figure 6.40 shows how these mechanics might bemodeled for a typical fantasy role-playing game. In this case, the player can perform threedifferent actions: combat, magic, and stealth. Successfully executing these actions willproduce experience points. When a player has collected 10 experience points, he can levelup. The experience points are converted into a higher character level and two upgrades thathe 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 producesupgrades and an activator to fire it.) To spice up things a little, this diagram also contains aconstruction that occasionally increases the difficulty of the tasks. Using color-coding, thedifficulty of each different task progresses differently. Normally a dungeon master (in thecase of a tabletop role-playing game) or the game system would make sure players arepresented with suitable tasks.

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    7/17

    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 loopthat is created by increasing the number of experience points required to reach the nextlevel every time the player levels up. This is a common design feature in the internaleconomies of many role-playing games. Such a structure strongly favors specialization: Asplayers need more and more experience points to level up, they will favor the task they arebetter 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 eachability separately (Figure 6.41), either instead of, or in addition to, the increasing costs tolevel up.

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    8/17

    Figure 6.41. Alternative ways of applying negative feedback in an RPG economy

    Some RPG economies work differently; they give experience points whether an actionsucceeds or not. For example, in The Elder Scrolls series, performing an action oftenincreases the player characters ability, even if that action is unsuccessful. In The ElderScrolls, negative feedback is applied by requiring the action to be performed more times inorder to advance to the next level of ability. This type of mechanism is illustrated in Figure6.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 relationshipbetween fighting aggressively (thus consuming ammo) and losing health. To compensate forthis, enemies might drop ammo and health pick-ups when they are killed. Well show howto model this structure in a Machinations diagram in two steps (Figure 6.43 and Figure6.44).

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    9/17

    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 choosesto engage an enemy, he wastes between two and four ammunition units and has a chance tokill an enemy. This is modeled by the skill gate between the Engage andKill drains. In thiscase, 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, theKill drain is activated, and one enemy is

    removed. The register labeled Skill can be used to increase or decrease this chance; it can beused to reflect more or less skilled players. Once an enemy is killed, a similar construction isused to create a 50% chance that five more ammunition resources are generated by theDrop Ammo source, which go into theAmmo pool. To keep things interesting, new enemiesare spawned occasionally.

    Figure 6.44 adds player health to the diagram. In this case, poor performance by the playerwhen 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 isalso a 20% chance a killed enemy drops a medical kit (medkit) that the player can use torestore health.

    Figure 6.44. Health added to the FPS game economy. Skill gates and random gates generatenumbers between 1 and 100.

    Analyzing the mechanics in Figure 6.44 reveals that in the basic FPS game economy thereare two related positive feedback loops. However, the effectiveness of the return of eachfeedback loop depends on the skill of the player. A highly skilled player will waste lessammunition, lose less health, and gain ammunition from engaging enemies, whereas apoorly skilled player might be better off avoiding enemies. The amount of ammunition aplayer needs to kill an enemy and the chance that killed enemies drop new ammunition ormedkits obviously is vital for this balance.

    You could add a number of additional feedback loops to make this basic game economymore complex. For example, the number of enemies might increase the difficulty of killing

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

    17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    10/17

    enemies or increase the chance players will lose health fighting them, thus creating positivedestructive feedback (a downward spiral). Negative constructive feedback could be createdby having the players ammunition level negatively impact the players chance of killing anenemy. Players with little ammunition would magically fight a bit better, while those with alot wouldnt fight quite so well. This would tend to damp down the effect of largefluctuations in ammunition availability.

    RTS Harvesting

    In a real-time strategy game, you typically build workers to harvest resources. Figure 6.45represents 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 apool namedMine that starts with 100 resources. Note that the pool is made automatic sothat it starts pushing gold toward the players inventory (the pool named Gold). The flowrate is determined by the number of workers the player has. Building workers costs twogold units. Note that the converter to build workers pulls gold only when there are two goldavailable: 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 assigndifferent tasks to their workers. Figure 6.46 expands upon the previous one to include asecond resource: timber. In this diagram, players can move workers between two locationsby activating the two pools representing those locations. Workers in each locationcontribute to the harvesting of one of the resources. In this case, timber is also a limitedresource (theForest pool). The initial harvesting rate for timber is slightly higher than theharvesting rate for gold. However, as the workers clear the forest, the harvesting rate dropsbecause they have to travel longer distances (you might recognize this situation fromWarcraft). This mechanism is modeled by applying a little negative feedback on theharvesting rate of timber based on the number of resources left in the forest.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    11/17

    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 tobuild your base and military units. Figure 6.47 illustrates how resources can be used toconstruct a number of buildings and units. The diagram uses color-coding, and each unittype has its own color. Soldiers are blue, and archers are purple. Building types have theirown color too: Barracks are blue, the mill is purple, and towers are red. Different coloredactivators are used to create dependencies between the building options: You need abarracks to be able to build units and a mill to produce archers and towers.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    12/17

    Figure 6.47. RTS building mechanics

    RTS Fighting

    An efficient way of modeling mechanics for combat between units is to give every unit achance 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 twoarmies (red versus blue), each in a pool; blue has 20 units, and red has 30. Every unit has a50% chance of destroying an enemy unit in each time step. This is implemented with a stateconnection from the pool (the dotted line marked +1m) that controls how many units theblue army will try to drain from the red army, and vice versa. As blue has 20 units at thebeginning of the run, the resource connection between the red pool, and its drain reads20*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 timestep, the calculation will run, and some number of each armies units will be drained. Thestate connection will then update the flow rate of the resource connection to reflect the newnumber of units in each pool.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    13/17

    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. InFigure 6.48, the state connections reduce the multipliers that they point to because theirorigin 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 ofFigure 6.48. It trains your understanding ofdynamic systems. For example, can you predict whether blues chances of winning increasewhen each sides chance to destroy an enemy each time step is lowered to 10% per unit? Orif blues chances increase if there are fewer units on each side, even if their relative strengthis 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 redand blue units starting roughly halfway through. By now, you should be able to attributethis 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 withmany units; in other runs, the feedback never matters much, and the two sides stay closeuntil the very end, leaving the winner with only a few units.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    14/17

    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 accountdifferent unit types by using color coding. For example, we might distinguish betweenstronger 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 andnot just a more powerful (but otherwise identical) version of another unit. This designprinciple is called orthogonal unit differentiation and was first introduced by designerHarvey Smith at the 2003 Game Developers Conference (Smith 2003). In Figure 6.50, the

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    15/17

    blue units have a greater chance of defeating an enemy than the green units, but they areotherwise identical, so they violate this principle. One way to (slightly) improve the designwould be to lower the price of the blue units but also to make them available only afterconstructing 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 potentialhigh 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 bemodeled using two different pools for attack and defense (Figure 6.51). By moving unitsfrom the defense to the attack, you start attacking your enemy. In this case, color coding canbe used to prevent immobile units (such as towers or bunkers) from rushing toward theattack.

    Figure 6.51. Offensive and defensive modes

    Technology Trees

    Real-time strategy games, but also simulation games like Civilization, often allow the playerto spend resources to research technological advances that will give him an extra edge inthe game. These constructions are usually referred to as technology trees and often addinteresting long-term investments to a games economy. More often than not, the technologytree involves multiple steps and many possible routes to various advancements; thesetechnology 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.52illustrates how a technology tree can be used to unlock and improve the abilities of a newunit type in a strategy game. The player can start building knights only after he researchesone level of knight lore. Every level of knight lore also increases the effectiveness of theknights, although the research gets more and more expensive for every level. In thisexample, researching knight lore requires a considerable investment but rewards the playerwith stronger units.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    16/17

    Figure 6.52. Adding research to a strategy game

    In some technology trees, players can research each technology only once; however, manytechnologies 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 inCivilization. Keep in mind that the effect of having a particular technology is omitted fromthis diagram. However, it is easy to imagine that technologies such as the alphabet andwriting increase the resources available for research. In this diagram, the red connectionsenforce the order in which technologies must be researched, while the blue constructionkeeps track of the number of resources developed and adjusts the research pricesaccordingly.

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

    f 17 09/30/2012 1

  • 7/28/2019 Game Mechanics Examples

    17/17

    Figure 6.53. A Civilization-style technology tree

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