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