SlideShare a Scribd company logo
1 of 50
Glen Gordon Developer Evangelist http://blogs.msdn.com/glengordon @glengordon Developing WP7 Games using XNA
Agenda 2 Windows Phone 7 – A new beginning XNA Game Studio 4.0 – Powerful, Productive, Portable XNA Framework - Game Loop, Graphics, Audio, Media, Touch, Sensors XBOX Live   Q & A
Games Hub Featuring Xbox LIVE 3
Xbox LIVE is Gaming Services Gamertag Friends Achievements Windows Phone will extend the Xbox LIVE brand beyond the console for the first time MerchandisingPremiumPlacement Windows Phone is the first step towards our vision of a ubiquitous gaming service Differentiates your title from the rest
Game Development Opportunities To use the great features of Xbox LIVE Without Xbox LIVE You can still write andpublish games for  Windows Phone Find a publisher! Lots to choose from! We’re interested in your great games! Create great games for marketplace http://developer.windowsphone.com wpgames@microsoft.com
Windows Phone 7 Hardware Consistent sets of hardware capabilities defined by Microsoft Resolution Touch Input CPU / GPU RAM Hardware keyboard is optional
User Experience Frameworks Modern XAML/event-driven application UI framework Rapid creation of visually rich apps HTML/Javascript Mature, robust, widely deployed technology High performance game framework Rapid creation of multi-screen 2D and 3D games  Rich content pipeline Mature, robust, widely adopted technology spanning Xbox, Windows, and Zune GAMES(and applications) APPLICATIONS (and games)
Powerful Productive Portable
XNA Game Studio Makes game development easier XNA Framework provides robust APIs for games C#, .NET and Visual Studio tooling Solutions for game content processing Not an engine solution CreatingGames
XNA Game Studio 4.0 Enhanced audio support Develop for Windows Phone 7 Simplified graphics APIs Visual Studio 2010 integration New configurable effects
Powerful
Managed Code for Game Development Windows Phone 7      Uses the .NET platform Managed code platform, no unsafe code .NET/XNA is used for games today! XNA Game Studio 4.0 is C# exclusive 800+ managed code games on XBLA/XBLIG wpgames@microsoft.com Windows games published through portals
Addressing Performance Head-on Frameworks designed for performance Frameworks designed for performance Frameworks designed for performance Frameworks designed for performance XNA Framework designed for gaming scenarios Commitment to future of managed code  No unnecessary garbage generation Three + years of profiling and investment  We’ve built for performance on Windows Phone 7 Math libraries optimized  Efficient APIs with tuned transitions to native code
http://xbox.com/phone
Productive
Visual Studio and .NET Productive development with .NET and C# High performance IDE Intellisense makes coding faster Integrated build/deploy/debug experience MSBuild engine for build automation
Content Pipeline 17 Simplify Your Content Usage! Manage assets in Visual Studio Importers for common game data formats Optimize data into binary format for efficient loading Fully extensible Content projects external in XNA Game Studio 4.0
Simplifying Game Development XNA Framework 18
Bridging the Gap The XNA Framework Game Loop is layered on top of the Silverlight Application object on Windows Phone 7 Provides the bulk of integration of API’s Most of the XNA Framework can be accessed from Silverlight applications Including Gamer Services (Xbox LIVE) In this release some sharing/composition is not complete Scenes using GraphicsDevice from XNA Framework and UIElements from Silverlight You’ll want to choose the technology that works best for your scenarios
Choosing the Right Technology Graphics UI control heavy consider Silverlight Desire vector graphics in XAML  Media Rich video support in application Tooling If you use Microsoft Blend in your pipeline
Leveraging the Right Technology Graphics Using 3D graphics Sprite heavy 2D applications should consider the XNA Framework Game Loop  Simulation/Drawing Those who prefer a traditional update/draw/present frame loop Tooling Those who want to use the XNA Framework Content Pipeline graphics types
XNA Framework Game Loop Start simple and customize! XNA Framework Game Loop Example protectedoverridevoid Update(GameTimegameTime) {   // Allows the game to exit   if(GamePad.GetState(PlayerIndex.One).Buttons.Back== ButtonState.Pressed) this.Exit();   // TODO: Add your update logic here base.Update(gameTime); } protectedoverridevoid Draw(GameTimegameTime) { GraphicsDevice.Clear(Color.CornflowerBlue);   // TODO: Add your drawing code here base.Draw(gameTime); } Traditional update/draw/present frame loop Core programming model consistent with previous releases Changes implemented yield better power performance on devices System integration with Windows Phone 7 best practices Translated to existing XNA Framework concepts
Demo:Game Loop
Graphics 24
Graphics Overview Evolution of our existing immediate mode rendering API Simplifies for resource and render state management Feature segmentation between “Reach”/“HiDef” profiles Rendering primitives 2D and 3D
Configurable Effects BasicEffect SkinnedEffect New configurable effect classes on all platforms EnvironmentMapEffect DualTextureEffect Custom effects not available on Windows Phone 7 AlphaTestEffect
System Support: Scaler and Orientation Write your game without worrying about native resolution or orientation Automatic rotation between portrait and landscapeTouch automatically supports both scale and orientation changes Scaler can drastically improve performance Trade off performance for “crispness” and shade fewer pixels800x480 = 384,000 pixels, 480x320 = 153,600 pixels Upsample an arbitrary back buffer to native device resolution Far higher quality than bilinear filteringAllows for easier porting from other platforms Scaling/Rotation comes for “free” from Hardware
Demo:Effects
Can you hear me now? Audio & Media 29
Audio Capture Example Audio publicvoidEventDrivenCapture() { mic= Microphone.Default; buffer = new byte[mic.GetSampleSizeInBytes(mic.BufferDuration)]; mic.BufferReady += newEventHandler(OnBufferReady); DynamicPlayback = newDynamicSoundEffectInstance(mic.SampleRate, AudioChannels.Mono); } publicvoidOnBufferReady(object sender, EventArgsargs) { // Get the latest captured audio.  int duration = mic.GetData(buffer); // Do some post-capture processing and playback.  MakeMeSoundLikeARobot(buffer, duration); DynamicPlayback.SubmitBuffer(buffer); } Audio Capture and Playback Simple API to play back WAV data Modify pitch, volume, pan audio Ability to play synthesized/buffered audio Serialize captured data Provides more control over System.Mediatypes on Windows Phone 7 Audio Playback Example // Load a sound effect from a raw stream SoundEffecteffect1 = SoundEffect.FromStream(GetStreamFromTheWeb("http://url.wav")); effect1.Play(); // Create dynamic audio on the fly byte[] fluteSound = GetFluteNote(); effect2 = newSoundEffect(fluteSound, SampleRate, AudioChannels.Stereo); SoundEffectInstanceinstance = effect2.CreateInstance(); instance.Pan = -1; instance.Pitch = 1.5f; instance.Play(); Microphone/Bluetooth Support Playback through headset Capture through mic or headset
Media – Music/Photos/Video URI Song Playback Example Music Enumeration and Playback // Constructs a song from a URI UrimediaStreamUri = newUri("http://song.asx"); SongstreamedSong = Song.FromUri("Song", 			mediaStreamUri); // Play the song MediaPlayer.Play(streamedSong); Control and enumerate users’ media within a game Ability to play songs from URI/URL (i.e. music app) Picture Enumeration and Playback Supports photo picking/editing/publishing Retrieve Image Data MediaLibrarymedia =newMediaLibrary(); // Get the JPEG image data StreammyJpegImage = ReadAndModifyPicture(somePicture); // Save texture to Media Library    media.SavePicture("Awesome", myJpegImage); Video Playback Uses standard video player API Show/Hide controls
Demo:Sound
Interacting with games gets easier! Input / Touch 33
Input Overview Cross Platform Input API Xbox 360 Controllers (Xbox/Windows) Keyboard (Xbox/Windows/Windows Phone 7) Touch Input Handling vartouchCollection= TouchPanel.GetState(); //... foreach(vartouchLocationintouchCollection) { if(touchLocation.State ==  TouchLocationState.Released)  { //...  } } Touch API Available across platforms for portability (fewer #ifdefs)  Multipoint on Windows Phone 7 and Windows Orientation and resolution aware Developer can override
For Silverlight and XNA Framework Sensors 35
Sensor Overview Leverage Platform Features on Windows Phone 7 VibrationExample VibrateControllerrumbler; rumbler.Start(TimeSpan.FromSeconds(2)); Location Accelerometer Vibration Accelerometer Example Accelerometer accelerometer = new Accelerometer(); accelerometer.ReadingChanged +=AccelerometerReadingChanged; accelerometer.Start();
Demo:Touch
Xbox LIVE 38
Connectivity at a Glance Windows Phone 7 OS Xbox LIVE HTTP Push Gamer Services Invites Avatars Profile Achieve-ments Leader-boards TrialMode
Profile Your Identity in the Cloud Your phone knows you by your Windows Live ID Link to your Gamertag
Profile Read a Player’s Profile // Profile access SignedInGamergamer =Gamer.SignedInGamers[0]; // Get the player's GamerTag to display string gamerTag = gamer.Gamertag; // A SignedInGamer has a Profile GamerProfileprofile = gamer.GetProfile(); // Get the player's current GamerScore intgamerScore = profile.GamerScore; // get the gamer picture (PNG file stream) Stream gamerPictureStream = profile.GamerPicture;
Achievements Award an Achievement // Award an achievement SignedInGamergamer = Gamer.SignedInGamers[0]; gamer.AwardAchievement("Attended TechEd 2010"); Real achieventments Real gamerscore Up to 20 awards,    200G total Dead simple API,  deep game design Read Achievements // Get achievements AchievementCollectionachievements = gamer.GetAchievements(); // walk through achievements foreach (Achievement ain achievements) { string name = a.Name; string description = a.Description; boolearned = a.IsEarned; intscore = a.GamerScore; Stream icon = a.Picture;  }
Leaderboards Write to a Leaderboard // Create leaderboard identity with game mode 1 LeaderboardIdentityid = LeaderboardIdentity.Create(LeaderboardKey.BestScoreLifeTime, 1); // get the leaderboard writer from the signed in gamer LeaderboardWriterwriter = gamer.LeaderboardWriter; // get the leaderboard entry for the identity LeaderboardEntryentry = writer.GetLeaderboard(id); // write new leaderboard data entry.Rating = 1000; entry.columns.SetValue("Outcome",LeaderboardOutcome.Win); Compete withFriends Score- or Time-based Fixed columns 10k blob data Pivot on gamer Read From a Leaderboard // Read from leaderboard with page size of 10 LeaderboardReaderreader =LeaderboardReader.Read(id, gamer, 10); foreach (LeaderboardEntryein reader.Entries) { // score or time, as defined by identity.  Rating determines rank. long rating = e.Rating; // read additional column data long wins = e.Columns.GetValueInt64("Wins"); Stream blob = e.Columns.GetValueStream("Blob"); } reader.PageDown();
Trial Mode Simple check Simulate for testing Send user to your Marketplace offer Trial Mode Guide.SimulateTrialMode =true; // if we are in trial mode, show a marketplace offering if(Guide.IsTrialMode) { PlayerIndexplayerIndex = Gamer.SignedInGamers[0].PlayerIndex; Guide.ShowMarketplace(playerIndex); }
Avatars Currently supported through web service only Static pose rendered on LIVE back-end Download as a stream http://avatar.xboxlive.com/avatar/Major%20Nelson/avatar-body.png
Game Invites Game invites are handled through email Guide.ShowGameInvite() invokes platform picker UI Player chooses game invite recipients Friends see invitations in their games hub
Portable 47
Target Three Screens XNA Framework designed to be cross platform Smaller time investment and target more sockets Project synchronization between platforms
XNA Framework Profiles Create a clear development environment Target broadly or platform showcases Designed for compatibility across screens/devices This profile includes Windows Phone 7 Reach Platform showcase features Xbox 360/Windows Only HiDef
Demo:Building 2d and 3d games

More Related Content

What's hot

Game Memory Optimisation
Game Memory OptimisationGame Memory Optimisation
Game Memory OptimisationSumit Jain
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationNitin Sharma
 
Game software development trends
Game software development trendsGame software development trends
Game software development trends_veronika_
 
Xbox one development kit
Xbox one development kitXbox one development kit
Xbox one development kitrojizo frio
 
Introduction to android (and mobile) game development
Introduction to android (and mobile) game developmentIntroduction to android (and mobile) game development
Introduction to android (and mobile) game developmentRuslan Novikov
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game EngineDiksha Bhargava
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TVBeMyApp
 
Callum deighton engine terminology
Callum deighton engine terminologyCallum deighton engine terminology
Callum deighton engine terminologyDeightonater
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media playerNur Islam
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unitydavidluzgouveia
 
Enrique Duvós: Adobe Gaming Solutions
 Enrique Duvós: Adobe Gaming Solutions Enrique Duvós: Adobe Gaming Solutions
Enrique Duvós: Adobe Gaming SolutionsDevGAMM Conference
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminologykieranowens1997
 
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 software development trends presentation
Game software development trends   presentationGame software development trends   presentation
Game software development trends presentation_veronika_
 

What's hot (20)

Game Memory Optimisation
Game Memory OptimisationGame Memory Optimisation
Game Memory Optimisation
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
Game software development trends
Game software development trendsGame software development trends
Game software development trends
 
Xbox one development kit
Xbox one development kitXbox one development kit
Xbox one development kit
 
Introduction to android (and mobile) game development
Introduction to android (and mobile) game developmentIntroduction to android (and mobile) game development
Introduction to android (and mobile) game development
 
Unity 3d Basics
Unity 3d BasicsUnity 3d Basics
Unity 3d Basics
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Xbox final
Xbox finalXbox final
Xbox final
 
Callum deighton engine terminology
Callum deighton engine terminologyCallum deighton engine terminology
Callum deighton engine terminology
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media player
 
Development process
Development processDevelopment process
Development process
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 
Enrique Duvós: Adobe Gaming Solutions
 Enrique Duvós: Adobe Gaming Solutions Enrique Duvós: Adobe Gaming Solutions
Enrique Duvós: Adobe Gaming Solutions
 
Presentation final
Presentation finalPresentation final
Presentation final
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Pong
PongPong
Pong
 
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 software development trends presentation
Game software development trends   presentationGame software development trends   presentation
Game software development trends presentation
 

Viewers also liked

Introduction to Microsoft Silverlight
Introduction to Microsoft SilverlightIntroduction to Microsoft Silverlight
Introduction to Microsoft SilverlightGlen Gordon
 
Windows Phone 7 Services
Windows Phone 7 ServicesWindows Phone 7 Services
Windows Phone 7 ServicesGlen Gordon
 
Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and SilverlightGlen Gordon
 
Windows Phone Garage - Application Jumpstart
Windows Phone Garage - Application JumpstartWindows Phone Garage - Application Jumpstart
Windows Phone Garage - Application JumpstartGlen Gordon
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developersGlen Gordon
 
What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersGlen Gordon
 

Viewers also liked (7)

Introduction to Microsoft Silverlight
Introduction to Microsoft SilverlightIntroduction to Microsoft Silverlight
Introduction to Microsoft Silverlight
 
Windows Phone 7 Services
Windows Phone 7 ServicesWindows Phone 7 Services
Windows Phone 7 Services
 
Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and Silverlight
 
Windows Phone Garage - Application Jumpstart
Windows Phone Garage - Application JumpstartWindows Phone Garage - Application Jumpstart
Windows Phone Garage - Application Jumpstart
 
Xna Demo.Ppt
Xna Demo.PptXna Demo.Ppt
Xna Demo.Ppt
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
What's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for DevelopersWhat's new in Windows Phone Mango for Developers
What's new in Windows Phone Mango for Developers
 

Similar to Windows phone 7 xna

Prasentation Managed DirectX
Prasentation Managed DirectXPrasentation Managed DirectX
Prasentation Managed DirectXA. LE
 
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!David Isbitski
 
Desenvolvimento de Jogos em XNA para Windows Phone 7
Desenvolvimento de Jogos em XNA para Windows Phone 7Desenvolvimento de Jogos em XNA para Windows Phone 7
Desenvolvimento de Jogos em XNA para Windows Phone 7Comunidade NetPonto
 
Windows Phone 7
Windows Phone 7Windows Phone 7
Windows Phone 7Anas Rizeq
 
Ideaworks Game Studio Profile
Ideaworks Game Studio ProfileIdeaworks Game Studio Profile
Ideaworks Game Studio Profilerobhendry
 
Engine terminology
Engine terminology Engine terminology
Engine terminology crimzon36
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in UnityHakan Saglam
 
Y1 gd engine_terminology
Y1 gd engine_terminology Y1 gd engine_terminology
Y1 gd engine_terminology Jordanianmc
 
Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)Gamebryo
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderertobias_persson
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screenspaultrani
 
Flash for Mobile Devices
Flash for Mobile DevicesFlash for Mobile Devices
Flash for Mobile Devicespaultrani
 
Task 1- Engine terminology
Task 1- Engine terminologyTask 1- Engine terminology
Task 1- Engine terminologycrimzon36
 
Game programming with Groovy
Game programming with GroovyGame programming with Groovy
Game programming with GroovyJames Williams
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminologyJordanianmc
 

Similar to Windows phone 7 xna (20)

Prasentation Managed DirectX
Prasentation Managed DirectXPrasentation Managed DirectX
Prasentation Managed DirectX
 
Xna game development
Xna game developmentXna game development
Xna game development
 
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
 
Desenvolvimento de Jogos em XNA para Windows Phone 7
Desenvolvimento de Jogos em XNA para Windows Phone 7Desenvolvimento de Jogos em XNA para Windows Phone 7
Desenvolvimento de Jogos em XNA para Windows Phone 7
 
Game engines
Game enginesGame engines
Game engines
 
Imaginecup
ImaginecupImaginecup
Imaginecup
 
Windows Phone 7
Windows Phone 7Windows Phone 7
Windows Phone 7
 
Ideaworks Game Studio Profile
Ideaworks Game Studio ProfileIdeaworks Game Studio Profile
Ideaworks Game Studio Profile
 
Engine terminology
Engine terminology Engine terminology
Engine terminology
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in Unity
 
Y1 gd engine_terminology
Y1 gd engine_terminology Y1 gd engine_terminology
Y1 gd engine_terminology
 
Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderer
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
 
Engine Terms
Engine TermsEngine Terms
Engine Terms
 
Flash for Mobile Devices
Flash for Mobile DevicesFlash for Mobile Devices
Flash for Mobile Devices
 
Task 1- Engine terminology
Task 1- Engine terminologyTask 1- Engine terminology
Task 1- Engine terminology
 
Game programming with Groovy
Game programming with GroovyGame programming with Groovy
Game programming with Groovy
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 

Recently uploaded

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Recently uploaded (20)

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

Windows phone 7 xna

  • 1. Glen Gordon Developer Evangelist http://blogs.msdn.com/glengordon @glengordon Developing WP7 Games using XNA
  • 2. Agenda 2 Windows Phone 7 – A new beginning XNA Game Studio 4.0 – Powerful, Productive, Portable XNA Framework - Game Loop, Graphics, Audio, Media, Touch, Sensors XBOX Live Q & A
  • 3. Games Hub Featuring Xbox LIVE 3
  • 4. Xbox LIVE is Gaming Services Gamertag Friends Achievements Windows Phone will extend the Xbox LIVE brand beyond the console for the first time MerchandisingPremiumPlacement Windows Phone is the first step towards our vision of a ubiquitous gaming service Differentiates your title from the rest
  • 5. Game Development Opportunities To use the great features of Xbox LIVE Without Xbox LIVE You can still write andpublish games for Windows Phone Find a publisher! Lots to choose from! We’re interested in your great games! Create great games for marketplace http://developer.windowsphone.com wpgames@microsoft.com
  • 6. Windows Phone 7 Hardware Consistent sets of hardware capabilities defined by Microsoft Resolution Touch Input CPU / GPU RAM Hardware keyboard is optional
  • 7. User Experience Frameworks Modern XAML/event-driven application UI framework Rapid creation of visually rich apps HTML/Javascript Mature, robust, widely deployed technology High performance game framework Rapid creation of multi-screen 2D and 3D games Rich content pipeline Mature, robust, widely adopted technology spanning Xbox, Windows, and Zune GAMES(and applications) APPLICATIONS (and games)
  • 9. XNA Game Studio Makes game development easier XNA Framework provides robust APIs for games C#, .NET and Visual Studio tooling Solutions for game content processing Not an engine solution CreatingGames
  • 10. XNA Game Studio 4.0 Enhanced audio support Develop for Windows Phone 7 Simplified graphics APIs Visual Studio 2010 integration New configurable effects
  • 12. Managed Code for Game Development Windows Phone 7 Uses the .NET platform Managed code platform, no unsafe code .NET/XNA is used for games today! XNA Game Studio 4.0 is C# exclusive 800+ managed code games on XBLA/XBLIG wpgames@microsoft.com Windows games published through portals
  • 13. Addressing Performance Head-on Frameworks designed for performance Frameworks designed for performance Frameworks designed for performance Frameworks designed for performance XNA Framework designed for gaming scenarios Commitment to future of managed code No unnecessary garbage generation Three + years of profiling and investment We’ve built for performance on Windows Phone 7 Math libraries optimized Efficient APIs with tuned transitions to native code
  • 16. Visual Studio and .NET Productive development with .NET and C# High performance IDE Intellisense makes coding faster Integrated build/deploy/debug experience MSBuild engine for build automation
  • 17. Content Pipeline 17 Simplify Your Content Usage! Manage assets in Visual Studio Importers for common game data formats Optimize data into binary format for efficient loading Fully extensible Content projects external in XNA Game Studio 4.0
  • 18. Simplifying Game Development XNA Framework 18
  • 19. Bridging the Gap The XNA Framework Game Loop is layered on top of the Silverlight Application object on Windows Phone 7 Provides the bulk of integration of API’s Most of the XNA Framework can be accessed from Silverlight applications Including Gamer Services (Xbox LIVE) In this release some sharing/composition is not complete Scenes using GraphicsDevice from XNA Framework and UIElements from Silverlight You’ll want to choose the technology that works best for your scenarios
  • 20. Choosing the Right Technology Graphics UI control heavy consider Silverlight Desire vector graphics in XAML Media Rich video support in application Tooling If you use Microsoft Blend in your pipeline
  • 21. Leveraging the Right Technology Graphics Using 3D graphics Sprite heavy 2D applications should consider the XNA Framework Game Loop Simulation/Drawing Those who prefer a traditional update/draw/present frame loop Tooling Those who want to use the XNA Framework Content Pipeline graphics types
  • 22. XNA Framework Game Loop Start simple and customize! XNA Framework Game Loop Example protectedoverridevoid Update(GameTimegameTime) { // Allows the game to exit if(GamePad.GetState(PlayerIndex.One).Buttons.Back== ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here base.Update(gameTime); } protectedoverridevoid Draw(GameTimegameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here base.Draw(gameTime); } Traditional update/draw/present frame loop Core programming model consistent with previous releases Changes implemented yield better power performance on devices System integration with Windows Phone 7 best practices Translated to existing XNA Framework concepts
  • 25. Graphics Overview Evolution of our existing immediate mode rendering API Simplifies for resource and render state management Feature segmentation between “Reach”/“HiDef” profiles Rendering primitives 2D and 3D
  • 26. Configurable Effects BasicEffect SkinnedEffect New configurable effect classes on all platforms EnvironmentMapEffect DualTextureEffect Custom effects not available on Windows Phone 7 AlphaTestEffect
  • 27. System Support: Scaler and Orientation Write your game without worrying about native resolution or orientation Automatic rotation between portrait and landscapeTouch automatically supports both scale and orientation changes Scaler can drastically improve performance Trade off performance for “crispness” and shade fewer pixels800x480 = 384,000 pixels, 480x320 = 153,600 pixels Upsample an arbitrary back buffer to native device resolution Far higher quality than bilinear filteringAllows for easier porting from other platforms Scaling/Rotation comes for “free” from Hardware
  • 29. Can you hear me now? Audio & Media 29
  • 30. Audio Capture Example Audio publicvoidEventDrivenCapture() { mic= Microphone.Default; buffer = new byte[mic.GetSampleSizeInBytes(mic.BufferDuration)]; mic.BufferReady += newEventHandler(OnBufferReady); DynamicPlayback = newDynamicSoundEffectInstance(mic.SampleRate, AudioChannels.Mono); } publicvoidOnBufferReady(object sender, EventArgsargs) { // Get the latest captured audio. int duration = mic.GetData(buffer); // Do some post-capture processing and playback. MakeMeSoundLikeARobot(buffer, duration); DynamicPlayback.SubmitBuffer(buffer); } Audio Capture and Playback Simple API to play back WAV data Modify pitch, volume, pan audio Ability to play synthesized/buffered audio Serialize captured data Provides more control over System.Mediatypes on Windows Phone 7 Audio Playback Example // Load a sound effect from a raw stream SoundEffecteffect1 = SoundEffect.FromStream(GetStreamFromTheWeb("http://url.wav")); effect1.Play(); // Create dynamic audio on the fly byte[] fluteSound = GetFluteNote(); effect2 = newSoundEffect(fluteSound, SampleRate, AudioChannels.Stereo); SoundEffectInstanceinstance = effect2.CreateInstance(); instance.Pan = -1; instance.Pitch = 1.5f; instance.Play(); Microphone/Bluetooth Support Playback through headset Capture through mic or headset
  • 31. Media – Music/Photos/Video URI Song Playback Example Music Enumeration and Playback // Constructs a song from a URI UrimediaStreamUri = newUri("http://song.asx"); SongstreamedSong = Song.FromUri("Song", mediaStreamUri); // Play the song MediaPlayer.Play(streamedSong); Control and enumerate users’ media within a game Ability to play songs from URI/URL (i.e. music app) Picture Enumeration and Playback Supports photo picking/editing/publishing Retrieve Image Data MediaLibrarymedia =newMediaLibrary(); // Get the JPEG image data StreammyJpegImage = ReadAndModifyPicture(somePicture); // Save texture to Media Library   media.SavePicture("Awesome", myJpegImage); Video Playback Uses standard video player API Show/Hide controls
  • 33. Interacting with games gets easier! Input / Touch 33
  • 34. Input Overview Cross Platform Input API Xbox 360 Controllers (Xbox/Windows) Keyboard (Xbox/Windows/Windows Phone 7) Touch Input Handling vartouchCollection= TouchPanel.GetState(); //... foreach(vartouchLocationintouchCollection) { if(touchLocation.State == TouchLocationState.Released) { //... } } Touch API Available across platforms for portability (fewer #ifdefs) Multipoint on Windows Phone 7 and Windows Orientation and resolution aware Developer can override
  • 35. For Silverlight and XNA Framework Sensors 35
  • 36. Sensor Overview Leverage Platform Features on Windows Phone 7 VibrationExample VibrateControllerrumbler; rumbler.Start(TimeSpan.FromSeconds(2)); Location Accelerometer Vibration Accelerometer Example Accelerometer accelerometer = new Accelerometer(); accelerometer.ReadingChanged +=AccelerometerReadingChanged; accelerometer.Start();
  • 39. Connectivity at a Glance Windows Phone 7 OS Xbox LIVE HTTP Push Gamer Services Invites Avatars Profile Achieve-ments Leader-boards TrialMode
  • 40. Profile Your Identity in the Cloud Your phone knows you by your Windows Live ID Link to your Gamertag
  • 41. Profile Read a Player’s Profile // Profile access SignedInGamergamer =Gamer.SignedInGamers[0]; // Get the player's GamerTag to display string gamerTag = gamer.Gamertag; // A SignedInGamer has a Profile GamerProfileprofile = gamer.GetProfile(); // Get the player's current GamerScore intgamerScore = profile.GamerScore; // get the gamer picture (PNG file stream) Stream gamerPictureStream = profile.GamerPicture;
  • 42. Achievements Award an Achievement // Award an achievement SignedInGamergamer = Gamer.SignedInGamers[0]; gamer.AwardAchievement("Attended TechEd 2010"); Real achieventments Real gamerscore Up to 20 awards, 200G total Dead simple API, deep game design Read Achievements // Get achievements AchievementCollectionachievements = gamer.GetAchievements(); // walk through achievements foreach (Achievement ain achievements) { string name = a.Name; string description = a.Description; boolearned = a.IsEarned; intscore = a.GamerScore; Stream icon = a.Picture; }
  • 43. Leaderboards Write to a Leaderboard // Create leaderboard identity with game mode 1 LeaderboardIdentityid = LeaderboardIdentity.Create(LeaderboardKey.BestScoreLifeTime, 1); // get the leaderboard writer from the signed in gamer LeaderboardWriterwriter = gamer.LeaderboardWriter; // get the leaderboard entry for the identity LeaderboardEntryentry = writer.GetLeaderboard(id); // write new leaderboard data entry.Rating = 1000; entry.columns.SetValue("Outcome",LeaderboardOutcome.Win); Compete withFriends Score- or Time-based Fixed columns 10k blob data Pivot on gamer Read From a Leaderboard // Read from leaderboard with page size of 10 LeaderboardReaderreader =LeaderboardReader.Read(id, gamer, 10); foreach (LeaderboardEntryein reader.Entries) { // score or time, as defined by identity. Rating determines rank. long rating = e.Rating; // read additional column data long wins = e.Columns.GetValueInt64("Wins"); Stream blob = e.Columns.GetValueStream("Blob"); } reader.PageDown();
  • 44. Trial Mode Simple check Simulate for testing Send user to your Marketplace offer Trial Mode Guide.SimulateTrialMode =true; // if we are in trial mode, show a marketplace offering if(Guide.IsTrialMode) { PlayerIndexplayerIndex = Gamer.SignedInGamers[0].PlayerIndex; Guide.ShowMarketplace(playerIndex); }
  • 45. Avatars Currently supported through web service only Static pose rendered on LIVE back-end Download as a stream http://avatar.xboxlive.com/avatar/Major%20Nelson/avatar-body.png
  • 46. Game Invites Game invites are handled through email Guide.ShowGameInvite() invokes platform picker UI Player chooses game invite recipients Friends see invitations in their games hub
  • 48. Target Three Screens XNA Framework designed to be cross platform Smaller time investment and target more sockets Project synchronization between platforms
  • 49. XNA Framework Profiles Create a clear development environment Target broadly or platform showcases Designed for compatibility across screens/devices This profile includes Windows Phone 7 Reach Platform showcase features Xbox 360/Windows Only HiDef
  • 51. Summary Powerful Great managed code games, working today Windows Phone provides a powerful platform for gaming Productive Focus on being a game developer Great tools make you more productive Portable Target more platforms easily Focus on your game differences, not the technology
  • 52. Call to Action Download the Windows Phone Developer Tools http://developer.windowsphone.com Create awesome games!
  • 53. Additional Resources Email: wpgames@microsoft.com On the web: http://developer.windowsphone.com Hundreds of samples Lots of MVPs and experts to help you get started XNA Creators Club @ http://creators.xna.com Team Blog @ http://blogs.msdn.com/xna/ Shawn Hargreaves @ http://blogs.msdn.com/shawnhar/(Great Tech Info!) Contact Microsoft Blogs Peer Support @ http://forums.xna.com
  • 54. Q&A
  • 55. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.