Introduction to the XNA framework

2,007 views
1,750 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,007
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
44
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to the XNA framework

  1. 1. framework<br />
  2. 2. @victorporof<br />
  3. 3. What about you?<br />How many of you…<br />Play video games?<br />Would like to build a game?<br />Have built a game?<br />
  4. 4. “building a gameis hard”<br />Painting by Brock Davis<br />
  5. 5.
  6. 6. First videogame ever?<br />
  7. 7. First videogame ever?No.<br />
  8. 8. 1947: Cathode Ray Tube Amusement Device<br />1951: NIM<br />1952: Tic-Tac-Toe<br />1958: Tennis for Two<br />1962: Space War<br />Long time ago…<br />
  9. 9. Cathode Ray Tube Amusement Device<br />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.<br />…they couldn’t really find a snazzy name for it <br />
  10. 10. NIMROD<br />Using a panel of lights for its display, this was the first instance of a digital computer only designed specifically to play a game.<br />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.<br />
  11. 11. Tic-Tac-Toe<br />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.<br />Photo by Loomis Dean, taken in April, 1952<br />
  12. 12. In 1958, William Higinbotham made an interactive computer game named Tennis for Two for the Brookhaven National Laboratory's annual visitor's day.<br />Tennis for Two<br />
  13. 13. Spacewar!<br />In 1961, MIT students Martin Graetz, Steve Russell, and Wayne Wiitanen created the game Spacewar! which also used a vector display system.<br />
  14. 14. “No one will blame you for giving up. In fact, quitting at this point is a perfectly reasonable response”<br />Making a game is no easy business!<br />
  15. 15. “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.”<br />Making a game is no easy business!<br />
  16. 16. “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)<br />Making a game is no easy business!<br />
  17. 17.
  18. 18. good games are designed in layers<br />Painting by Brock Davis<br />
  19. 19. good programmers think in layers<br />Painting by Brock Davis<br />
  20. 20.
  21. 21.
  22. 22.
  23. 23.
  24. 24.
  25. 25.
  26. 26.
  27. 27. Yay! Cross-platform game development!<br /> =<br /> =<br />
  28. 28. Yay! Cross-platform game development!<br />Experience says no.<br />!=<br />!=<br />
  29. 29. Yay! Cross-platform game development!<br />Experience says no.<br />!=<br />!=<br />!=<br />and definitely<br />
  30. 30.
  31. 31. Purple screen of death<br />
  32. 32. NIMROD<br />
  33. 33. Yay! Cross-platform game development!<br />No.<br />things aren’t as cross-platformas they seem<br />Painting by Brock Davis<br />!=<br />!=<br />!=<br />and definitely<br />
  34. 34. Yay! Cross-platform game development!<br />No.<br />cross-platform means:“same framework, but take care of the hardware differences yourself”<br />Painting by Brock Davis<br />!=<br />!=<br />!=<br />and definitely<br />
  35. 35.
  36. 36.
  37. 37. New project -> Build and run<br />Documentation and tutorials available for download<br />http://create.msdn.com/education<br />Starter kits“Take our games and make them your own”<br />
  38. 38. New project -> Build and run<br />Documentation and tutorials available for download<br />http://create.msdn.com/education<br />Starter kits“Take our games and make them your own”<br />Awesome! Let’s see a demo!<br />
  39. 39.
  40. 40. Well, that’s easy!<br />
  41. 41. Well, that’s easy!but…<br />
  42. 42. Perfect for learning<br />Not a very good long-term idea for game development<br />Does not make you a knowledgeable game programmer<br />Too much “drag’n’drop” coding will make your graphics rendering inefficient<br />Low framerate = bad gameplay<br />Starter kits“Take our games and make them your own”<br />Shamelessly copy-pasting code is evil!<br />
  43. 43. Games are complex and expensive!<br />
  44. 44. Halo 3$55 million<br />
  45. 45. Gran Turismo$80 million<br />
  46. 46. GTA IV$100 million<br />
  47. 47. XNA is perfect for hobby games<br />
  48. 48. XNA is perfect for hobby games<br />Let’s see what goodies it has to offer<br />
  49. 49.
  50. 50. Game classes<br />Procedures<br />Initialize<br />LoadContent<br />Update<br />Draw<br />UnloadContent<br />Application Model<br />
  51. 51.
  52. 52.
  53. 53. Content processing<br />2D file formats<br />.BMP, .JPG, .PNG, .TGA<br />2D file formats<br />.FBX, .X<br />.FX<br />.XAP<br />Content pipeline<br />
  54. 54.
  55. 55. Graphics<br />SpriteBatch<br />Effect, BasicEffect<br />Texture2D<br />GraphicsDevice<br />Model<br />VertexBuffer<br />Audio<br />SoundBank, WaveBank<br />AudioEngine<br />Input<br />GamePad<br />Keyboard<br />Mouse<br />Core framework<br />
  56. 56. Math<br />MathHelper<br />Matrix<br />Vector<br />Storage<br />Title Storage<br />(Shaders, Meshes, Textures, Sounds)<br />User Storage<br />(Save games, Scores)<br />Network<br />NetworkSession<br />PacketReader<br />NetworkGamer<br />Core framework<br />
  57. 57. Project from scratch demo<br />
  58. 58. ?<br />

×