This exam is starting on April 27 at 10:30 am and ending by 12:30 pm - - PowerPoint PPT Presentation

this exam is starting on april 27 at 10 30 am and ending
SMART_READER_LITE
LIVE PREVIEW

This exam is starting on April 27 at 10:30 am and ending by 12:30 pm - - PowerPoint PPT Presentation

The Kennesaw State University Codes of Conduct applies to this exam. This exam is starting on April 27 at 10:30 am and ending by 12:30 pm on Sunday, April 28 via D2L ONLY one attempt. Once you start the exam, you will have 2 hours to


slide-1
SLIDE 1
  • The Kennesaw State University Codes of Conduct applies to this exam.
  • This exam is starting on April 27 at 10:30 am and ending by 12:30 pm on

Sunday, April 28 via D2L

  • ONLY one attempt.
  • Once you start the exam, you will have 2 hours to finish it.
  • The exam is open everything.
  • This is an individual exam. Please do not discuss the contents of the exam

with your classmates or anyone else.

  • The weightage of this exam towards your overall course grade is 30%.
  • For the questions related to math or drawing figure, please feel free to do

it on a paper and scan/take a picture as your submission.

  • Please email me at rguo@kennesaw.edu if you have any questions
  • Good luck!
slide-2
SLIDE 2

The Benefits of Guidelines

  • Elimination of hype
  • Clarity and certainty
  • Ease of drafting schedules and test plans
  • Varying from the guidelines
slide-3
SLIDE 3

Documentation

  • Concept Doc
  • Very small (2 or 3 pages)
  • Only has the core concepts
  • “Sales” Doc
  • To obtain financing
  • Functional Specification
  • Much larger
  • What the game is supposed to do
  • Technical Specification
  • How it should do it

*Part of the design doc

slide-4
SLIDE 4

Elevator Pitch

  • Elevator Pitch
  • Should be able to describe the game in 2 or 3 sentences (or less)

My game is a cross between Borderlands 2 and My Pretty Pony in which the players hunt pink ponies from Hell.

+ = fun

slide-5
SLIDE 5

General Concept Docs

  • Story
  • Characters
  • Environment/Level
  • Gameplay
  • Art Description
  • Sound
  • User Interface and Controls
slide-6
SLIDE 6

Sales Doc

  • To obtain money
  • It has much of the Concept Doc in it, plus
  • A Market Study
  • Are there other games that are similar?
  • Did they earn a lot of money
  • Are there other games that are going to launch at the same time?
  • A budget
  • How much to develop
  • How long will it take?
slide-7
SLIDE 7

Formal Design Document

  • 2 sections
  • Functional Specification
  • Technical Specification
slide-8
SLIDE 8

NDAs

  • Non Disclosure Agreements
  • Agreement not to steal ideas
  • Don’t worry about signing, but read
  • It’s very common
slide-9
SLIDE 9

Camera Types

  • Fixed Point
  • Rotating
  • Scrolling
  • Movable
  • Floating
  • Tracking
  • Pushable
  • First Person
slide-10
SLIDE 10

Rule #1: The Golden Rule

  • Cinamatography: Convey plot or emotion
  • What story want to tell
  • What audiences want to see was before. User Center Design
  • Gamatography: Both plot and emotion
  • What players need to see
  • Lensing: How the player sees the game and how the players

interprets what they see is a constant

  • The Golden Rule of good gamatography: If your camera doesn’t help

the player play then design one that does.

slide-11
SLIDE 11

Rule #2: Surrounding Space

  • The game world is what gets most of the play brain’s attention
  • The surrounding space of an action game is usually the immediate

area surrounding the character plus a cone extending out from its front

  • For example, Super Mario, racing games.
  • Rule: Make sure that the camera can always see the surrounding

space

slide-12
SLIDE 12

Rule #3: How Much Agency?

  • Moving perspective is a part of the play experience
  • Any difficulties?
  • First time player?
  • People who got easily disoriented? (FOV)
  • Expert players?
  • Rule: Know your audience’s tolerance for camera control
slide-13
SLIDE 13

Rule #4: Distance to Action

  • Depth estimation is a lot harder in a 3D game environment. Especially

when the objects is moving toward or away from you.

  • 2D games usually won’t have this issue
  • If the main action is far away, like first person shooting games, aim is

more important

  • If it is close-up games, like fighting, the ability to judge close distances

matters more.

  • If the players need the information, be able to see the whole field is

vital

  • Rule: Compensate for distance to action
slide-14
SLIDE 14

Rule #5: Light The Way

  • Human: 170 degrees of horizontal and 100 degrees of vertical vision
  • A screen: 100 degrees of horizontal and 50 degrees of vertical
  • A game: A world framed by the borders
  • Easier to blindside players
  • Rule: The camera and lighting need to lead rather than follow
  • Cinema Examples
  • Insanely Twisted Shadow
slide-15
SLIDE 15

Rule #6: Transitions

  • Modern games commonly use more than one type of camera.
  • The complex part is managing the transitions.
  • Cinema often uses cuts, however games are usually better served with

movement rather than cutting because cuts during play are disorienting.

  • Sometimes movement transitions won’t work. When passing through a

doorway in third person action games. The game would have to pause for more than a second or move the camera through a wall. Neither is good, so the camera just cuts instead, but try fade out and fade in

  • Preserve the direction to reduce the disorientation from a cut.
  • Rule: Always ground your transition.
slide-16
SLIDE 16

Ultimate Goal

  • Fell natural!
  • Robust and consistent through the whole game
  • Predictable
  • Gamatography’s job is to let players play and establish the emotional

connections on their own.

slide-17
SLIDE 17

and an introduction to matrices

Coordinate Systems

slide-18
SLIDE 18

The Local Coordinate System

(0, 0, 0)

slide-19
SLIDE 19

The World SPACE

  • The coordinate system of the virtual environment

(619, 10, 628)

slide-20
SLIDE 20

(619, 10, 628)

slide-21
SLIDE 21

Camera Space

slide-22
SLIDE 22

Camera Space

(0, 0, -10)

slide-23
SLIDE 23

The Big Picture

  • How to we get from space to space?

? ?

slide-24
SLIDE 24

The Big Picture

M ?

How to we get from space to space? For every model Have a (M)odel matrix! Transforms from object to world space

slide-25
SLIDE 25

The Big Picture

Jeff Chastine 25

M V

How to we get from space to space? To put in camera space Have a (V)iew matrix Usually need only one of these

slide-26
SLIDE 26

The Big Picture

M V MV

How to we get from space to space? The ModelView matrix Sometimes these are combined into one matrix Usually keep them separate for convenience

slide-27
SLIDE 27

Matrix - What?

1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0

The Identity Matrix

A mathematical structure that can: Translate (a.k.a. move) Rotate Scale Usually a 4x4 array of values Idea: multiply each point by a matrix to get the new point Your graphics card eats matrices for breakfast

slide-28
SLIDE 28

Back to The Big Picture

M

If you multiply a matrix by a matrix, you get a matrix! How might we make the model matrix?

slide-29
SLIDE 29

Back to The Big Picture

M

Translation matrix T Rotation matrix R1 Rotation matrix R2 Scale matrix S

If you multiply a matrix by a matrix, you get a matrix! How might we make the model matrix?

slide-30
SLIDE 30

Back to The Big Picture

Jeff Chastine 30

M

Translation matrix T Rotation matrix R1 Rotation matrix R2 Scale matrix S

T * R1 * R2 * S = M If you multiply a matrix by a matrix, you get a matrix! How might we make the model matrix?

slide-31
SLIDE 31

Modeling and Animation For Game Design

CGDD 4003

slide-32
SLIDE 32

Why Modeling for Games?

  • 3D modeling for games is a whole different monster
  • Movies VS Games
  • Polygon budget
  • Why?
slide-33
SLIDE 33
slide-34
SLIDE 34

Level of Detail (LOD)

  • Different detail levels for a single asset
slide-35
SLIDE 35

The Skeletal Hierarchy

(aka the “rig”)

  • Based on the concept of bones
  • Each bone has exactly one parent
  • Each bone has a transform
  • Not necessarily a matrix (later)
  • How it differs from its parent
  • If its transform is identity matrix
  • Same translation
  • Same rotation (orientation)
  • The root bone has no parent (e.g. pelvis)
  • Rotations/translations are relative to local coordinates
  • There are also synthetic root bones (ground shadows)
slide-36
SLIDE 36

Kinematics

  • Forward kinematics
  • Moving a parent bone moves the children
  • Easy to program, hard to animate
  • Inverse kinematics (IKs)
  • Moving child bones affects parent bone
  • Easier for animators
  • Solve iteratively
  • Need to draw this on the board…
slide-37
SLIDE 37

Euler Angles

(pronounced “Oi-luh”)

  • 3 angles to describe orientation around 3 axes
  • Order of rotations is important!
  • Two rotations can result in the same orientation
  • Usually stored in a 3x3 matrix.
  • Two similar rotations have similar values in matrices
  • Linear blending will be ok
  • Size is large
slide-38
SLIDE 38

Enter the Quaternion

  • Another way to represent rotations
  • Great for interpolation (thus, common)
  • Uses 4 components (x, y, z, w)
  • In general, (x, y, z) is the axis of rotation
  • Length of (x, y, z) is sine of half the rotation angle
  • w is the cosine of half the rotation angle (20° vs. 340°)
slide-39
SLIDE 39

Animation Storage

  • How big?
  • Store 4x3 matrix for each bone, for each frame
  • 30 fps, 50 bones
  • 5 major characters, 100 animations each
  • 15 minor characters, 20 animations each
  • Animation lasts 4 seconds
  • 𝑇𝑞𝑏𝑑𝑓 = 30𝑔𝑞𝑡 ∙ 4𝑡𝑓𝑑 ∙ 50𝑐𝑝𝑜𝑓𝑡 ∙ 4 ∙ 3 ∙ 4 ∙

5 ∙ 100 + 15 ∙ 20 = 220𝑁𝐶

  • Xbox 360 has 512MB and Wii has 88MB
  • The animation system takes up nearly ¼ of all memory?
  • Can we do better?
slide-40
SLIDE 40

Animation Storage

  • Eliminate unnecessary data
  • Most bones don’t need shear, scaling
  • Some don’t need translation (hips, knees, elbows)
  • Some characters hardly move!
  • Space
  • Scaling, Shearing,

Translation = 3

  • Rotation

(quaternions) = 4

T.K. Baha from Borderlands

slide-41
SLIDE 41

Animation Storage

  • Assume:
  • 10% of bones shear
  • 20% of bones scale
  • 50% have translation
  • 90% have orientation
  • One bone / frame is now:

4𝑐𝑧𝑢𝑓𝑡 ∙ 0.1 ∙ 3 + 0.2 ∙ 3 + 0.5 ∙ 3 + 0.9 ∙ 4 = 24 𝑐𝑧𝑢𝑓𝑡

  • vs. the 48 bytes previously
  • However, we have to reconstruct the 4x3 matrix for each bone

now!

Note: We’re now at 110MB, still 5 times bigger than budget for Wii. Can we do better?

slide-42
SLIDE 42

Animation Storage

  • Obvious candidate: don’t use 30 fps!
  • Keyframing: set important poses and then interpolate (old animation

technique)

  • On “average”, 10 keyframes per second
  • 1/3 the space = 37MB!
  • Keyframing problems:
  • Loses data

Note: we’re at 37MB. Can we do better?

slide-43
SLIDE 43

Animation Storage

  • Linear interpolation between frames
  • 𝑠𝑓𝑡𝑣𝑚𝑢 =

1 − 𝑢 ∙ 𝐺

1 + (𝑢 ∙ 𝐺 2))

  • 𝑢 is time and 𝐺

1and 𝐺 2are frames

  • Higher Order Interpolation
  • Use Bezier (pronounced “Beh-zee-ay”)
  • Cubic function, with continuity (C0, C1, C2…)
  • Define controls at endpoints (𝑈

1and 𝑈2)

  • Can drop the memory usage by ¼
slide-44
SLIDE 44

AI for Game Design

slide-45
SLIDE 45

What is AI for Games?

  • Emulating the behavior of other players or the entities.
  • The key is simulation!
  • AI for games is more “artificial” and less “intelligence”
  • Because “intelligence” in games is the hardest part
  • *Winning is not always correct!
slide-46
SLIDE 46

Tradition AI vs Game AI

  • Traditional AI
  • Real intelligence
  • Machine learning
  • Interact socially emotions
  • Game AI
  • Above and beyond the requirements of a piece of entertainment software
  • Doesn’t need to learn about anything beyond the scope of gameplay
  • Simulate intelligent behavior
  • *Provide a believable challenge!
slide-47
SLIDE 47

Decision Making

  • This is the core concept behind AI
  • When to execute?
  • How to interact with the players?
  • How to implement?
slide-48
SLIDE 48

Rules-Based Systems

  • A set of preset behaviors is used to determine the behavior of game

entities.

  • Pac-Man AI
slide-49
SLIDE 49

Finite State Machines as AI

slide-50
SLIDE 50

Adaptive AI

  • This is the KEY and most difficulty part for games
  • Before, the AI systems are for predefined events of games
  • For more variability and a better, more dynamic adversary
  • Fighting games, strategy games, racing games, etc.
slide-51
SLIDE 51

Prediction

  • Pattern Recognition
  • Randomize
slide-52
SLIDE 52

AI Cases for Games

  • Path Finding & Perceptions
  • Tactical & Strategic AI
  • Using Threading to Apply AI
slide-53
SLIDE 53

How AI Perceives?

  • What if the AI agents need to know what’s going on around them?
  • Complicated! Still a hot research topic
  • How do we know this world?
  • Vision, sound, smell, taste, touch
  • Simulation!
slide-54
SLIDE 54

Sight

  • The most basic level
  • Everything is known – easier than the real world
  • Calculate the information between two objects:
  • Distance
  • Angle
  • Collision Detection
  • Unity – Navigation Mesh
slide-55
SLIDE 55

Other Senses

  • Because everything is known in the VE, other senses are used less,

but still useful to enhance the experiences

  • More research opportunities here:
  • Sound
  • Smell
  • Radar
  • Haptic
  • Taste
slide-56
SLIDE 56

CGDD 4003

Shaders

slide-57
SLIDE 57

Shaders

  • Scary!
  • Weird terminology
  • Primitive assembly
  • Rasterization
  • Zwrite
  • Cull
  • Stencil
  • Math and Data
  • Vertices, Fragments
  • Vectors, Matrices, Textures
  • Cross and Dot product
  • Matrix multiplication
slide-58
SLIDE 58

Shaders

  • What is a shader?
  • It is a small program that runs on the GPU
  • Usually written in a high level shader language (e.g. GLSL)
  • Produce images
  • Input: Mesh, Material Data, Lighting Data, and etc.
  • common shaders:
  • Vertex Shader: executes once for every vertex
  • Fragment Shader: executes one for every fragment

(potential pixel)

slide-59
SLIDE 59

Shaders in the Graphics Pipeline

OpenGL (application software) Fragment Shader Vertex Shader

slide-60
SLIDE 60

Shaders in the Graphics Pipeline

slide-61
SLIDE 61

Vertex Shader Applications

  • Moving vertices
  • Transformations
  • Morphing
  • Wave motion (e.g., water)
  • Fractals
  • Lighting
  • More realistic models
  • Cartoon shaders
slide-62
SLIDE 62

Fragment Shader Applications

Per fragment lighting calculations

per vertex lighting per fragment lighting

slide-63
SLIDE 63

Fragment Shader Applications

Texture mapping

smooth shading environment mapping bump mapping

slide-64
SLIDE 64

Linear Interpolation

  • Math
  • Bezier: 2 points, 3 points
  • Code