SlideShare a Scribd company logo
1 of 50
Designing Specific Game Components
Lesson 4
Exam Objective Matrix
Skills/Concepts MTA Exam Objectives
Designing Game States and
Loops
Plan for game state (3.2)
Designing Objects and
Characters
Animate basic characters (4.1)
Transform objects (4.2)
Designing Physics-Based
Animations
Work with collisions (4.3)
Introduction to Game States and Loops
• The design of the game does not end with creating
the visual design.
– You need to design the progress of the game from
one game state to the next.
– You also need to decide which characters and objects
will be present at each game state and the actions
they will be able to perform.
• The game components that you need to design at
this stage include:
– Gameflow, game states, and game loops
– Objects and characters
– Physics-based animations and AI
Creating Gameflow
• Gameflow is the progression of the game
from one state to another state.
• The features of a gameflow are:
– Challenge
– Pace
– Scripted events
– Instinctive training areas
– Trial and error
– Instinctive prompt
– Player vocabulary
Gameflow: Challenge and Pace
• Challenges are the key source of
interaction in a game.
– A challenge motivates the players to use their
logic and skill to perform some tasks or solve
a puzzle to move ahead in the game.
– Without challenges, the game becomes
boring.
• Pace refers to the rate at which the
excitement happens in a game.
– A game should aim to keep the excitement
level of a player high until the end of the
Gameflow: Scripted Events and Training Areas
• Scripted events are minor objects or events that
are programmed.
– These scripted events are usually triggered by an
action from the player.
– The best use of scripted events is to teach the various
aspects of a game to the players. These events do
not interrupt the flow of the game.
• Instinctive training areas let players experiment
with their moves or logic without affecting the
progress of the game.
– Players can then use the same moves and logic to
overcome the obstacle or solve the puzzle.
Gameflow: Trial and Error
• Trial and error is a method that facilitates
learning.
– The players can make a move and view the
consequences of the move.
– They can then modify the move to get better results.
– Trial and error gives the players an opportunity to
learn about the consequences or results of different
moves.
– Too much trial and error, however, leads to player
frustration with the game.
Gameflow: Instinctive Prompt and Player
Vocabulary
• Instinctive prompt is based on the player's
learned behavior that he or she gains from the
computer knowledge.
– The player's learned instinctive moves are the correct
moves that help the player to progress in the game.
• Player vocabulary refers to the knowledge and
experience that the players gain during the
process of playing the game.
– The purpose of player vocabulary is to enhance the
skill of the players so that they are ready to take up
more challenges.
Game States
• A game state defines an object at a given
point in time in the game.
– In a car racing game, you might have a
brand new car as well as a broken down
car. You want to define the dissimilar
properties for both the cars.
– The game state allows you to make such
definitions. You can create different game
states and then define what each object in
a game state does in that state.
Game State Sequence Sample
Managing Gameflow
• You can control the gameflow through
game states.
– To ensure that the game runs smoothly and
contributes to a good gameflow, you need to optimize
the game states.
– For each game state, you must provide something
that is worthy of the player’s attention.
– At the same time, you must ensure that you are not
burdening the player with too many tasks in a given
game state.
Managing Performance: Scene Hierarchy
• Scene hierarchy refers to the tree
structure arrangement of logical and
sometimes spatial representation of a
graphical scene.
– Scene hierarchy is useful for optimizing the
rendering and for collision detection, which
in turn optimizes the frame rate.
– Scene hierarchy uses instancing to reduce
memory costs and increase speed. This is
possible because of the parent-child tree
structure of a scene hierarchy.
Managing Performance: Frame Rate
• Frame rate is the rate at which an image is
refreshed.
– Expressed in frames per second (fps), which is the
number of frames displayed per second by a display
device.
– Low fps makes motion appear with considerable
delay, which affects the player’s capacity to interact
with the game.
– An fps that varies a lot between seconds due to the
load of heavy computation makes the motion seem
choppy or jagged.
Managing Performance: Graphics Pipeline
• A graphics pipeline refers to the current
method of drawing images on a screen
through a conversion of vector graphics
format or geometry into raster or pixel
image.
• The 3D geometry is given as input at one
end of the pipeline; the 3D engine
processes the geometry, and gives the
output as a 2D image that is presented on
the screen.
Graphics Pipeline Stages
• Visibility: What should display on the screen?
• Clipping: What is in the viewing area of the camera?
• Culling: Is the image to be placed facing the camera?
• Occlusion: Is the object hidden from the camera’s point
of view?
• Resolution: What is the resolution of the display?
• Transformation and lighting: How will the objects and
characters in the game be moving, scaled, lighted, and
so on?
• Rasterization: How will the gameplay elements be drawn
on the screen using pixels?
Graphics Pipeline Flowchart
Game Loops
• At the heart of a game’s code is its main
loop, (or game loop) which is responsible
for coordinating the actions of the game’s
program.
• In its basic form, the main loop performs
two functions:
– Executes the actual gameplay
– Draws the game components
Sample Main Loop Pseudo Code
While (player does not exit)
{
Update player position according to input from
keyboard or mouse or joystick.
Update AI according to player position.
Update Physics and Sound Engine.
Calculate culling and clipping
Set proper shader to objects and set Render
states Draw game objects
}
Managing the Main Loop
• By default, the XNA Framework’s Game
class manages a main loop.
• The XNA Framework provides the
following methods for the main loop to
interact with the game platform:
– Update: called whenever the game logic
needs to be processed.
– Draw: called whenever it is time to draw a
frame.
Types of Game Loops
• How often the Update method is called in
a game is defined by the type of game
loop used.
• There are two types of main loops:
– Fixed step: the game code calls the
Update method at fixed intervals.
– Variable step: the game code calls the
Update and Draw methods continuously
regardless of TargetElapsedTime.
Game Loop Comparison
Type of Game
Loop
Features Pros Cons
Fixed Step • Position of a
sprite =
position of the
sprite +
distance
moved per
update
• Easier to
calculate the
physics
associated
with movement
• Easier to
record actions
per time step
• Not suitable for
time-based
animations
Variable Step • Position of a
sprite =
position of the
sprite +
distance
moved per
update*timeEla
psed
• Easier to code
• Smooth
running of
game
• Hard to replay
or record
actions as time
steps vary
Transforming Objects
• Transformation is converting the
geometrical vertices of objects and
characters to proper positions on the
screen.
• The transformation process involves a set
of activities that are performed on these
vertices in relation to three spatial
references: world, view, and projection.
Matrices in XNA
• The XNA Framework requires three different
matrices for transformation before the three-
dimensional model is rendered on the 2D
screen.
• The transformation of the coordinates usually
happens in the graphics pipeline.
1. To transform the coordinates from the object
space to the game world known as the world
space, you need to provide a world matrix.
Matrices in XNA
2. The vertices in the world space need to be
transformed so that it lies in the camera space
known as the view space, which is the line-of-
sight of the player or the player character. To
achieve this, you need to provide a matrix
known as view matrix.
3. Finally, the XNA needs to project the 3D
coordinates in the view space onto the flat 2D
screen, which is called the projection space.
For this, you need to provide a matrix called the
projection matrix to the XNA.
Vectors in XNA
• You use vectors to represent a direction
and the scale of geometry.
– The Vector2 class represents a vector with
two components (X and Y).
– The Vector3 class represents a vector with
three components (X, Y, and Z).
– The Vector4 class represents a vector with
four components (W, X, Y, and Z).
Triangles: Primitive Objects
• Every object in computer graphics can be split
into triangles.
– A triangle is the primitive part of any shapes.
– A box or even a circle can be formed using
triangles.
– To form 2D images of the 3D objects you
create for the game, you need to break the
object into triangles.
– You then input the 3D triangle information in
the graphics pipeline and then the XNA
Framework converts the information to draw
Using Solution Explorer to Add Content
Deforming Objects
• Sometimes, you will need to change the shape of a
game model from its original shape as a result of an
event.
– Examples: depicting different states of a car (new,
crashed), to make a character fat or thin, to create
ocean waves, or simply to change the appearance of
an object.
– To deform the object, you have to manipulate the
geometry and the texture information by changing the
3D geometry information of the object and then
sending the revised information for transformation into
2D pixels.
– Deforming objects is made easy by the use of
shaders.
Keyframe Interpolation
• You generally present animation as a series of
images.
– If there is some processing delay, your game could
end up showing jagged animations.
– To prevent this, you must use the interpolation
concept and provide in-betweens or frames that lie
between a start frame and an end frame.
– Interpolation refers to the method of constructing
new data points in between the two separate sets of
defined data points.
– In-betweens are frames constructed between two
keyframes.
Comparing Keyframe Interpolation Methods
Interpolation Method Feature Example
Linear The individual
interframes move with
constant speed.
A spaceship traverses
diagonally at a constant
speed.
Discrete The animation moves
from one keyframe to
the next without any
interpolation.
A spaceship disappears
from the first corner and
appears at the second
corner.
Splined The animation displays
realistic movement of
objects within the
specified duration.
A spaceship moves fast
at the start, slows
towards the center, and
then speeds up towards
the second corner,
giving a realistic feel of
an actual spaceship in
movement.
Animation
• After modeling a character, you need to
animate it. Animation is essentially a
series of frames or images.
• Animating the basic character involves:
– Movement
– Frames per second (fps)
– Sprite animation
– Scaling and rotating matrices
Animation: Movement
• In general, animating a character involves
rotation and movement or translation of
the character.
• Once you play the animation, you need to
update it every frame. You can do it by
calling the Update method of the
AnimationPlayer object in the
Game.Update method.
Animation: Frame Rate
• Frame rate is the speed at which the
image is refreshed.
– A frame refers to a single image produced
by the imaging or a display device.
– Frames refers to unique consecutive
images and second just refers to the unit of
time in which they are displayed.
– For example, an animation that is locked at
12 fps takes one second to view every 12
consecutive unique images.
Animation: Sprite Animation
• Sprite animation works on the principle that
animation in 2D games can be set by creating a
group of images that vary only slightly from each
other.
– The differences in the images should be such that the
human eye cannot distinguish these dissimilarities.
– To create the sprite animation of a spaceship, for
example, you first prepare the bare minimum number
of frames required for animation.
– You then make these frames move around one after
another in a continuous motion. You do not need to
manually redraw the frames for each loop.
Animation: Scaling and Rotating Matrices
• The matrix structure in XNA contains 4 x 4
elements for the matrix values.
• You can use matrices for enlarging the objects in
an animation and for rotating the objects around
the axes.
– These are referred to as scaling and rotating matrices
respectively.
• You can also use a matrix for calculating the
distance between two objects and changing the
positions of both depending on the calculated
distance.
Creating Realistic Characters
• In real life, when we look at a person, we take in
much more than the person’s physical
characteristics.
– The way the shadow falls beside the person or the
way the sunlight hits the person’s hair can influence
our perception of the person.
• Methods in game design:
– Applying filters to textures
– Using lighting
– Using shaders
– Using projections
Applying Filters to Textures
• To make an image realistic, you use
textures.
– A texture is a 2D image that is applied on a game
object or character to define its surface.
– Sometimes creating a texture alone is not sufficient.
– You need to apply filters to your texture to create a
realistic feel.
• When you work with textures, you
determine where in a particular space a
texture will be applied, which is called
texture mapping.
Using Lighting
• Lighting as a game design component is one of the
most important and influential elements that
enhances the aesthetics of your game visuals.
– It has the power to make or break the visual theme
and the atmosphere of a game.
– Without the lighting effect, the complete game
environment would look flat and uninteresting.
– Lighting makes the visuals look scary or cozy.
– It augments the three-dimensional feel of the objects
and creates composition and balance to lead the
player’s eyes around.
Using Lighting to Create Fear
Using Shaders
• A shader is the surface property of an object or
character.
– Characteristics such as color, shine, reflection,
refraction, roughness of a surface.
• The vertex shader takes the 3D position of the
vertex, multiplies it with a matrix, and then
transforms it into 2D screen coordinates.
• The pixel shader draws each pixel of the screen
using the coordinates it receives from the vertex
shader. The pixel shader calculates only the color
for each pixel.
Using Projections
• In a game, you need to use projections to effect
scaling and view changes to the character or an
object’s environment.
– As as example, you can also use projections to throw
blood splats on a wall when a player character
standing close to the wall is hit.
Generating Objects with User-Indexed Primitives
• Based on changes to the player character’s
environment, you might need to update the feel of the
character.
– You will need to generate objects using a set of coordinates and
properties that you define that will direct the GPU to draw custom
made objects.
• The XNA Framework allows you to create custom-made
objects using the primitive methods of the
GraphicsDevice class such as the
DrawUserIndexedPrimitives.
– Using this method, you can direct the GPU on how you want it to
interpret and, therefore, draw vertices stored in an array.
Designing Physics-Based Animations
• Scripted animations (keyframe animations)
are ideal for predetermined sequences
that form a part of the storyline.
– Not really suitable for animations depicting
real life however.
• Physics-based animation, in contrast to
traditional keyframe animation, mimics real
life more closely; the realism results from
physics modeling.
Physics Concepts
• The following basic physics concepts
should be understood when creating
physics-based animations:
– Linear motion
– Angular motion
– Force
– Inertia
– Collision
Physics Concepts Extended
• The basic physics concepts can be
applied to the motion of types of objects.
– Rigid body dynamics is the study of how to
represent and implement the animation of
rigid bodies.
– Soft body dynamics is the study of how to
represent and implement the animation of
soft bodies.
– Fluid dynamics is the analysis of animation
of fluids.
Physics Engines
• A physics engine is computer software that
takes care of all mathematical calculations for
implementing the physics concepts. It makes the
task of a game developer easy by:
– Manipulating the outcome when objects in the
game collide
– Applying gravity on the objects in the game
world
– Calculating the force applied on an object and
manipulating the movement of that object
accordingly
Collision Detection and Response
• Collision detection involves determining whether
objects or characters in a game world overlap
each other.
– Rectangular bounding box
– Per pixel
• Collision response involves determining the
necessary action that should take place based
on the nature of the collision involved.
– Changes in direction
– Changes in appearance
– Changes in position
Designing AI
• Designing AI in video games includes
methods to produce the delusion of
intelligence in the behavior of
nonplayer characters (NPC).
– The AI in the game makes decisions using
selective methodology and acts according
to the selected option.
– the purpose of AI in games is not for
intelligence, but for providing more realistic
challenging game entities for game
players.
AI Strategies
• Most obvious action strategy
• Characterization-based strategy
• Condition-based strategy
• Path-finding strategy
• Rubber strategy
Recap
• Game States and Loops
• Introduction to Gameflow
• Game States
• Managing Gameflow
• Managing Performance
• Graphics Pipeline Stages
• Game Loops
• Managing the Main Loop
• Types of Game Loops
• Transforming Objects
• Matrices
• Vectors
• Triangles: Primitive Objects
• Using Solution Explorer
• Deforming Objects
• Keyframe Interpolation
• Animation
• Creating Realistic Characters
• Designing Physics-Based
Animations
• Physics Concepts
• Physics Engines
• Collision Detection and
Response
• Designing AI

More Related Content

What's hot

Power point lesson 08
Power point lesson 08Power point lesson 08
Power point lesson 08heidirobison
 
cpbricks project document
cpbricks project documentcpbricks project document
cpbricks project documenti i
 
Chapt 1 (part 2) installing the sdk and exploring the workspace
Chapt 1 (part 2)   installing the sdk and exploring the workspaceChapt 1 (part 2)   installing the sdk and exploring the workspace
Chapt 1 (part 2) installing the sdk and exploring the workspaceMuhd Basheer
 
Chapt 2 storyboarding techniques
Chapt 2   storyboarding techniquesChapt 2   storyboarding techniques
Chapt 2 storyboarding techniquesMuhd Basheer
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
Analog game gdd_revised
Analog game gdd_revisedAnalog game gdd_revised
Analog game gdd_revisedjowyn
 
Cmd unity withc
Cmd unity withcCmd unity withc
Cmd unity withcumairnoora
 
Sony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development DivisionSony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development DivisionSlide_N
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)noorcon
 
Chapt 1 (part 1) mobile apps framework and platforms
Chapt 1 (part 1)   mobile apps framework and platformsChapt 1 (part 1)   mobile apps framework and platforms
Chapt 1 (part 1) mobile apps framework and platformsMuhd Basheer
 
Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actorsMuhd Basheer
 
Module 8 pcb editor basics
Module 8   pcb editor basicsModule 8   pcb editor basics
Module 8 pcb editor basicslucky250
 

What's hot (20)

Power point lesson 08
Power point lesson 08Power point lesson 08
Power point lesson 08
 
Ao5 presentation
Ao5 presentationAo5 presentation
Ao5 presentation
 
cpbricks project document
cpbricks project documentcpbricks project document
cpbricks project document
 
Chapt 1 (part 2) installing the sdk and exploring the workspace
Chapt 1 (part 2)   installing the sdk and exploring the workspaceChapt 1 (part 2)   installing the sdk and exploring the workspace
Chapt 1 (part 2) installing the sdk and exploring the workspace
 
Chapt 2 storyboarding techniques
Chapt 2   storyboarding techniquesChapt 2   storyboarding techniques
Chapt 2 storyboarding techniques
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
1. case study
1. case study1. case study
1. case study
 
Game design document
Game design document Game design document
Game design document
 
unity basics
unity basicsunity basics
unity basics
 
Glow_rapport
Glow_rapportGlow_rapport
Glow_rapport
 
Analog game gdd_revised
Analog game gdd_revisedAnalog game gdd_revised
Analog game gdd_revised
 
Cmd unity withc
Cmd unity withcCmd unity withc
Cmd unity withc
 
Kodu game design
Kodu game designKodu game design
Kodu game design
 
Sony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development DivisionSony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development Division
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Chapt 1 (part 1) mobile apps framework and platforms
Chapt 1 (part 1)   mobile apps framework and platformsChapt 1 (part 1)   mobile apps framework and platforms
Chapt 1 (part 1) mobile apps framework and platforms
 
Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actors
 
Mini Project- Game Hardware Development
Mini Project- Game Hardware DevelopmentMini Project- Game Hardware Development
Mini Project- Game Hardware Development
 
Module 8 pcb editor basics
Module 8   pcb editor basicsModule 8   pcb editor basics
Module 8 pcb editor basics
 

Viewers also liked

The career search project word
The career search project wordThe career search project word
The career search project wordTracie King
 
Roles and Responsibilities: Developing the Team
Roles and Responsibilities: Developing the TeamRoles and Responsibilities: Developing the Team
Roles and Responsibilities: Developing the TeamTracie King
 
Chapter 5 balance
Chapter 5 balanceChapter 5 balance
Chapter 5 balanceTracie King
 
98 374 Lesson 02-slides
98 374 Lesson 02-slides98 374 Lesson 02-slides
98 374 Lesson 02-slidesTracie King
 
Chapter 13 color
Chapter 13 colorChapter 13 color
Chapter 13 colorTracie King
 
98 374 Lesson 06-slides
98 374 Lesson 06-slides98 374 Lesson 06-slides
98 374 Lesson 06-slidesTracie King
 
98 374 Lesson 01-slides
98 374 Lesson 01-slides98 374 Lesson 01-slides
98 374 Lesson 01-slidesTracie King
 
The career search project
The career search projectThe career search project
The career search projectTracie King
 
Chapter 5 balance
Chapter 5 balanceChapter 5 balance
Chapter 5 balanceTracie King
 
Computer Literacy Lesson 1: Computer and Operating Systems
Computer Literacy Lesson 1: Computer and Operating SystemsComputer Literacy Lesson 1: Computer and Operating Systems
Computer Literacy Lesson 1: Computer and Operating Systemscpashke
 

Viewers also liked (13)

Max2015 ch01
Max2015 ch01Max2015 ch01
Max2015 ch01
 
The career search project word
The career search project wordThe career search project word
The career search project word
 
Roles and Responsibilities: Developing the Team
Roles and Responsibilities: Developing the TeamRoles and Responsibilities: Developing the Team
Roles and Responsibilities: Developing the Team
 
Chapter 5 balance
Chapter 5 balanceChapter 5 balance
Chapter 5 balance
 
98 374 Lesson 02-slides
98 374 Lesson 02-slides98 374 Lesson 02-slides
98 374 Lesson 02-slides
 
Chapter 13 color
Chapter 13 colorChapter 13 color
Chapter 13 color
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
98 374 Lesson 06-slides
98 374 Lesson 06-slides98 374 Lesson 06-slides
98 374 Lesson 06-slides
 
98 374 Lesson 01-slides
98 374 Lesson 01-slides98 374 Lesson 01-slides
98 374 Lesson 01-slides
 
Ic3 gs4exam1
Ic3 gs4exam1Ic3 gs4exam1
Ic3 gs4exam1
 
The career search project
The career search projectThe career search project
The career search project
 
Chapter 5 balance
Chapter 5 balanceChapter 5 balance
Chapter 5 balance
 
Computer Literacy Lesson 1: Computer and Operating Systems
Computer Literacy Lesson 1: Computer and Operating SystemsComputer Literacy Lesson 1: Computer and Operating Systems
Computer Literacy Lesson 1: Computer and Operating Systems
 

Similar to 98 374 Lesson 04-slides

Initial design (Game Architecture)
Initial design (Game Architecture)Initial design (Game Architecture)
Initial design (Game Architecture)Rajkumar Pawar
 
Game elements
Game elementsGame elements
Game elementsaealey
 
Sephy engine development document
Sephy engine development documentSephy engine development document
Sephy engine development documentJaejun Kim
 
Technical aspectof game design (Game Architecture)
Technical aspectof game design (Game Architecture)Technical aspectof game design (Game Architecture)
Technical aspectof game design (Game Architecture)Rajkumar Pawar
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesBryan Duggan
 
2-Game Design (Game Design and Development)
2-Game Design (Game Design and Development)2-Game Design (Game Design and Development)
2-Game Design (Game Design and Development)Hafiz Ammar Siddiqui
 
Progressive content generation
Progressive content generationProgressive content generation
Progressive content generationJayyes
 
[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic
[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic
[Pandora 22] Boosting Game Design with Analytics - Nikola VasiljevicDataScienceConferenc1
 
22-GameDesign.ppt
22-GameDesign.ppt22-GameDesign.ppt
22-GameDesign.pptUma Mahesh
 
GDF: A Gamification Design Framework powered by Model-Driven Engineering
GDF: A Gamification Design Framework powered by Model-Driven EngineeringGDF: A Gamification Design Framework powered by Model-Driven Engineering
GDF: A Gamification Design Framework powered by Model-Driven Engineeringantbucc
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorNick Pruehs
 
Iistec 2013 game_design for id_m_broyles_id13333
Iistec 2013 game_design for id_m_broyles_id13333Iistec 2013 game_design for id_m_broyles_id13333
Iistec 2013 game_design for id_m_broyles_id13333Marie Broyles
 

Similar to 98 374 Lesson 04-slides (20)

Initial design (Game Architecture)
Initial design (Game Architecture)Initial design (Game Architecture)
Initial design (Game Architecture)
 
Game elements
Game elementsGame elements
Game elements
 
Sephy engine development document
Sephy engine development documentSephy engine development document
Sephy engine development document
 
Game design doc template
Game design doc   templateGame design doc   template
Game design doc template
 
Tyira.ppt
Tyira.pptTyira.ppt
Tyira.ppt
 
Technical aspectof game design (Game Architecture)
Technical aspectof game design (Game Architecture)Technical aspectof game design (Game Architecture)
Technical aspectof game design (Game Architecture)
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
 
Chess Engine
Chess EngineChess Engine
Chess Engine
 
2-Game Design (Game Design and Development)
2-Game Design (Game Design and Development)2-Game Design (Game Design and Development)
2-Game Design (Game Design and Development)
 
Progressive content generation
Progressive content generationProgressive content generation
Progressive content generation
 
[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic
[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic
[Pandora 22] Boosting Game Design with Analytics - Nikola Vasiljevic
 
intern.pdf
intern.pdfintern.pdf
intern.pdf
 
Cocos2d programming
Cocos2d programmingCocos2d programming
Cocos2d programming
 
22-GameDesign.ppt
22-GameDesign.ppt22-GameDesign.ppt
22-GameDesign.ppt
 
GDF: A Gamification Design Framework powered by Model-Driven Engineering
GDF: A Gamification Design Framework powered by Model-Driven EngineeringGDF: A Gamification Design Framework powered by Model-Driven Engineering
GDF: A Gamification Design Framework powered by Model-Driven Engineering
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
 
Presentation 8.pptx
Presentation 8.pptxPresentation 8.pptx
Presentation 8.pptx
 
Iistec 2013 game_design for id_m_broyles_id13333
Iistec 2013 game_design for id_m_broyles_id13333Iistec 2013 game_design for id_m_broyles_id13333
Iistec 2013 game_design for id_m_broyles_id13333
 
Soc research
Soc researchSoc research
Soc research
 
Connect (4|n)
Connect (4|n)Connect (4|n)
Connect (4|n)
 

More from Tracie King

Interface: Creating the connection
Interface: Creating the connectionInterface: Creating the connection
Interface: Creating the connectionTracie King
 
Gameplay: Creating the Experience
Gameplay:  Creating the ExperienceGameplay:  Creating the Experience
Gameplay: Creating the ExperienceTracie King
 
Game Story and Character Development
Game Story and Character DevelopmentGame Story and Character Development
Game Story and Character DevelopmentTracie King
 
Production and Management: Developing the Process
Production and Management: Developing the ProcessProduction and Management: Developing the Process
Production and Management: Developing the ProcessTracie King
 
Chapter1 design process
Chapter1 design processChapter1 design process
Chapter1 design processTracie King
 

More from Tracie King (19)

Interface: Creating the connection
Interface: Creating the connectionInterface: Creating the connection
Interface: Creating the connection
 
Gameplay: Creating the Experience
Gameplay:  Creating the ExperienceGameplay:  Creating the Experience
Gameplay: Creating the Experience
 
Game Story and Character Development
Game Story and Character DevelopmentGame Story and Character Development
Game Story and Character Development
 
Production and Management: Developing the Process
Production and Management: Developing the ProcessProduction and Management: Developing the Process
Production and Management: Developing the Process
 
Max2015 ch03
Max2015 ch03Max2015 ch03
Max2015 ch03
 
Max2015 ch02
Max2015 ch02Max2015 ch02
Max2015 ch02
 
Max2015 ch05
Max2015 ch05Max2015 ch05
Max2015 ch05
 
Max2015 ch04
Max2015 ch04Max2015 ch04
Max2015 ch04
 
Max2015 ch06
Max2015 ch06Max2015 ch06
Max2015 ch06
 
Max2015 ch07
Max2015 ch07Max2015 ch07
Max2015 ch07
 
Max2015 ch08
Max2015 ch08Max2015 ch08
Max2015 ch08
 
Max2015 ch09
Max2015 ch09Max2015 ch09
Max2015 ch09
 
Max2015 ch10
Max2015 ch10Max2015 ch10
Max2015 ch10
 
Max2015 ch11
Max2015 ch11Max2015 ch11
Max2015 ch11
 
Max2015 ch12
Max2015 ch12Max2015 ch12
Max2015 ch12
 
Max2015 ch13
Max2015 ch13Max2015 ch13
Max2015 ch13
 
Max2015 ch14
Max2015 ch14Max2015 ch14
Max2015 ch14
 
Max2015 ch15
Max2015 ch15Max2015 ch15
Max2015 ch15
 
Chapter1 design process
Chapter1 design processChapter1 design process
Chapter1 design process
 

Recently uploaded

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Recently uploaded (20)

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

98 374 Lesson 04-slides

  • 1. Designing Specific Game Components Lesson 4
  • 2. Exam Objective Matrix Skills/Concepts MTA Exam Objectives Designing Game States and Loops Plan for game state (3.2) Designing Objects and Characters Animate basic characters (4.1) Transform objects (4.2) Designing Physics-Based Animations Work with collisions (4.3)
  • 3. Introduction to Game States and Loops • The design of the game does not end with creating the visual design. – You need to design the progress of the game from one game state to the next. – You also need to decide which characters and objects will be present at each game state and the actions they will be able to perform. • The game components that you need to design at this stage include: – Gameflow, game states, and game loops – Objects and characters – Physics-based animations and AI
  • 4. Creating Gameflow • Gameflow is the progression of the game from one state to another state. • The features of a gameflow are: – Challenge – Pace – Scripted events – Instinctive training areas – Trial and error – Instinctive prompt – Player vocabulary
  • 5. Gameflow: Challenge and Pace • Challenges are the key source of interaction in a game. – A challenge motivates the players to use their logic and skill to perform some tasks or solve a puzzle to move ahead in the game. – Without challenges, the game becomes boring. • Pace refers to the rate at which the excitement happens in a game. – A game should aim to keep the excitement level of a player high until the end of the
  • 6. Gameflow: Scripted Events and Training Areas • Scripted events are minor objects or events that are programmed. – These scripted events are usually triggered by an action from the player. – The best use of scripted events is to teach the various aspects of a game to the players. These events do not interrupt the flow of the game. • Instinctive training areas let players experiment with their moves or logic without affecting the progress of the game. – Players can then use the same moves and logic to overcome the obstacle or solve the puzzle.
  • 7. Gameflow: Trial and Error • Trial and error is a method that facilitates learning. – The players can make a move and view the consequences of the move. – They can then modify the move to get better results. – Trial and error gives the players an opportunity to learn about the consequences or results of different moves. – Too much trial and error, however, leads to player frustration with the game.
  • 8. Gameflow: Instinctive Prompt and Player Vocabulary • Instinctive prompt is based on the player's learned behavior that he or she gains from the computer knowledge. – The player's learned instinctive moves are the correct moves that help the player to progress in the game. • Player vocabulary refers to the knowledge and experience that the players gain during the process of playing the game. – The purpose of player vocabulary is to enhance the skill of the players so that they are ready to take up more challenges.
  • 9. Game States • A game state defines an object at a given point in time in the game. – In a car racing game, you might have a brand new car as well as a broken down car. You want to define the dissimilar properties for both the cars. – The game state allows you to make such definitions. You can create different game states and then define what each object in a game state does in that state.
  • 11. Managing Gameflow • You can control the gameflow through game states. – To ensure that the game runs smoothly and contributes to a good gameflow, you need to optimize the game states. – For each game state, you must provide something that is worthy of the player’s attention. – At the same time, you must ensure that you are not burdening the player with too many tasks in a given game state.
  • 12. Managing Performance: Scene Hierarchy • Scene hierarchy refers to the tree structure arrangement of logical and sometimes spatial representation of a graphical scene. – Scene hierarchy is useful for optimizing the rendering and for collision detection, which in turn optimizes the frame rate. – Scene hierarchy uses instancing to reduce memory costs and increase speed. This is possible because of the parent-child tree structure of a scene hierarchy.
  • 13. Managing Performance: Frame Rate • Frame rate is the rate at which an image is refreshed. – Expressed in frames per second (fps), which is the number of frames displayed per second by a display device. – Low fps makes motion appear with considerable delay, which affects the player’s capacity to interact with the game. – An fps that varies a lot between seconds due to the load of heavy computation makes the motion seem choppy or jagged.
  • 14. Managing Performance: Graphics Pipeline • A graphics pipeline refers to the current method of drawing images on a screen through a conversion of vector graphics format or geometry into raster or pixel image. • The 3D geometry is given as input at one end of the pipeline; the 3D engine processes the geometry, and gives the output as a 2D image that is presented on the screen.
  • 15. Graphics Pipeline Stages • Visibility: What should display on the screen? • Clipping: What is in the viewing area of the camera? • Culling: Is the image to be placed facing the camera? • Occlusion: Is the object hidden from the camera’s point of view? • Resolution: What is the resolution of the display? • Transformation and lighting: How will the objects and characters in the game be moving, scaled, lighted, and so on? • Rasterization: How will the gameplay elements be drawn on the screen using pixels?
  • 17. Game Loops • At the heart of a game’s code is its main loop, (or game loop) which is responsible for coordinating the actions of the game’s program. • In its basic form, the main loop performs two functions: – Executes the actual gameplay – Draws the game components
  • 18. Sample Main Loop Pseudo Code While (player does not exit) { Update player position according to input from keyboard or mouse or joystick. Update AI according to player position. Update Physics and Sound Engine. Calculate culling and clipping Set proper shader to objects and set Render states Draw game objects }
  • 19. Managing the Main Loop • By default, the XNA Framework’s Game class manages a main loop. • The XNA Framework provides the following methods for the main loop to interact with the game platform: – Update: called whenever the game logic needs to be processed. – Draw: called whenever it is time to draw a frame.
  • 20. Types of Game Loops • How often the Update method is called in a game is defined by the type of game loop used. • There are two types of main loops: – Fixed step: the game code calls the Update method at fixed intervals. – Variable step: the game code calls the Update and Draw methods continuously regardless of TargetElapsedTime.
  • 21. Game Loop Comparison Type of Game Loop Features Pros Cons Fixed Step • Position of a sprite = position of the sprite + distance moved per update • Easier to calculate the physics associated with movement • Easier to record actions per time step • Not suitable for time-based animations Variable Step • Position of a sprite = position of the sprite + distance moved per update*timeEla psed • Easier to code • Smooth running of game • Hard to replay or record actions as time steps vary
  • 22. Transforming Objects • Transformation is converting the geometrical vertices of objects and characters to proper positions on the screen. • The transformation process involves a set of activities that are performed on these vertices in relation to three spatial references: world, view, and projection.
  • 23. Matrices in XNA • The XNA Framework requires three different matrices for transformation before the three- dimensional model is rendered on the 2D screen. • The transformation of the coordinates usually happens in the graphics pipeline. 1. To transform the coordinates from the object space to the game world known as the world space, you need to provide a world matrix.
  • 24. Matrices in XNA 2. The vertices in the world space need to be transformed so that it lies in the camera space known as the view space, which is the line-of- sight of the player or the player character. To achieve this, you need to provide a matrix known as view matrix. 3. Finally, the XNA needs to project the 3D coordinates in the view space onto the flat 2D screen, which is called the projection space. For this, you need to provide a matrix called the projection matrix to the XNA.
  • 25. Vectors in XNA • You use vectors to represent a direction and the scale of geometry. – The Vector2 class represents a vector with two components (X and Y). – The Vector3 class represents a vector with three components (X, Y, and Z). – The Vector4 class represents a vector with four components (W, X, Y, and Z).
  • 26. Triangles: Primitive Objects • Every object in computer graphics can be split into triangles. – A triangle is the primitive part of any shapes. – A box or even a circle can be formed using triangles. – To form 2D images of the 3D objects you create for the game, you need to break the object into triangles. – You then input the 3D triangle information in the graphics pipeline and then the XNA Framework converts the information to draw
  • 27. Using Solution Explorer to Add Content
  • 28. Deforming Objects • Sometimes, you will need to change the shape of a game model from its original shape as a result of an event. – Examples: depicting different states of a car (new, crashed), to make a character fat or thin, to create ocean waves, or simply to change the appearance of an object. – To deform the object, you have to manipulate the geometry and the texture information by changing the 3D geometry information of the object and then sending the revised information for transformation into 2D pixels. – Deforming objects is made easy by the use of shaders.
  • 29. Keyframe Interpolation • You generally present animation as a series of images. – If there is some processing delay, your game could end up showing jagged animations. – To prevent this, you must use the interpolation concept and provide in-betweens or frames that lie between a start frame and an end frame. – Interpolation refers to the method of constructing new data points in between the two separate sets of defined data points. – In-betweens are frames constructed between two keyframes.
  • 30. Comparing Keyframe Interpolation Methods Interpolation Method Feature Example Linear The individual interframes move with constant speed. A spaceship traverses diagonally at a constant speed. Discrete The animation moves from one keyframe to the next without any interpolation. A spaceship disappears from the first corner and appears at the second corner. Splined The animation displays realistic movement of objects within the specified duration. A spaceship moves fast at the start, slows towards the center, and then speeds up towards the second corner, giving a realistic feel of an actual spaceship in movement.
  • 31. Animation • After modeling a character, you need to animate it. Animation is essentially a series of frames or images. • Animating the basic character involves: – Movement – Frames per second (fps) – Sprite animation – Scaling and rotating matrices
  • 32. Animation: Movement • In general, animating a character involves rotation and movement or translation of the character. • Once you play the animation, you need to update it every frame. You can do it by calling the Update method of the AnimationPlayer object in the Game.Update method.
  • 33. Animation: Frame Rate • Frame rate is the speed at which the image is refreshed. – A frame refers to a single image produced by the imaging or a display device. – Frames refers to unique consecutive images and second just refers to the unit of time in which they are displayed. – For example, an animation that is locked at 12 fps takes one second to view every 12 consecutive unique images.
  • 34. Animation: Sprite Animation • Sprite animation works on the principle that animation in 2D games can be set by creating a group of images that vary only slightly from each other. – The differences in the images should be such that the human eye cannot distinguish these dissimilarities. – To create the sprite animation of a spaceship, for example, you first prepare the bare minimum number of frames required for animation. – You then make these frames move around one after another in a continuous motion. You do not need to manually redraw the frames for each loop.
  • 35. Animation: Scaling and Rotating Matrices • The matrix structure in XNA contains 4 x 4 elements for the matrix values. • You can use matrices for enlarging the objects in an animation and for rotating the objects around the axes. – These are referred to as scaling and rotating matrices respectively. • You can also use a matrix for calculating the distance between two objects and changing the positions of both depending on the calculated distance.
  • 36. Creating Realistic Characters • In real life, when we look at a person, we take in much more than the person’s physical characteristics. – The way the shadow falls beside the person or the way the sunlight hits the person’s hair can influence our perception of the person. • Methods in game design: – Applying filters to textures – Using lighting – Using shaders – Using projections
  • 37. Applying Filters to Textures • To make an image realistic, you use textures. – A texture is a 2D image that is applied on a game object or character to define its surface. – Sometimes creating a texture alone is not sufficient. – You need to apply filters to your texture to create a realistic feel. • When you work with textures, you determine where in a particular space a texture will be applied, which is called texture mapping.
  • 38. Using Lighting • Lighting as a game design component is one of the most important and influential elements that enhances the aesthetics of your game visuals. – It has the power to make or break the visual theme and the atmosphere of a game. – Without the lighting effect, the complete game environment would look flat and uninteresting. – Lighting makes the visuals look scary or cozy. – It augments the three-dimensional feel of the objects and creates composition and balance to lead the player’s eyes around.
  • 39. Using Lighting to Create Fear
  • 40. Using Shaders • A shader is the surface property of an object or character. – Characteristics such as color, shine, reflection, refraction, roughness of a surface. • The vertex shader takes the 3D position of the vertex, multiplies it with a matrix, and then transforms it into 2D screen coordinates. • The pixel shader draws each pixel of the screen using the coordinates it receives from the vertex shader. The pixel shader calculates only the color for each pixel.
  • 41. Using Projections • In a game, you need to use projections to effect scaling and view changes to the character or an object’s environment. – As as example, you can also use projections to throw blood splats on a wall when a player character standing close to the wall is hit.
  • 42. Generating Objects with User-Indexed Primitives • Based on changes to the player character’s environment, you might need to update the feel of the character. – You will need to generate objects using a set of coordinates and properties that you define that will direct the GPU to draw custom made objects. • The XNA Framework allows you to create custom-made objects using the primitive methods of the GraphicsDevice class such as the DrawUserIndexedPrimitives. – Using this method, you can direct the GPU on how you want it to interpret and, therefore, draw vertices stored in an array.
  • 43. Designing Physics-Based Animations • Scripted animations (keyframe animations) are ideal for predetermined sequences that form a part of the storyline. – Not really suitable for animations depicting real life however. • Physics-based animation, in contrast to traditional keyframe animation, mimics real life more closely; the realism results from physics modeling.
  • 44. Physics Concepts • The following basic physics concepts should be understood when creating physics-based animations: – Linear motion – Angular motion – Force – Inertia – Collision
  • 45. Physics Concepts Extended • The basic physics concepts can be applied to the motion of types of objects. – Rigid body dynamics is the study of how to represent and implement the animation of rigid bodies. – Soft body dynamics is the study of how to represent and implement the animation of soft bodies. – Fluid dynamics is the analysis of animation of fluids.
  • 46. Physics Engines • A physics engine is computer software that takes care of all mathematical calculations for implementing the physics concepts. It makes the task of a game developer easy by: – Manipulating the outcome when objects in the game collide – Applying gravity on the objects in the game world – Calculating the force applied on an object and manipulating the movement of that object accordingly
  • 47. Collision Detection and Response • Collision detection involves determining whether objects or characters in a game world overlap each other. – Rectangular bounding box – Per pixel • Collision response involves determining the necessary action that should take place based on the nature of the collision involved. – Changes in direction – Changes in appearance – Changes in position
  • 48. Designing AI • Designing AI in video games includes methods to produce the delusion of intelligence in the behavior of nonplayer characters (NPC). – The AI in the game makes decisions using selective methodology and acts according to the selected option. – the purpose of AI in games is not for intelligence, but for providing more realistic challenging game entities for game players.
  • 49. AI Strategies • Most obvious action strategy • Characterization-based strategy • Condition-based strategy • Path-finding strategy • Rubber strategy
  • 50. Recap • Game States and Loops • Introduction to Gameflow • Game States • Managing Gameflow • Managing Performance • Graphics Pipeline Stages • Game Loops • Managing the Main Loop • Types of Game Loops • Transforming Objects • Matrices • Vectors • Triangles: Primitive Objects • Using Solution Explorer • Deforming Objects • Keyframe Interpolation • Animation • Creating Realistic Characters • Designing Physics-Based Animations • Physics Concepts • Physics Engines • Collision Detection and Response • Designing AI

Editor's Notes

  1. Tip: Add your own speaker notes here.
  2. Tip: Add your own speaker notes here.
  3. Tip: Add your own speaker notes here.
  4. Tip: Add your own speaker notes here.
  5. Tip: Add your own speaker notes here.
  6. Tip: Add your own speaker notes here.
  7. Tip: Add your own speaker notes here.
  8. Tip: Add your own speaker notes here.
  9. Tip: Add your own speaker notes here.
  10. Tip: Add your own speaker notes here.
  11. Tip: Add your own speaker notes here.
  12. Tip: Add your own speaker notes here.
  13. Tip: Add your own speaker notes here.
  14. Tip: Add your own speaker notes here.
  15. Tip: Add your own speaker notes here.
  16. Tip: Add your own speaker notes here.
  17. Tip: Add your own speaker notes here.
  18. Tip: Add your own speaker notes here.
  19. Tip: Add your own speaker notes here.
  20. Tip: Add your own speaker notes here.
  21. Tip: Add your own speaker notes here.
  22. Tip: Add your own speaker notes here.
  23. Tip: Add your own speaker notes here.
  24. Tip: Add your own speaker notes here.
  25. Tip: Add your own speaker notes here.
  26. Tip: Add your own speaker notes here.
  27. Tip: Add your own speaker notes here.
  28. Tip: Add your own speaker notes here.
  29. Tip: Add your own speaker notes here.
  30. Tip: Add your own speaker notes here.
  31. Tip: Add your own speaker notes here.
  32. Tip: Add your own speaker notes here.
  33. Tip: Add your own speaker notes here.
  34. Tip: Add your own speaker notes here.
  35. Tip: Add your own speaker notes here.
  36. Tip: Add your own speaker notes here.
  37. Tip: Add your own speaker notes here.
  38. Tip: Add your own speaker notes here.