slides

advertisement
WHAT ARE CORE MECHANICS?
Core mechanics are the heart of a game;
they generate the gameplay and
implement the rules.
Formal definition: The core mechanics consist of data and the
algorithms that precisely define the game’s rules and internal
operations.
HOW DO YOU TURN RULES INTO CORE
MECHANICS?
•
In early stages of design, you may only have a hazy idea of the
details of your game’s rules.
•
When you design core mechanics, you define rules precisely and
completely.
WHAT ARE THE CORE MECHANICS?
As a project moves through different stages, the mechanics remain
the same, but their implementation varies.
First you document the algorithms in ordinary language in a design
document.
• If you wish to change the mechanics at this point, you simply edit
the document.
The core mechanics should be stated precisely enough that the
programmers can write code just using your design document.
• At this point, if you wish to change the mechanics, you have to ask
the programmers to change the code or the data files.
THE CORE MECHANICS AS PROCESSES
The relationship between the core mechanics and the game engine
is extremely close, because the core mechanics specify how the
game engine will behave.
The core mechanics do not dictate what the game engine will do;
rather, how the engine carries out actions is guided by the core
mechanics.
FUNCTIONS OF THE CORE MECHANICS
IN OPERATION
Core mechanics do multiple things, such as:
•
Operate the internal economy of the game.
•
Present active challenges to the player
•
Accept player actions
•
Detect victory or loss
•
Operate the artificial intelligence
•
Switch the game from mode to mode
•
Transmit triggers to the storytelling engine
REAL-TIME VERSUS TURN-BASED
Most games operate in real time, so the mechanics specify
parameters of a living world whether the player acts or not.
• AI-driven characters go about their business, traps check to see if
they should spring upon anyone, banks collect/pay interest, etc.
In turn-based games, the core mechanics don’t do anything until a
player takes his turn. Once a player finishes his turn, the core
mechanics compute the effects of his actions on the game world.
CORE MECHANICS AND LEVEL DESIGN
Most games present gameplay in separate levels, each with its own set of initial
conditions, challenges, and termination conditions.
When a level starts up, the core mechanics read the level design
data from a file.
The data includes: the initial state of the game world;
the challenges, actions, and NPCs; and the victory
conditions for the level
Core mechanics should specify how
challenges work in general, not
which challenges each level will
contain.
KEY CONCEPTS - RESOURCES
Resources refer to types of objects or materials the game can move
or exchange.
• Marbles constitute a resource in your game if your player can pick
up marbles, trade them, and put them down again.
The core mechanics define the processes by which the game creates,
uses, trades, and destroys resources.
Nonphysical concepts such as popularity or vague concepts such as
resistance to poison are often treated as resources.
KEY CONCEPTS - ENTITIES
An entity is a particular instance of a resource, or the state of some
element of the game world. There are three types of entities:
simple, compound, and unique.
Simple entities - The player’s score, or the current state of a traffic
light can be completely specified by a single datum; this is called
a simple entity.
Compound entities – It may take more than one data value to
describe an entity. For example, in a flight simulator, if the wind
has both speed and direction, then the wind is a compound
entity. Each of these values is called an attribute.
Unique entities – If a game contains only one entity of a particular
type, the it is a unique entity. The players avatar is usually an
unique entity.
KEY CONCEPTS - MECHANICS
Mechanics document how the game world and everything in it
behave.
Mechanics state the relationships among entities, the events and
processes that take place among the resources and the entities of
the game, and the conditions that trigger events and processes.
The mechanics can describe something as simple as a light switch or
something as complicated as the AI of a smart NPC.
RANDOM NUMBERS AND MONTE
CARLO SIMULATION
Random numbers are used all the time in games. When a random
number is chosen, it’s value is between 0 and 1.
Pseudo-Random Numbers
If you roll a set of die, you get a
certain outcome, and then roll the
die again, each roll is different from
the previous roll, but the sequence
of rolls is identical.
Pseudo-random numbers are extremely useful when tuning a game’s
mechanics. By using the same seed each time you play, you
always get the same random numbers.
Just before a game is ready to ship, the programmers change the
code to take a random seed.
MONTE CARLO SIMULATION
In Monte Carlo simulation, you make a large number of test runs of
your system using random inputs, and record the results in a
file. Then you can examine the file and make sure that the
outcomes reflect the behaviour that you expect.
To perform a Monte Carlo simulation with the sports example,
randomly generate two teams of athletes, with a variety of
random attribute settings for each athlete, then apply your
mechanic to them and record which team wins. Do this
repeatedly, 1000 times or so. Afterwards, analyze the data from
the simulations to see if any anomalies occurred.
Some examples of Monte Carlo simulation would be: to predict
profits when people buy products at different price points, to
predict the failure rate of new products, and so on.
Download