O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Xna game development

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Xna and mono game
Xna and mono game
Carregando em…3
×

Confira estes a seguir

1 de 44 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Quem viu também gostou (20)

Anúncio

Semelhante a Xna game development (20)

Mais recentes (20)

Anúncio

Xna game development

  1. 1. Game Development With Microsoft XNA Game Studio Do It Yourself Introduction To XNA Game Studio By Chanaka Nakandala
  2. 2. Game Development With Microsoft XNA Game Studio Do It Yourself What is XNA Game Studio..? XNA is a Framework and Toolset Provided by Microsoft Corporation for game development tasks. That mean XNA is not a “Game Engine” , It’s a “Code library”. XNA is build on top of the DirectX 9c.
  3. 3. Core Frameworks in XNA Framework Graphics Audio Input Game Math Storage
  4. 4. Microsoft XNA Game Studio 4.0 Features
  5. 5. Cross platform Features What are those platforms..? Windows Operating Systems (Windows Vista, Windows 7, Windows 8) XBox 360 Windows Phone Zune HD (only sprite based 2D games)
  6. 6. Cross platform - Computer Features
  7. 7. Cross platform – Xbox 360 Features
  8. 8. Cross platform – Windows Mobile Features
  9. 9. Cross platform - Zune Features
  10. 10. Graphics Features Sprite Batch for develop 2D games and Particale System 1.Normal Mapping 2.Per Pixel Lighting 3.Parallax Mapping Enable to using 3D Models , Effects and Shaders Support for HLSL (High Level Shader Language)
  11. 11. Inputs Features Easy to getting User Inputs 1.Mouse 2.Keyboard 3.Xbox 360 Game Controller 4.Touch Panel ( Windows Phone , Zune ) 5.Accelermetor Provides
  12. 12. Audio Features Game audio is Based on XACT (Cross-Platform Audio Creation Tool) 3D Audio Able to use audio files via their logical names Inbuilt XACT Tool as the sound asset Support for Looping , Streaming and Memory Management
  13. 13. Math Features Support for Vector , Matrix , Plane , Sphere , Curve Intersection Helpers Movement Helpers
  14. 14. Storage Features Easier to Read and Write data to save game data Save game data file in correct location in the each platform
  15. 15. Networking Features Easy to create LAN Based Games. Support for HTTP and TCP/UDP protocols to communicate with servers and devices Able to create Multiplayer games to play through the Internet
  16. 16. How to develop a game using XNA..? You may needs Microsoft Visual Studio Visual C# / Visual Basic.net Microsoft XNA Game Studio 4.0 ……And Windows Operating System
  17. 17. How to develop a game using XNA..? You may needs Graphics Card supports Minimum Shader Model 1.1 DirectX 9.0c
  18. 18. How to develop a game using XNA..? Gain of Visual C# / Visual Basic.net Visual C# 2.0 , Visual C# 3.0 or Visual Basic.net are using as the programming language.
  19. 19. Components of Microsoft XNA Game Studio Microsoft Visual Studio XNA Framework .net Framework .net Compact Framework Windows Phone Xbox 360 Zune Windows PC
  20. 20. XNA Game Studio Architecture Game code (C#,VB) & Content XNA Framework Common Language Runtime (CLR) Windows APIs, DirectX Provided by you Provided for you
  21. 21. XNA has some sequence of built in methods i. Initialize Device ii. Load Game Assets iii. Update iv. Draw Game On The Screen v. Unload Game vi. Free Resources Life Cycle Of XNA Game
  22. 22. Life Cycle Of XNA Game Do It Yourself Initialize Device Load Game Assets Update Draw Game On The Screen Unload Game Free Resources
  23. 23. Microsoft XNA Game Studio 4.0 Develop Games With Visual C#
  24. 24. Steps 1.Visual Studio > create XNA project 2.Understand IDE 3.Introduction Game1.cs
  25. 25. Add new references to the project References > Add reference
  26. 26. Microsoft XNA Game Studio 4.0 Game Contents
  27. 27. Content Includes All Game Assets… Game Contents Textures , Sprites, Fonts, 3D Models , Effects, Music Tracks , Sound Effects, Game Level Data
  28. 28. Microsoft XNA Game Studio 4.0 Contents Pipeline
  29. 29. Content Pipeline What is Content Pipeline…? Content Pipeline is a set of processes applied to a game’s assets when the game is built.
  30. 30. Advantages of Content Pipeline Content Pipeline Make Game fast in the run-time. Able to use standard file formats such as jpg,bmp,png for textures and sprites fbx,x for 3D meshes mp3,wav for background music and sound fx. Game Developer can insert the game assets conveniently design by Game Artists.
  31. 31. Add content to project Right Click On Content Section
  32. 32. Add content to project Add > 1.New Item or 2.Existing Item
  33. 33. Add > New Item
  34. 34. Microsoft XNA Game Studio 4.0 3.Introduction Game1.cs
  35. 35. Using .NET and XNA framework in C# project using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; Frameworks Dot Net Framework XNA Framework
  36. 36. Life Cycle Of XNA Game Do It Yourself Initialize Device Load Game Assets Update Draw Game On The Screen Unload Game Free Resources
  37. 37. Initialize Method protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } Game1.cs
  38. 38. LoadContent Method protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here } Game1.cs
  39. 39. Update Method protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here base.Update(gameTime); } Game1.cs
  40. 40. Draw Method protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here base.Draw(gameTime); } Game1.cs
  41. 41. UnloadContent Method protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } Game1.cs
  42. 42. Feedback Chanakanakandala@gmail.com

×