se 350 – programming games lecture 12: core mechanics lecturer: gazihan alankuş 2/10/20121
TRANSCRIPT
1
SE 350 – Programming Games
Lecture 12: Core MechanicsLecturer: Gazihan Alankuş
2/10/2012
Today’s Lecture is Different
• We will learn about elements of core mechanics• We will identify them in your game ideas• I expect you to think and participate• We won’t finish all of them today
• Some slides have questions. Ask them to yourself afterwards and answer them. – This will help you improve your game.
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
[Jesse Schell, The Art of Game Design]
Rethink your game idea with these in mind
Keep these in mind while improving your game
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Space
• Where things exist– Discrete vs. continuous– Dimensions (2D, 3D)– Bounded areas, connected or not– Nested spaces
• Most of your games are continuous• 2D and 3D
Questions: Space
• Is the space discrete or continuous?• How many dimensions?• What are the boundaries?• Are there sub-spaces? (other scenes)• Are there multiple ways of modeling your
game’s space?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Objects, Attributes and States
Object
Attribute
Attribute
Attribute
Value
Value
Value
Implemented as variables in components
Example
Ghost in Pac-Man
Position
Objective
Direction
(100, 200)
Avoid Pac-Man
left
(state machine)
Object Attribute Value
Secrets?
Questions: Objects, Attributes and States
• What are the objects in the game?• What are their attributes?• What are the possible states for each
attribute? – How do attributes change state?
• Any secret attributes?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Actions
• What can players do?– “Verbs” of game mechanics
• Operative actions– Move a checker forwards
• Resultant actions (more strategic actions)– Force the opponent to make an unwanted move
Actions: Emergent Gameplay
• Interesting resultant actions that emerge out of users’ behaviors– Identify them, nurture them
• Tips to support this– Add more verbs– Make verbs act on many objects– Goals can be achieved more than one way– Multiple avatars– Actions that change constraints
Questions: Actions
• What are the actions?– Which ones are operative?– Which ones are resultant?
• What objects do they act on?• How many ways can players achieve their goals?• Can users change constraints?• What resultant actions do you want to see?• Are you happy with resultant/operative ratio?• What actions do players wish they could do?– Can you enable them as operative or resultant?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Rules
• Tie together – Space– Objects– Actions– Consequences of actions– Constraints on actions
Goals• You can’t just tell them to do something unless
you set up the rules to favor it
Parlett’s Rule Analysis
Goals
• Concrete, understandable• Achievable• Rewarding
• Short-term• Long-term• Series of goals
Questions: Rules and Goals
• What are the foundational rules? • What are the related operational rules?• Are there different modes for rules?• What is the ultimate goal?– Is it clear?
• Are different goals related to each other in a meaningful way?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Skill
• Users’ levels of ability• Categories– Physical skills• DDR, guitar hero
– Mental skills• Puzzles
– Social skills• Most multiplayer games
Skill
• Balance difficulty and skill for best experience
Questions: Skill
• What skills does my game require from user?• Are there categories of skill that I’m missing?• Which skills are dominant? • Are these skills creating the experience that I
want? • Does the game demand the right level of skill?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
Chance
• Things happening randomly in the game• Uncertainty -> Surprises -> Good!• A simple random function may not be enough
Uniform Gaussian
Chance
Random seed
Always different values
Fixed seed Same sequence of values
Randomization in Unity• Random.seed: if you give the same seed you get the same
sequence of values• Random.value: Get a uniform random value in [0, 1]• Random.insideUnitSphere: Get a Vector3 inside a sphere with
radius 1 • Random.insideUnitCircle: Get a Vector2 inside a circle with
radius 1 • Random.onUnitSphere: Get a Vector3 on the surface of a sphere
with radius 1• Random.rotation: Get a random rotation as a quaternion• Random.Range(min : float, max : float): Get a random value in
[min, max] • Random.Range(min : int, max : int): Get a random value in [min,
max)
Getting Chance Right is Tricky
• Calculate probabilities• Make sure undesirable edge cases do not
happen
Risk Taking
• Expected probability vs. trust in own skill• Example– Monsters appear randomly– What are the odds of me
killing a monster if one would find me in that room?• High? -> will risk going in• Low? -> will not risk
Questions: Chance
• What in your game is truly random? – What parts just feel random?
• Does randomness give– Positive feelings (excitement and challenge)– Negative feelings (hopelessness and lack of control)
• Would changing my probability distribution curves improve my game?
• Do players have a chance to take interesting risks in the game?
Core Mechanics
• Space• Objects, attributes and states• Actions• Rules and Goals• Skill• Chance
• Rethink your game idea with these in mind• Ground your decisions with these• Later in your presentations inform us how
they influenced your designs