overview
DESCRIPTION
TRANSCRIPT
![Page 1: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/1.jpg)
Game Development with Microsoft XNA Studio
Tran Minh TrietFaculty of Information TechnologyUniversity of Science, VNU-HCM
![Page 2: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/2.jpg)
AcknowledgementThis presentation reuses materials from:
“XNA Game Studio 3.0”by Frank Savage, Architect, Microsoft Corporationpresented at PDC 2008“XNA Studio: Introduction to XNA”by Brian Keller, Product Manager, Microsoft Corporationpresented at PDX 2006
Demonstration “Mini Age of Empires”by Nguyen Khac Huy, Le Vu Thai BaoUniversity of Science, VNU-HCM, 2009
![Page 3: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/3.jpg)
XNA Timeline
Showed progress on tools convergenceAnnounced
“XNA Studio”
Windows and Xbox tools convergence
XACT, PIX Common Controller, Live on Windows
SDK teams committed to this effort for current and new tools
Tech Preview at GDCXNA Game Studio Express
2004 2005 2006
![Page 4: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/4.jpg)
XNA Timeline
XNA Game Studio 3.0for Visual Studio 2008
XNA Game Studio 2.0To be used with all versions of Visual Studio 2005
2007 2008 Future
![Page 5: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/5.jpg)
What is XNA Game Studio?
Framework
XNA Game StudioExtends Visual Studio 2008to create games using C#
XNA FrameworkCross-platform gamedevelopment framework and runtime
.NET for Xbox 360 and ZuneCustom version of the .NET Compact Framework
![Page 6: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/6.jpg)
XNA Game Studio
XNAFramework
Networking
Graphics
Input
Audio Math
GamerServices
XNAGame Studio
Visual Studio 2008
Platform Windows Xbox 360 Zune
Application Model Content Pipeline
ContentPipeline
DeviceManagement
![Page 7: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/7.jpg)
Game Flow (1)
LoadContentStart
Update
Draw
EndUnloadContent
![Page 8: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/8.jpg)
Game Flow (2)
// This is a texture we can render.Texture2D myTexture;// Set the coordinates to draw the sprite at.Vector2 spritePosition = Vector2.Zero;
protected override void LoadContent(){ // Create a new SpriteBatch,
// which can be used to draw textures.spriteBatch = new SpriteBatch(GraphicsDevice);myTexture = Content.Load<Texture2D>("mytexture");
}
![Page 9: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/9.jpg)
Game Flow (3)
protected override void Draw(GameTime gameTime){
graphics.GraphicsDevice.Clear(Color.CornflowerBlue); // Draw the sprite.
spriteBatch.Begin(SpriteBlendMode.AlphaBlend);
spriteBatch.Draw(myTexture, spritePosition, Color.White);
spriteBatch.End();
base.Draw(gameTime);}
![Page 10: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/10.jpg)
Game Flow (4)
protected override void Update(GameTime gameTime){
// 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);}
![Page 11: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/11.jpg)
Texture, Sprite, 2D Graphics
![Page 12: Overview](https://reader034.vdocuments.us/reader034/viewer/2022051816/54624e3caf7959f61b8b5693/html5/thumbnails/12.jpg)
Demo