Beginning Game Development in XNA

710 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
710
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Beginning Game Development in XNA

  1. 1. Game Development<br />Using Visual Studio and XNA<br />
  2. 2. Arvind Raja Yadav<br />Microsoft Student Partner<br />Lead Programmer – Neptune, a Half Life 2 Modification<br />Programmer – Dystopia, a Half Life 2 Modification available on Steam<br />I also make a lot of small games in various languages for fun<br />
  3. 3. What is a game?<br />
  4. 4. World of Goo = Game<br />MS Word = Software<br />How do we know the difference?<br />
  5. 5. Here’s what games have that software doesn’t :<br />Conditions for victory/failure;<br />Testing various qualities of the player ;<br />Withholding content from the player;<br />Thinking for themselves ;<br />Partially under the player’s control ;<br />Changing objectives and/or methods;<br />They are more fun!<br />
  6. 6. The basic structure of a game<br />Initialize content<br />While (exit condition is false)<br />{<br />Get user input<br />Run input related logic<br /> Run input independent logic<br />Draw graphics and play sounds<br />}<br />Shut down<br />
  7. 7. Windows doesn’t allow direct access to it’s display and sound drivers.<br />APIs make coding games much easier<br />APIs also mean that we need not worry about compatibility issues<br />Why do we need an API to make games ?<br />
  8. 8. I’m not going to teach you how to make Halo in 3 days.<br />DISCLAIMER<br />It took me and my team about 2 weeks to make this level work.<br />
  9. 9. Introducing<br />XNA allows you to make games for both Windows and Xbox 360 platforms using the same code and assets.<br />
  10. 10. Getting started with XNA<br />Open Visual C# 2008 Express Edition<br />Select “File”, then “New Project”<br />You should see a dialog like the one here<br />Select “Windows Game (3.1)” and enter a name of your choice <br />
  11. 11. The skeleton code<br />
  12. 12. }<br />Constructor;<br />Initialize;<br />LoadContent;<br />UnloadContent;<br />Update;<br />Draw<br />Getting content from the disk into the main memory + graphics memory<br />Removing content from the memory<br />Game logic and drawing<br />}<br />}<br />Contents of the game class<br />
  13. 13. Display text on the screen<br />
  14. 14. Display an image on the screen<br />
  15. 15. Getting input from the keyboard<br />
  16. 16. Changing window size (resolution);<br />Full screen/windowed mode ;<br />Changing window properties<br />
  17. 17. Print a message when the image moves off-screen<br />Exercise : Make an image move using the arrow keys<br />
  18. 18. Using the mouse<br />
  19. 19. XNA Time Management<br />
  20. 20. Our first game : Dodger<br />
  21. 21. Congratulations!<br />If everything went well, you just made a game by yourself !<br />

×