1 / 40

XNA

XNA. An Introduction. You will need 2 projects for your solution for your game. A class library And a Game project. File > New Project > Windows Game Library. Why are there 2 types of libraries?. Because. A windows game library uses the full .NET Framework

lawson
Download Presentation

XNA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XNA An Introduction

  2. You will need 2 projects for your solution for your game • A class library • And a Game project

  3. File > New Project > Windows Game Library

  4. Why are there 2 types of libraries?

  5. Because • A windows game library uses the full .NET Framework • A Xbox 360 game library uses the compact framework • http://msdn.microsoft.com/en-us/library/2weec7k5.aspx

  6. What that means to us… • The compact framework has about 30% of the functionality of the .NET framework • You can do less with Xbox games than you can with Windows games • So as you decide which platform to use you have to take this into consideration.

  7. Also… • An Xbox game can be released through community games (have to be a premier member with a gold Xbox live membership) • An Xbox game released through community games cannot be pirated • A Windows game can be released through STEAM or you can sell it on your own website as a download, etc • http://store.steampowered.com/ • A Windows game can be pirated

  8. So you have 2 decisions to make • Before you start coding and developing • What technology do I use? • How do I want to release my game? • These questions are related.

  9. File > Add > Existing Project

  10. This what your project game solution looks like.

  11. Lets add a new image

  12. Browse and pick the png

  13. Add the declaration

  14. Initialize it

  15. Add a position for the dot

  16. Add the draw

  17. Run it to test

  18. Now add a class to the library – call it Collision

  19. Add this method and build

  20. Add the reference to the library in the game

  21. Import the namespace

  22. Add 2 bounding boxes for the 2 sprites in the Update method

  23. Add the call to the class library and change the texture of the dot

  24. Run it to test

  25. Does the dot turn into a butterfly?

  26. Now let’s add soundRight click on content > Add Existing Item

  27. Add the declarations

  28. Initialize it

  29. Add it to the collision

  30. Now test

  31. More links about sound • http://msdn.microsoft.com/en-us/library/bb195053.aspx • http://msdn.microsoft.com/en-us/library/dd231915.aspx

  32. That’s all sweet but I wanna blow things up. • Ok – follow me.

  33. Add a sprite sheet for the animation

  34. Add a new sound

  35. Change the sound name to the explosion asset name

  36. Add the declarations for the animated sprite

  37. Change the collision

  38. Add an if statement for the timer in update

  39. Change the draw method

  40. Run it and see what happens

More Related