This document provides an overview of Microsoft XNA Studio for game development. It discusses the XNA timeline and releases from 2004-2008. It describes what XNA Game Studio is, including that it extends Visual Studio 2008 for C# game development using the XNA Framework. The XNA Framework provides a cross-platform game development framework and runtime for Windows, Xbox 360, and Zune. It also demonstrates the basic game flow and use of textures, sprites, and 2D graphics in an XNA game.
Minko - Why we created our own Flash platform and why you should care
Game Development with XNA Studio
1. Game Development with Microsoft XNA Studio Tran Minh Triet Faculty of Information Technology University of Science, VNU-HCM
2. Acknowledgement This presentation reuses materials from: “XNA Game Studio 3.0” by Frank Savage, Architect, Microsoft Corporation presented at PDC 2008 “XNA Studio: Introduction to XNA” by Brian Keller, Product Manager, Microsoft Corporation presented at PDX 2006 Demonstration“Mini Age of Empires” by Nguyen KhacHuy, Le Vu Thai Bao University of Science, VNU-HCM, 2009
3. XNA Timeline 2005 2006 2004 Windows and Xbox tools convergence XACT, PIX Common Controller, Live on Windows SDK teams committed to this effort for current and new tools Showed progress on tools convergence Announced “XNA Studio” Tech Preview at GDC XNA Game Studio Express
4. XNA Timeline 2008 Future 2007 XNA Game Studio 2.0 To be used with all versions of Visual Studio 2005 XNA Game Studio 3.0 for Visual Studio 2008
5. What is XNA Game Studio? XNA Game Studio Extends Visual Studio 2008 to create games using C# Framework XNA Framework Cross-platform game development framework and runtime .NET for Xbox 360 and Zune Custom version of the .NET Compact Framework
6. XNA Game Studio XNA Game Studio Visual Studio 2008 Content Pipeline Device Management XNA Framework Application Model Content Pipeline Graphics Audio Math Input Networking Gamer Services Platform Windows Xbox 360 Zune
7. Game Flow (1) Load Content Start Update Draw End Unload Content
8. Game Flow (2) // This is a texture we can render. Texture2DmyTexture; // Set the coordinates to draw the sprite at. Vector2spritePosition = Vector2.Zero; protectedoverridevoidLoadContent() { // Create a new SpriteBatch, // which can be used to draw textures. spriteBatch = newSpriteBatch(GraphicsDevice); myTexture = Content.Load<Texture2D>("mytexture"); }
9. Game Flow (3) protectedoverridevoidDraw(GameTimegameTime) { graphics.GraphicsDevice.Clear(Color.CornflowerBlue); // Draw the sprite. spriteBatch.Begin(SpriteBlendMode.AlphaBlend); spriteBatch.Draw(myTexture, spritePosition, Color.White); spriteBatch.End(); base.Draw(gameTime); }
10. Game Flow (4) protectedoverridevoidUpdate(GameTimegameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back ==ButtonState.Pressed) this.Exit(); // Move the sprite around. spritePosition.X += 1; spritePosition.Y+= 1; base.Update(gameTime); }