SlideShare a Scribd company logo
1 of 41
Blog: http://blog.syntaxc4.net
Learning Objectives Why Windows Phone 7? What is XNA? XNA Game Programming Basics Dream. Build. Play. Next Steps… “ The hardest thing about creating your first game is finishing it. – @OwenGoss
Why Windows Phone 7?
What is XNA? ** Disclaimer: Items are not to scale.
The Basics “ Focus on gameplay! There's no point in having the latest, greatest tech in a game if the gameplay is terrible. - @Justin_Hebert
The Game Loop Initialize() LoadContent() The Loop Update() Draw() UnloadContent()
Demo #1: Stepping into the Game Loop
Textures
Sprites
Demo #2:Adding Textures and Sprites
Sensors using Microsoft.Devices.Sensors; AccelerometerReadingEventArgs accelState;Accelerometer _accelerometer = new Accelerometer();if (_accelerometer.State == SensorState.Ready){    _accelerometer.ReadingChanged += (s, e) =>    {           accelState = e;    };    _accelerometer.Start();}
Input TouchCollection touchState = TouchPanel.GetState();  //interpret touch screen pressesforeach (TouchLocation location in touchState){     switch (location.State)     {        case TouchLocationState.Pressed:             buttonTouched = true;             break;        case TouchLocationState.Moved:             break;        case TouchLocationState.Released:             break;    }}
Tombstoning For games, when the Back button is pressed during gameplay, the game can choose to present a pause context menu or dialog or navigate the user to the prior menu screen. Pressing the Back button again while in a paused context menu or dialog closes the menu or dialog.
Dream. Build. Play.
Dream
The Idea
It could be new…
…Or a new Twist
We’re going to borrow an Idea
Build
Alien Game Lab Three Pillars of Game Development Prototype Performance Polish URL:  http://hmbl.me/4BSBKO
Prototyping
Architecture Connected
Architecture Disconnected
Game State Management URL:  http://hmbl.me/4BSHGB
Demo #4:Creating a Screen
Performance&Code Quality
Enums are Handy
Avoid Boxing Use Generics
Array vs List
struct vs class
Trial Mode An application must not invoke either of the Trial APIs in a tight loop. For example, a game application must not invoke either of the Trial APIs while in a game loop. The API should be called infrequently and the value returned should be cached  bool isTrial = Guide.IsTrialMode;
Demo #5:Trial Mode
Polishing
Game Feedback using Microsoft.Devices; VibrateController.Default.Start( TimeSpan.FromSeconds(1));
Game Feedback This requirement does not apply to applications that play sound effects through the Microsoft.Xna.Framework.Audio.SoundEffect class, as sound effects will be mixed with the MediaPlayer. The SoundEffect class should not be used to play background music.  SoundEffect alienFired =  	Content.Load<SoundEffect>("Tank_Fire");alienFired.Play();
Play
Side Load
Market Place http://create.msdn.com
Next Steps…
Q & A Sorry, I don’t give out Game Ideas

More Related Content

Similar to XNA On Windows Phone 7

Iproduct presentation(final)
Iproduct presentation(final)Iproduct presentation(final)
Iproduct presentation(final)
11009373
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
Sohil Gupta
 
Game development with Cocos2d-x Engine
Game development with Cocos2d-x EngineGame development with Cocos2d-x Engine
Game development with Cocos2d-x Engine
Duy Tan Geek
 
Callum deighton engine terminology
Callum deighton engine terminologyCallum deighton engine terminology
Callum deighton engine terminology
Deightonater
 
Run and jump tutorial (part 2) scenes
Run and jump tutorial (part 2)   scenesRun and jump tutorial (part 2)   scenes
Run and jump tutorial (part 2) scenes
Muhd Basheer
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xna
Glen Gordon
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishing
Muhd Basheer
 

Similar to XNA On Windows Phone 7 (20)

project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
 
Data Driven Game development
Data Driven Game developmentData Driven Game development
Data Driven Game development
 
Iproduct presentation(final)
Iproduct presentation(final)Iproduct presentation(final)
Iproduct presentation(final)
 
High and Low Card Game For IOs
High and Low Card Game For IOsHigh and Low Card Game For IOs
High and Low Card Game For IOs
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Game development with Cocos2d-x Engine
Game development with Cocos2d-x EngineGame development with Cocos2d-x Engine
Game development with Cocos2d-x Engine
 
Android game development
Android game developmentAndroid game development
Android game development
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
 
XNA And Silverlight
XNA And SilverlightXNA And Silverlight
XNA And Silverlight
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1
 
Callum deighton engine terminology
Callum deighton engine terminologyCallum deighton engine terminology
Callum deighton engine terminology
 
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
 
Game Development with AndEngine
Game Development with AndEngineGame Development with AndEngine
Game Development with AndEngine
 
Java term project final report
Java term project final reportJava term project final report
Java term project final report
 
Pong
PongPong
Pong
 
Run and jump tutorial (part 2) scenes
Run and jump tutorial (part 2)   scenesRun and jump tutorial (part 2)   scenes
Run and jump tutorial (part 2) scenes
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xna
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishing
 
XNA and Windows Phone
XNA and Windows PhoneXNA and Windows Phone
XNA and Windows Phone
 

More from Cory Fowler

How Joomla and Microsoft are a Great Open Source Success
How Joomla and Microsoft are a Great Open Source SuccessHow Joomla and Microsoft are a Great Open Source Success
How Joomla and Microsoft are a Great Open Source Success
Cory Fowler
 
Creating php cloud applications
Creating php cloud applicationsCreating php cloud applications
Creating php cloud applications
Cory Fowler
 
Windows Azure Web Sites Mastery
Windows Azure Web Sites MasteryWindows Azure Web Sites Mastery
Windows Azure Web Sites Mastery
Cory Fowler
 
Windows azure for startups
Windows azure for startupsWindows azure for startups
Windows azure for startups
Cory Fowler
 

More from Cory Fowler (13)

5 Absolutely Beautiful Things about Platform as a Service (PaaS)
5 Absolutely Beautiful Things about Platform as a Service (PaaS)5 Absolutely Beautiful Things about Platform as a Service (PaaS)
5 Absolutely Beautiful Things about Platform as a Service (PaaS)
 
Lessons learned from running massive WordPress sites at scale
Lessons learned from running massive WordPress sites at scaleLessons learned from running massive WordPress sites at scale
Lessons learned from running massive WordPress sites at scale
 
How Joomla and Microsoft are a Great Open Source Success
How Joomla and Microsoft are a Great Open Source SuccessHow Joomla and Microsoft are a Great Open Source Success
How Joomla and Microsoft are a Great Open Source Success
 
Drupal DevOps on Microsoft Azure Websites
Drupal DevOps on Microsoft Azure WebsitesDrupal DevOps on Microsoft Azure Websites
Drupal DevOps on Microsoft Azure Websites
 
Microsoft Azure Websites for PHP Developers
Microsoft Azure Websites for PHP DevelopersMicrosoft Azure Websites for PHP Developers
Microsoft Azure Websites for PHP Developers
 
Creating php cloud applications
Creating php cloud applicationsCreating php cloud applications
Creating php cloud applications
 
Windows Azure Web Sites Mastery
Windows Azure Web Sites MasteryWindows Azure Web Sites Mastery
Windows Azure Web Sites Mastery
 
Windows azure for startups
Windows azure for startupsWindows azure for startups
Windows azure for startups
 
AzureFest
AzureFestAzureFest
AzureFest
 
AzureFest
AzureFestAzureFest
AzureFest
 
Making data rain from the clouds version 2
Making data rain from the clouds version 2Making data rain from the clouds version 2
Making data rain from the clouds version 2
 
Taking it to the cloud version 3
Taking it to the cloud version 3Taking it to the cloud version 3
Taking it to the cloud version 3
 
Taking It To The Cloud Version 2
Taking It To The Cloud Version 2Taking It To The Cloud Version 2
Taking It To The Cloud Version 2
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

XNA On Windows Phone 7

Editor's Notes

  1. Welcome out to the Windows Phone Developer Briefing:[Intro]- Cory Fowler- ObjectSharp- Games Hobbyist
  2. Consumer facing PhoneXbox Live IntegrationFamiliar Development StorySilverlightXNAC# or VB.NET
  3. Brings Managed Code to Games DevelopmentCross Platform Development between ZuneWindows PhoneXbox360Windows 7All on One Code Base
  4. The XNA Framework like most games runs on a Game LoopInitialization ConstructorLoadContentLoad up main graphics required for gameplayThe LoopUpdateUser input Collection and Calculation of Sprite PositioningDrawRe-Draw the sprites on the ScreenUnloadContentGarbage Collection and Freeing up resources
  5. Open Visual StudioCreate new Game ProjectReview Code Blocks for The Loop
  6. Image files which are loaded into a game.There is a good chance that your game with be someone in the ballpark of 60-70% Textures.Your game can only take up 90MB of RAM while running.
  7. Sprites are images that move independently to the rest of the game.A Sprites position and other attributes are maintained in a instance of a class or struct.
  8. Add in two Textures and load them onto the screen with SpriteBatch.Draw
  9. Currently the only Sensor supported by the Phones APIs is the Accelerometer.
  10. Make sure that your Architecture is part of your prototype.Plan for when the phone is Connected…
  11. Plan for when the Phone is Disconnected…
  12. Knowing the Architecture Story of your Game will aid you in Laying out the Flow of your Screens.You can also find the Game State Management Project Template in the Extension Manager.
  13. Open AlienGame [Start Here] and create Pause ScreenInherit MenuScreenCreate MenuEntry for ResumeCreate MenuEntry for QuitAdd to MenuEntries Collection
  14. Enums are great for tracking state, which in a game there is a LOT of state.Enumsalso help make your code easier to ready, which allows you to use your brainpower for the Math.Smaller Operating cost than using Strings.
  15. Boxing is a processing intense operation.
  16. Arrays – Memory Allocation is going to be consistentList – Basically any hand rolled POCOAvoid - boxed
  17. structs are optimal for objects up to 16bytes in size and are good candidates for using arrays.Classes are a good choice if the size of the object is going to fluxuaterepetetively
  18. The Typical response time of this method is 6 MillisecondsShould only be called during Initialize and Activated