SlideShare a Scribd company logo
1 of 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 !

More Related Content

What's hot

Windos 7 presentation
Windos 7 presentationWindos 7 presentation
Windos 7 presentation
luciasgarcia
 
Features Of Windows 7
Features Of Windows 7Features Of Windows 7
Features Of Windows 7
Will Jennings
 

What's hot (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
 

Viewers also liked

Beginning Game Development in XNA
Beginning Game Development in XNABeginning Game Development in XNA
Beginning Game Development in XNA
guest9e9355e
 
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
guest80e86b
 
תדמית רינה
תדמית רינהתדמית רינה
תדמית רינה
Galia Gilad
 
www.amiableAID.org
www.amiableAID.orgwww.amiableAID.org
www.amiableAID.org
Manekshaw
 
Effetto Ottico
Effetto OtticoEffetto Ottico
Effetto Ottico
sexmela
 

Viewers also liked (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
 

Similar to Beginning Game Development in XNA

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
Sohil Gupta
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xna
Glen Gordon
 

Similar to 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
 

Recently uploaded

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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

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.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
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...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
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
 
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.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

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 !