introduction to the xna framework
DESCRIPTION
TRANSCRIPT
![Page 1: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/1.jpg)
framework
![Page 2: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/2.jpg)
passionate about low-level 3D
coding
embedded devices
enthusiast
graphics programmer
@victorporof
![Page 3: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/3.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/4.jpg)
“building a gameis hard”
Painting by Brock Davis
![Page 5: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/5.jpg)
![Page 6: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/6.jpg)
First videogame ever?
![Page 7: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/7.jpg)
First videogame ever?
No.
![Page 8: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/8.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/9.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/10.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/11.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/12.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/13.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/14.jpg)
“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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/15.jpg)
“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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/16.jpg)
“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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/17.jpg)
![Page 18: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/18.jpg)
good games are designed in layers
Painting by Brock Davis
![Page 19: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/19.jpg)
good programmers think in layers
Painting by Brock Davis
![Page 20: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/20.jpg)
Managed runtime
environment
Built-in “boilerplate”
code
Game development
framework
C#
.NET
CLR 2.0
![Page 21: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/21.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/22.jpg)
Games
Code
Content
Components
• Starter Kits
![Page 23: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/23.jpg)
Application model
Content pipeline
Extended framework
Games
Code
Content
Components
• Starter Kits
![Page 24: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/24.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/25.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/26.jpg)
![Page 27: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/27.jpg)
= =
Yay! Cross-platform game development!
![Page 28: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/28.jpg)
!= !=
Yay! Cross-platform game development!Experience says no.
![Page 29: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/29.jpg)
!= !=
Yay! Cross-platform game development!Experience says no.
!=and definitely
![Page 30: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/30.jpg)
![Page 31: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/31.jpg)
Purple screen of death
![Page 32: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/32.jpg)
NIMROD
![Page 33: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/33.jpg)
!= !=
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/34.jpg)
!= !=
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/35.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/36.jpg)
![Page 37: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/37.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/38.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/39.jpg)
![Page 40: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/40.jpg)
Well, that’s easy!
![Page 41: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/41.jpg)
Well, that’s easy!but…
![Page 42: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/42.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/43.jpg)
Games are complex and
expensive!
![Page 44: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/44.jpg)
Halo 3$55 million
![Page 45: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/45.jpg)
Gran Turismo$80 million
![Page 46: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/46.jpg)
GTA IV$100 million
![Page 47: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/47.jpg)
XNA is perfect for hobby games
![Page 48: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/48.jpg)
XNA is perfect for hobby games
Let’s see what goodies it has to offer
![Page 49: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/49.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/50.jpg)
Game classesProcedures
Initialize LoadContent Update Draw UnloadContent
Application Model
![Page 51: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/51.jpg)
![Page 52: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/52.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/53.jpg)
Content processing2D file formats
.BMP, .JPG, .PNG, .TGA2D file formats
.FBX, .X .FX .XAP
Content pipeline
![Page 54: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/54.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/55.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/56.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/57.jpg)
Project from scratch demo
![Page 58: Introduction to the XNA framework](https://reader030.vdocuments.us/reader030/viewer/2022020717/545c5398af7959b90e8b470e/html5/thumbnails/58.jpg)
?