Your SlideShare is downloading. ×
Overview
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Overview

898
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
898
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
28
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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);
    }
  • 11. Texture, Sprite, 2D Graphics
  • 12. Demo