Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Overview

1,160 views

Published on

  • Be the first to comment

  • Be the first to like this

Overview

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

×