Introduction to the XNA framework

58
framework

description

 

Transcript of Introduction to the XNA framework

Page 1: Introduction to the XNA framework

framework

Page 2: Introduction to the XNA framework

passionate about low-level 3D

coding

embedded devices

enthusiast

graphics programmer

@victorporof

Page 3: Introduction to the XNA framework

What about you?

How many of you… Play video games? Would like to build a game? Have built a game?

Page 4: Introduction to the XNA framework

“building a gameis hard”

Painting by Brock Davis

Page 5: Introduction to the XNA framework
Page 6: Introduction to the XNA framework

First videogame ever?

Page 7: Introduction to the XNA framework

First videogame ever?

No.

Page 8: Introduction to the XNA framework

1947: Cathode Ray Tube Amusement Device 1951: NIM

1952: Tic-Tac-Toe 1958: Tennis for Two 1962: Space War

Long time ago…

Page 9: Introduction to the XNA framework

Cathode Ray Tube Amusement

Device

The earliest known interactive electronic game was by Thomas T. Goldsmith Jr. and Estle Ray Mann: a missile simulator using radar displays from World War II.

…they couldn’t really find a snazzy name for it

Page 10: Introduction to the XNA framework

NIMROD

Using a panel of lights for its display, this was the first instance of a digital computer only designed specifically to play a game.

Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. The player to take the last object loses.

Page 11: Introduction to the XNA framework

Tic-Tac-Toe

In 1952, Alexander S. Douglas made the first computer game to use a digital graphical display, created for his Ph.D. thesis on human-computer interaction.

Photo by Loomis Dean, taken in April, 1952

Page 12: Introduction to the XNA framework

In 1958, William Higinbotham made an interactive computer game named Tennis for Two for the Brookhaven National Laboratory's annual visitor's day.

Tennis for Two

Page 13: Introduction to the XNA framework

Spacewar!

In 1961, MIT students Martin Graetz, Steve Russell, and Wayne Wiitanen created the game Spacewar! which also used a vector display system.

Page 14: Introduction to the XNA framework

“No one will blame you for giving up. In fact, quitting at this point is a perfectly reasonable response”

Making a game is no easy business!

Page 15: Introduction to the XNA framework

“No one will blame you for giving up. In fact, quitting at this point is a perfectly reasonable response”

“Quit now, and cake will be served immediately.”

Making a game is no easy business!

Page 16: Introduction to the XNA framework

“No one will blame you for giving up. In fact, quitting at this point is a perfectly reasonable response”

“Quit now, and cake will be served immediately.”

-- GLaDOS (Portal)

Making a game is no easy business!

Page 17: Introduction to the XNA framework
Page 18: Introduction to the XNA framework

good games are designed in layers

Painting by Brock Davis

Page 19: Introduction to the XNA framework

good programmers think in layers

Painting by Brock Davis

Page 20: Introduction to the XNA framework

Managed runtime

environment

Built-in “boilerplate”

code

Game development

framework

C#

.NET

CLR 2.0

Page 21: Introduction to the XNA framework

Core Framework Platform

Graphics

Audio

Input

Math

Application model

Content pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Games

Code

Content

Components

• Starter Kits

Page 22: Introduction to the XNA framework

Games

Code

Content

Components

• Starter Kits

Page 23: Introduction to the XNA framework

Application model

Content pipeline

Extended framework

Games

Code

Content

Components

• Starter Kits

Page 24: Introduction to the XNA framework

Core Framework

Graphics

Audio

Input

Math

Application model

Content pipeline

Extended framework

Games

Code

Content

Components

• Starter Kits

Page 25: Introduction to the XNA framework

Core Framework Platform

Graphics

Audio

Input

Math

Application model

Content pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Games

Code

Content

Components

• Starter Kits

Page 26: Introduction to the XNA framework
Page 27: Introduction to the XNA framework

= =

Yay! Cross-platform game development!

Page 28: Introduction to the XNA framework

!= !=

Yay! Cross-platform game development!Experience says no.

Page 29: Introduction to the XNA framework

!= !=

Yay! Cross-platform game development!Experience says no.

!=and definitely

Page 30: Introduction to the XNA framework
Page 31: Introduction to the XNA framework

Purple screen of death

Page 32: Introduction to the XNA framework

NIMROD

Page 33: Introduction to the XNA framework

!= !=

Yay! Cross-platform game development!No.

!=and definitely

things aren’t as cross-platform

as they seem

Painting by Brock Davis

Page 34: Introduction to the XNA framework

!= !=

Yay! Cross-platform game development!No.

!=and definitely

cross-platform means:

“same framework, but take care of the

hardware differences yourself”

Painting by Brock Davis

Page 35: Introduction to the XNA framework

Games

Code

Content

Components

• Starter Kits

Core Framework Platform

Graphics

Audio

Input

Math

Application model

Content pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Page 36: Introduction to the XNA framework
Page 37: Introduction to the XNA framework

New project -> Build and run Documentation and tutorials

available for download

http://create.msdn.com/education

Starter kits

“Take our games and make them

your own”

Page 38: Introduction to the XNA framework

New project -> Build and run Documentation and tutorials

available for download

http://create.msdn.com/education

Starter kits

“Take our games and make them

your own”

Awesome! Let’s see a demo!

Page 39: Introduction to the XNA framework
Page 40: Introduction to the XNA framework

Well, that’s easy!

Page 41: Introduction to the XNA framework

Well, that’s easy!but…

Page 42: Introduction to the XNA framework

Perfect for learning Not a very good long-term idea for

game development Does not make you a

knowledgeable game programmer Too much “drag’n’drop” coding will

make your graphics rendering inefficient

Low framerate = bad gameplay

Starter kits

“Take our games and make them

your own”

Shamelessly copy-pasting code is evil!

Page 43: Introduction to the XNA framework

Games are complex and

expensive!

Page 44: Introduction to the XNA framework

Halo 3$55 million

Page 45: Introduction to the XNA framework

Gran Turismo$80 million

Page 46: Introduction to the XNA framework

GTA IV$100 million

Page 47: Introduction to the XNA framework

XNA is perfect for hobby games

Page 48: Introduction to the XNA framework

XNA is perfect for hobby games

Let’s see what goodies it has to offer

Page 49: Introduction to the XNA framework

Games

• Starter Kits

Code

Content

Components

Core Framework Platform

Graphics

Audio

Input

MathApplication modelContent pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Page 50: Introduction to the XNA framework

Game classesProcedures

Initialize LoadContent Update Draw UnloadContent

Application Model

Page 51: Introduction to the XNA framework
Page 52: Introduction to the XNA framework

Games

• Starter Kits

Code

Content

Components

Core Framework Platform

Graphics

Audio

Input

MathApplication modelContent pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Page 53: Introduction to the XNA framework

Content processing2D file formats

.BMP, .JPG, .PNG, .TGA2D file formats

.FBX, .X .FX .XAP

Content pipeline

Page 54: Introduction to the XNA framework

Games

• Starter Kits

Code

Content

Components

Core Framework Platform

Graphics

Audio

Input

MathApplication modelContent pipeline

Direct3DXACT

XINPUTXCONTENT

Extended framework

Page 55: Introduction to the XNA framework

Graphics SpriteBatch Effect, BasicEffect Texture2D GraphicsDevice Model VertexBuffer

Audio SoundBank, WaveBank AudioEngine

Input GamePad Keyboard Mouse

Core framework

Page 56: Introduction to the XNA framework

Math MathHelper Matrix Vector

Storage Title Storage

(Shaders, Meshes, Textures, Sounds) User Storage

(Save games, Scores)

Network NetworkSession PacketReader NetworkGamer

Core framework

Page 57: Introduction to the XNA framework

Project from scratch demo

Page 58: Introduction to the XNA framework

?