SlideShare ist ein Scribd-Unternehmen logo
1 von 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 !

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

Pcc Brochure Italian
Pcc Brochure  ItalianPcc Brochure  Italian
Pcc Brochure Italianallanedun
 
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
 
תדמית רינה
תדמית רינהתדמית רינה
תדמית רינהGalia Gilad
 
www.amiableAID.org
www.amiableAID.orgwww.amiableAID.org
www.amiableAID.orgManekshaw
 
Effetto Ottico
Effetto OtticoEffetto Ottico
Effetto Otticosexmela
 
Beginning Game Development in XNA
Beginning Game Development in XNABeginning Game Development in XNA
Beginning Game Development in XNAguest9e9355e
 
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
 

Andere mochten auch (18)

The Israeli Opportunity
The Israeli OpportunityThe Israeli Opportunity
The Israeli Opportunity
 
Pcc Brochure Italian
Pcc Brochure  ItalianPcc Brochure  Italian
Pcc Brochure Italian
 
Experience
ExperienceExperience
Experience
 
Concurso de fofotgrafia
Concurso de fofotgrafiaConcurso de fofotgrafia
Concurso de fofotgrafia
 
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
C:\Documents And Settings\Admin\рабочий стол\школьный сайт\методика обучения\...
 
תדמית רינה
תדמית רינהתדמית רינה
תדמית רינה
 
www.amiableAID.org
www.amiableAID.orgwww.amiableAID.org
www.amiableAID.org
 
Experience
ExperienceExperience
Experience
 
Experience
ExperienceExperience
Experience
 
Experience
ExperienceExperience
Experience
 
Effetto Ottico
Effetto OtticoEffetto Ottico
Effetto Ottico
 
אומגה 3
אומגה 3אומגה 3
אומגה 3
 
Beginning Game Development in XNA
Beginning Game Development in XNABeginning Game Development in XNA
Beginning Game Development in XNA
 
Experience
ExperienceExperience
Experience
 
roche-bobois presentation
roche-bobois presentationroche-bobois presentation
roche-bobois presentation
 
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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 

Kürzlich hochgeladen (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 

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 !