C HAPTER 10 CORE MECHANICS ZHONGSHI XI RACHEL MAILACH CORE MECHANICS: -determine how the game actually operates -heart of the game -defines rules and game-play
Quiz 1 What are the core mechanics of Tetris? A. A row is eliminated if and only if it is completely filled with blocks. B. The player hits the left arrow key to rotate the current shape counter-clockwise by 90 degrees immediately and permanently. C. The shape will “stick” at the position when one of its blocks collides with other blocks otherwise it will continue to fall. D. The game is over when there is a block outside the boundary. Tetris 1.68 ANSWER: -B, because… A does not specify details of the time, i.e. how long the delay is before the row is eliminated, or how this will affect any other rows, A is a RULE, not Core Mechanic C does not specify what “stick” means and what type of collision it is (ie, collision on the sides does not make it stick), also speed at which shape falls is not specified D does not explain what “outside the boundary” means
Turning Rules into Core Mechanics Early stages of game design: “Players will be penalized for taking too long to get through the swamp.” Core mechanics stage: “When the avatar enters the swamp, the black toadstools begin to emit a poison gas that the player can see filling the screen, starting at the bottom and rising at a rate of 1 game-world inch every 3 seconds; by the end of 3 minutes, the gas reaches the height of the avatar’s face, and if by that time the avatar is still in the swamp, the avatar dies. If the avatar returns to the swamp later, the gas is gone but the process starts over again from the beginning.” -It is your job as the designer to convert general concepts into detailed rules. -These rules will later be turned into algorithms. The more specific the rules, the easier they are to convert to algorithms. EXAMPLE: - “Early stages of game design” -not well defined: What is the penalty? How long does the player have? - “Core mechanics stage” -defined like algorithm -uses words like when , and if -views game as state machine DESIGN RULE: Design the game, not software (let the programmer handle the code implementation)
What the Core Mechanics Do Age of Empires -Operate internal economy of the game – how game creates, distributes and uses up goods on which game bases its economy. -Presents active challenges to player via UI as the level design specifies. -Player actions – converts actions from the UI and implements into game world. -Detects victory or loss – controls termination conditions, applies whatever consequences rules call for. -Operates AI of non-player characters and opponents. -Switches states of game – keeps track of current game- play mode and when a mode change is needed, the core mechanics switch the modes and signal the UI to update accordingly. -Transmits triggers to storytelling engine – when game events or player actions call for plot to occur.
Real-time vs Turn-based Warcraft II Civilization REAL-TIME -core mechanics specify parameters of a world that operates on its own whether the player acts or not - processes operate continuously -wait for event triggers TURN-BASED -core mechanics don't do anything until player takes turn, then effects are computed -in some games, all players enter actions simultaneously, then core mechanics compute effect of all players' actions -design will read like sequence of events -each possible action has effects -if game has artificial opponents, mechanics do not remain entirely idle between turns, because they must compute behaviour of the opponents, though the opponents still act in turns
Core Mechanics and Level Design LEVEL DESIGN -Level design specifies: type, timing, sequence of challenges -Core mechanics specify how challenges work but not which challenges the level contains -read level design data from file -initial state -challenges -actions -NPCs (Non-Player Characters) -victory conditions
Resources Star Craft RESOURCES -objects or materials in the game that can move or be exchanged (handled in numeric quantities) -a resource represents a type of object -the core mechanics define processes by which the game creates, uses, trades and destroys resources -may be of a type that can be handled individually, such as marbles, or it can be of a type not individually handled such as water -games treat non-measurable concepts such as popularity or resistance to poison as resources although in reality they can not be used as quantities that can be measured and be bought and sold.
Resources Settlers of Catan RESOURCES EXAMPLE: Wood constitutes as a resource in your game if your player can pick it up, trade it, and put it down again. BUT the resource doesn’t describe a specific marble in your player’s pocket. Wood is a resource, but the 3 wood cards in the player’s hand are an instance of the resource , referring to a particular collection of that type, in this case, wood. Thus the cards in the player’s hand are entities.
Entities Diablo 2 ENTITIES -a particular instance of a resource or a state of an element in the game world (eg. Light, on/off) -a resource is a type of thing, but an entity is the thing itself -a building, character, animal, pile of gold, or vessel of water can be an entity.
Simple Entities SIMPLE ENTITIES -single value stored data can be numeric such as a score, or symbolic like the state of a light eg. State of traffic light – initial state, and a list of all its possible states is stored eg. numeric entity – initial quantity, and range of possible legal values is stored
Compound Entities COMPOUND ENTITIES -takes more than one data value to describe eg. Vectors such as wind which has 2 attributes , speed, and direction -each attribute acts as a simple entity, OR a compound entity Example: objects in OOP -variables for storing numeric and symbolic values -may be made up of other objects (same way entities can be made up of entities) -classes of objects contain functions or methods (entities have associated mechanics) for data manipulation -This is why entities are almost always implemented as objects in code
Quiz 2 Which of the following are entities, and which are resources? A. Money in Command and Conquer B. Number of Mario’s lives in Super Mario C. Guns in Counter-Strike D. Crystals in Starcraft E. Sky in Sonic the Hedgehog ANSWER: A. Entity/Resource B. Entity C. Entity/Resource D. Entity/Resource E. Neither
Unique Entities FIFA UNIQUE ENTITIES -If game contains only one entity of a particular type (eg. the avatar b/c there is only one) -EXAMPLE: In a football game, the football is a unique entity, because there may never be two footballs in play at any one time
Quiz 3 Two players play Street Fighter on the same machine. Player A picks Ryu in white and Player B picks Ryu in blue. Is Ryu a unique entity in Street Fighter? Street Fighter ANSWER: -No, if there are multiple avatars it is clearly not unique
Mechanics Hearthstone MECHANICS -documents how the game world and everything in it behaves -states the conditions that trigger events and processes -describes the overall rules of the game, operates throughout the game, global mechanic -any game with more than one game-play mode needs at least one global mechanic to control when to switch modes -describes behaviour of specific entities from basics (eg. a light switch) to complex entities (eg. an AI) -recall list from section Functions of the Core Mechanics in Operation
Numeric & Symbolic Relationships Explore the two relationships in the game Angry Birds with respect to core mechanics. Angry Birds 1 NUMERIC RELATIONSHIPS -relationship between entities defined in terms of numbers and arithmetic operations -You must ensure that your equations are meaningful and will not have errors (eg. divide-by-zero) EXAMPLES: -bird’s initial velocity -energy stored in the stretched rubber band SYMBOLIC RELATIONSHIPS -values of symbolic entities (eg. red, on, off), cannot be manipulated algebraically -a two-state entity is called a flag EXAMPLES: -state of pig’s life (alive OR dead) -state of pig being hit (hit OR not hit)
Event, Processes & Conditions Example: World of Warcraft. A ghoul is wandering around in an area of 500m 2 at 1m/s. If the player comes within 10m of the ghoul, it will stop wandering, and approach the player at 3m/s. When the ghoul reaches less than or equal to 1m distance from player, the ghoul will start to deal damage to the player at a rate of 5 health points per second. Until the player leaves the wandering area of the ghoul (500m 2 ), the ghoul will fight him until death. If the player runs outside the wandering area of the ghoul (500m 2 ), the ghoul will stop attacking the player and return to the position it was at before approaching the player and continue wandering as it was. -Event is a specific change that happens after being triggered by a condition, DO NOT occur continuously, it doesn’t happen again until triggered again -Process is a sequence of activities that once initiated, continues until something stops it -Conditions is what causes a process to start or stop -If (condition) then execute (event) -Or if (condition) then do not execute (event) EXAMPLE: -Events: 1. Ghoul is hostile towards player 2. Ghoul is not hostile towards player -Processes: 1. Ghoul wanders around area 2. Ghoul stops wandering 3. Ghoul approaches player 4. Ghoul attacks player 5. Ghoul stops attacking player 6. Ghoul returns to original position
Recommend
More recommend