SlideShare une entreprise Scribd logo
1  sur  21
Game Development Using Visual Studio and XNA
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
What is a game?
World of Goo = Game MS Word = Software How do we know the difference?
Here’s what games have that software doesn’t : Conditions for victory/failure; Testing various qualities of the player ; Withholding content from the player; Thinking for themselves ; Partially under the player’s control ; Changing objectives and/or methods; They are more fun!
The basic structure of a game Initialize content While (exit condition is false) { Get user input Run input related logic 	Run input independent logic Draw graphics and play sounds } Shut down
Windows doesn’t allow direct access to it’s display and sound drivers. APIs make coding games much easier APIs also mean that we need not worry about compatibility issues Why do we need an API to make games ?
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.
Introducing XNA allows you to make games for both Windows and Xbox 360 platforms using the same code and assets.
Getting started with XNA Open Visual C# 2008 Express Edition Select “File”, then “New Project” You should see a dialog like the one here Select “Windows Game (3.1)” and enter a name of your choice
The skeleton code
} Constructor; Initialize; LoadContent; UnloadContent; Update; Draw Getting content from the disk into the main memory + graphics memory Removing content from the memory Game logic and drawing } } Contents of the game class
Display text on the screen
Display an image on the screen
Getting input from the keyboard
Changing window size (resolution); Full screen/windowed mode ; Changing window properties
Print a message when the image moves off-screen Exercise : Make an image move using the arrow keys
Using the mouse
XNA Time Management
Our first game : Dodger
Congratulations! If everything went well, you just made a game by yourself !

Contenu connexe

Tendances

Proposal of 3d GAME Final Year Project
Proposal of  3d GAME Final Year ProjectProposal of  3d GAME Final Year Project
Proposal of 3d GAME Final Year Projectfahim shahzad
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in UnityHakan Saglam
 
How to deliver a game in kodu
How to deliver a game in koduHow to deliver a game in kodu
How to deliver a game in koduNour Khouja
 
Windos 7 presentation
Windos 7 presentationWindos 7 presentation
Windos 7 presentationluciasgarcia
 
Windows 7 Tips And Tricks
Windows 7 Tips And TricksWindows 7 Tips And Tricks
Windows 7 Tips And TricksChad Massaker
 
Online Biz Smarts Windows 8.0 Why and How
Online Biz Smarts Windows 8.0 Why and HowOnline Biz Smarts Windows 8.0 Why and How
Online Biz Smarts Windows 8.0 Why and HowOnlineBizSmarts.com
 
Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Gateway Technolabs
 
Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Muhammad Maaz Irfan
 
Gamemaker lesson 1
Gamemaker lesson 1Gamemaker lesson 1
Gamemaker lesson 1iain bruce
 
Gamemaker views
Gamemaker viewsGamemaker views
Gamemaker viewsiain bruce
 
Features Of Windows 7
Features Of Windows 7Features Of Windows 7
Features Of Windows 7Will Jennings
 
New features of windows 7
New features of windows 7New features of windows 7
New features of windows 7Colleen Kelly
 
Game Development Overview - Novice Chapter 1
Game Development Overview - Novice Chapter 1Game Development Overview - Novice Chapter 1
Game Development Overview - Novice Chapter 1Rickman Roedavan
 

Tendances (20)

Street runner final
Street runner finalStreet runner final
Street runner final
 
Proposal of 3d GAME Final Year Project
Proposal of  3d GAME Final Year ProjectProposal of  3d GAME Final Year Project
Proposal of 3d GAME Final Year Project
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in Unity
 
Windows 7 Presentation
Windows 7 PresentationWindows 7 Presentation
Windows 7 Presentation
 
How to deliver a game in kodu
How to deliver a game in koduHow to deliver a game in kodu
How to deliver a game in kodu
 
Windos 7 presentation
Windos 7 presentationWindos 7 presentation
Windos 7 presentation
 
Ppt on windows 8
Ppt on windows 8Ppt on windows 8
Ppt on windows 8
 
Windows 10
Windows 10Windows 10
Windows 10
 
Windows 7 Tips And Tricks
Windows 7 Tips And TricksWindows 7 Tips And Tricks
Windows 7 Tips And Tricks
 
Online Biz Smarts Windows 8.0 Why and How
Online Biz Smarts Windows 8.0 Why and HowOnline Biz Smarts Windows 8.0 Why and How
Online Biz Smarts Windows 8.0 Why and How
 
Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,
 
Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Design phase of game development of unity 2d game
Design phase of game development of unity 2d game
 
Gamemaker lesson 1
Gamemaker lesson 1Gamemaker lesson 1
Gamemaker lesson 1
 
Gamemaker views
Gamemaker viewsGamemaker views
Gamemaker views
 
USMAN YAR
USMAN YARUSMAN YAR
USMAN YAR
 
Pong
PongPong
Pong
 
Windows 8.0
Windows 8.0 Windows 8.0
Windows 8.0
 
Features Of Windows 7
Features Of Windows 7Features Of Windows 7
Features Of Windows 7
 
New features of windows 7
New features of windows 7New features of windows 7
New features of windows 7
 
Game Development Overview - Novice Chapter 1
Game Development Overview - Novice Chapter 1Game Development Overview - Novice Chapter 1
Game Development Overview - Novice Chapter 1
 

En vedette

Beginning Game Development in XNA
Beginning Game Development in XNABeginning Game Development in XNA
Beginning Game Development in XNAguest9e9355e
 
Concurso de fofotgrafia
Concurso de fofotgrafiaConcurso de fofotgrafia
Concurso de fofotgrafiaricardo
 
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...guest80e86b
 
Pcc Brochure Italian
Pcc Brochure  ItalianPcc Brochure  Italian
Pcc Brochure Italianallanedun
 
תדמית רינה
תדמית רינהתדמית רינה
תדמית רינהGalia Gilad
 
www.amiableAID.org
www.amiableAID.orgwww.amiableAID.org
www.amiableAID.orgManekshaw
 
Effetto Ottico
Effetto OtticoEffetto Ottico
Effetto Otticosexmela
 
roche-bobois presentation
roche-bobois presentationroche-bobois presentation
roche-bobois presentationrbatlanta
 
Process improvement workshop overview v. 2013
Process improvement workshop overview v. 2013Process improvement workshop overview v. 2013
Process improvement workshop overview v. 2013dhaughto
 
Steps to quality
Steps to qualitySteps to quality
Steps to qualitydhaughto
 
Roche Bobois Through The Decades
Roche Bobois Through The DecadesRoche Bobois Through The Decades
Roche Bobois Through The Decadesrbatlanta
 

En vedette (19)

Experience
ExperienceExperience
Experience
 
Experience
ExperienceExperience
Experience
 
The Israeli Opportunity
The Israeli OpportunityThe Israeli Opportunity
The Israeli Opportunity
 
Beginning Game Development in XNA
Beginning Game Development in XNABeginning Game Development in XNA
Beginning Game Development in XNA
 
Concurso de fofotgrafia
Concurso de fofotgrafiaConcurso de fofotgrafia
Concurso de fofotgrafia
 
Experience
ExperienceExperience
Experience
 
אומגה 3
אומגה 3אומגה 3
אומגה 3
 
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
 
Pcc Brochure Italian
Pcc Brochure  ItalianPcc Brochure  Italian
Pcc Brochure Italian
 
תדמית רינה
תדמית רינהתדמית רינה
תדמית רינה
 
www.amiableAID.org
www.amiableAID.orgwww.amiableAID.org
www.amiableAID.org
 
Experience
ExperienceExperience
Experience
 
Effetto Ottico
Effetto OtticoEffetto Ottico
Effetto Ottico
 
Experience
ExperienceExperience
Experience
 
roche-bobois presentation
roche-bobois presentationroche-bobois presentation
roche-bobois presentation
 
introduction to Xna
introduction to Xna introduction to Xna
introduction to Xna
 
Process improvement workshop overview v. 2013
Process improvement workshop overview v. 2013Process improvement workshop overview v. 2013
Process improvement workshop overview v. 2013
 
Steps to quality
Steps to qualitySteps to quality
Steps to quality
 
Roche Bobois Through The Decades
Roche Bobois Through The DecadesRoche Bobois Through The Decades
Roche Bobois Through The Decades
 

Similaire à Beginning Game Development in XNA

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xnaGlen Gordon
 
XNA and Windows Phone
XNA and Windows PhoneXNA and Windows Phone
XNA and Windows PhoneGlen Gordon
 
GDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudGDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudChris Schalk
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overviewMICTT Palma
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Sarah Sexton
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineOrisysIndia
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step GuideDevBatch Inc.
 
Introduction To Game Programming
Introduction To Game ProgrammingIntroduction To Game Programming
Introduction To Game ProgrammingDien Wong
 
Developing games for consoles as an indie in 2019
Developing games for consoles as an indie in 2019Developing games for consoles as an indie in 2019
Developing games for consoles as an indie in 2019David Voyles
 
Developing for consoles as an indie in 2019
Developing for consoles as an indie in 2019Developing for consoles as an indie in 2019
Developing for consoles as an indie in 2019David Voyles
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybodySarah Sexton
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 

Similaire à Beginning Game Development in XNA (20)

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xna
 
XNA and Windows Phone
XNA and Windows PhoneXNA and Windows Phone
XNA and Windows Phone
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Imaginecup
ImaginecupImaginecup
Imaginecup
 
GDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudGDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloud
 
Indie Game Development Intro
Indie Game Development IntroIndie Game Development Intro
Indie Game Development Intro
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
Xna game development
Xna game developmentXna game development
Xna game development
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overview
 
Shootemup report
Shootemup reportShootemup report
Shootemup report
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game Engine
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
 
Android game ppt
Android game pptAndroid game ppt
Android game ppt
 
Introduction To Game Programming
Introduction To Game ProgrammingIntroduction To Game Programming
Introduction To Game Programming
 
Developing games for consoles as an indie in 2019
Developing games for consoles as an indie in 2019Developing games for consoles as an indie in 2019
Developing games for consoles as an indie in 2019
 
Developing for consoles as an indie in 2019
Developing for consoles as an indie in 2019Developing for consoles as an indie in 2019
Developing for consoles as an indie in 2019
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybody
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 

Dernier

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 

Dernier (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

Beginning Game Development in XNA

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