1 / 33

Windows Phone 7 Series: Casual Games in Silverlight

Windows Phone 7 Series: Casual Games in Silverlight. Andy Beaulieu Silverlight MVP MCT, MCSD.NET http://www.andybeaulieu.com. About Me. Andy Beaulieu Based in Syracuse, NY MCT, MCSD.NET Microsoft MVP Silverlight WPF & Silverlight Insiders Full-time Developer, Part-time Trainer

aurek
Download Presentation

Windows Phone 7 Series: Casual Games in Silverlight

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Phone 7 Series:Casual Games in Silverlight Andy Beaulieu Silverlight MVP MCT, MCSD.NET http://www.andybeaulieu.com

  2. About Me • Andy Beaulieu • Based in Syracuse, NY • MCT, MCSD.NET • Microsoft MVP Silverlight • WPF & Silverlight Insiders • Full-time Developer, Part-time Trainer • .NET Community: • Speaker at User Groups, Code Camps, Conferences • User Group Leader - www.cnydevelopers.net • INETA Volunteer • Blog and Creations: • www.andybeaulieu.com • www.spritehand.com

  3. Windows Phone 7 Series • Fresh Start for Mobile Windows • Consumer Market • No Backwards Compatibility • Available to Consumers • Fall 2010 • Developer Tools • VERY EARLY PREVIEW • Some bugs/missing API’s • Emulator is Shaky

  4. The Device • Screen Resolution • Initial Devices • 800 x 480 pixels • Later Devices • 480 x 320 pixels • Touch Input • Capacitive Multitouch

  5. Two Flavors of Applications • Modern XAML/event-driven application UI framework • Rapid creation of visually stunning apps • Metro-themed UI controls • HTML/JavaScript • 500,000 developers spanning Windows and web • High performance game framework • Rapid creation of multi-screen 2D and 3D games • Rich content pipeline • Mature, robust, widely adopted technology spanning Xbox 360, Windows, and Zune

  6. Two Flavors of Applications • Modern XAML/event-driven application UI framework • Rapid creation of visually stunning apps • Metro-themed UI controls • HTML/JavaScript • 500,000 developers spanning Windows and web • High performance game framework • Rapid creation of multi-screen 2D and 3D games • Rich content pipeline • Mature, robust, widely adopted technology spanning Xbox 360, Windows, and Zune For WP7 Version 1: Supported Out of Browser ONLY Not Supported in IE for WP7

  7. It’s Silverlight 3 (NOT 4) • WELL, EXCEPT FOR A “FEW THINGS…” • System InformationType: System.Windows.AnalyticsType: System.Windows.GpuInformationNetworkingType: System.Windows.CrossDomainAccessProperty: System.Net.Browser.WebRequestCreator.BrowserHttpControlsProperty: System.Windows.Controls.HyperlinkButton.TargetNameLocal MessagingType: System.Windows.Messaging.ListenFailedExceptionType: System.Windows.Messaging.LocalMessageReceiverType: System.Windows.Messaging.LocalMessageSenderType: System.Windows.Messaging.MessageReceivedEventArgsType: System.Windows.Messaging.SendCompletedEventArgsType: System.Windows.Messaging.SendFailedExceptionGraphics & MediaType: System.Windows.Media.Effects.PixelShaderProperty: System.Windows.Media.Effects.ShaderEffect.PixelShaderProperty: System.Windows.Controls.MediaElement.AttributesProperty: System.Windows.Controls.MediaElement.MarkersEvent: System.Windows.Controls.MediaElement.MarkerReachedApp ModelProperty: System.Windows.Interop.SilverlightHost.SourceProperty: System.Windows.Interop.SilverlightHost.InitParamsProperty: System.Windows.Interop.Settings.EnableAutoZoomProperty: System.Windows.Interop.Settings.EnableHTMLAccessProperty: System.Windows.Interop.Settings.WindowlessMethod: System.Windows.AssemblyPart.Load(System.IO.Stream)Out of BrowserType: System.Windows.InstallStateType: System.Windows.CheckAndDownloadUpdateCompletedEventArgsType: System.Windows.CheckAndDownloadUpdateCompletedEventHandlerType: System.Windows.OutOfBrowserSettingsProperty: System.Windows.Application.InstallStateProperty: System.Windows.Application.IsRunningOutOfBrowserEvent: System.Windows.Application.InstallStateChangedEvent: System.Windows.Application.CheckAndDownloadUpdateCompletedProperty: System.Windows.Deployment.ExternalCallersFromCrossDomainProperty: System.Windows.Deployment.OutOfBrowserSettingsType: System.Windows.WindowSettingsProperty: System.Windows.Interop.Content.IsFullScreenProperty: System.Windows.Interop.Content.ZoomFactorEvent: System.Windows.Interop.Content.FullScreenChangedEvent: System.Windows.Interop.Content.Zoomed 3

  8. Getting Started WARNING: VERY EARLY PREVIEW!!! • Visual Studio 2010 RC • Silverlight 4 RC Tools • Expression Blend 4 Beta • Windows Phone Developer Tools • Visual Studio 2010 Express for Windows Phone CTP • Windows Phone Emulator CTP • Silverlight for Windows Phone CTP • XNA 4.0 Game Studio CTP • Expression Blend Add-in Preview for Windows Phone • Expression Blend SDK Preview for Windows Phone

  9. The Emulator • “Real” Emulator • Boots into OS • Stripped Down OS • Only IE • Slow to Boot first time • Leave it Running! • Can use Host GPU IF… • DDI Version >= 10 • Driver Model >= WDDM 1.1 • Check for latest drivers! • Enable Virtualization in your BIOS! • Can support Multitouch w/app monitor

  10. DEMO: Hello, Windows Phone

  11. Automatic GPU Acceleration • Automatically Applied to • StoryBoard Animations • Perspective 3D (PlaneProjections) • Uses Video Card for Transform, Rotate, Scale, Rectangular Clip • NOT automatic for Procedural Animation!

  12. DEMO: GPU Acceleration

  13. Performance Statistics • Set EnableFrameRateCounter = true • A – Render Thread Framerate • B – UI Thread Framerate • C – Amount of Video Memory Used • D – Total # of Textures Used • E – Total # of Intermediate Textures Used • Set EnableCacheVisualization = true • Tinted items are NOT being cached by GPU

  14. Procedural Animation • Typical games have a “GAME LOOP” • Executes once per frame • Handle AI, Collisions, etc. • Use CompositionTarget.Rendering • Executes once per rendered frame • Executes separate from UI thread • Final Hardware will execute 30 Frames Per Second

  15. DEMO: Procedural Animation

  16. Behaviors • Abstract Logic from Design • Supported in Blend 3 + Blend 4 • Drag/Drop onto Design Surface for Runtime Logic • Great for Games • Physics Behaviors • Collision Triggers • Sound Behaviors

  17. DEMO: Physics Behaviors

  18. Sound Support • Silverlight normally uses MediaElement • Support MP3, WMA • Bugs in CTP • XNA Sound Support • Supports WAV • Support Pitch, Volume, Pan

  19. DEMO: XNA Sound

  20. Input via Buttons Back – Start – Search Only NOT usable for Games!

  21. Input via ApplicationBar • We can add “Buttons” to ApplicationBar • Only raise a Click event • No Down/Up Events • Limited Use in Games • Defined in Microsoft.Phone.Shell

  22. DEMO: ApplicationBar

  23. Input via Accelerometer +Y 1 Measures force applied on each axis over time • Not supported by Emulator • Can be faked using Mouse Input + Perspective Transform -Z -X +X +Z -Y

  24. DEMO: Faking Accelerometer

  25. Input via Touch • UIElement Class contains Events • ManipulationStarted • ManipulationDelta • ManipulationCompleted • ManipulationDelta • Provides Scale and Transform • No Rotation in CTP • Supported in Emulator • Requires Multitouch Monitor

  26. Vibration • Vibrates the phone for a given duration VibrateControllervc = VibrateController.Default; vc.Start(TimeSpan.FromSeconds(3));

  27. Adding a Splash Screen • Create a JPEG Image • 800 x 480 pixels • Name it splashscreenimage.jpg • Set Build Action to “Content”

  28. DEMO: Adding a Splash Screen

  29. Monetization The Marketplace Hub

  30. Monetization Try and buy Detailed product description Screen shots Reviews & ratings Related apps Optional game content rating More apps by developer

  31. Monetization • 70% revenue share • Trial API • Credit card & mobile operator billing • Paid, ad funded and free apps

  32. Deployment Process Develop & Debug Submit& Validate Certify & Sign Windows Phone Application Deployment Service Marketplace

  33. Resources My Blog http://www.andybeaulieu.com Getting Started (CTP) http://adamkinney.wordpress.com/2010/03/19/install-checklist-for-silverlight-4-rc-blend-4-beta-and-windows-phone-developer-tools-from-mix10/ Developer Portal http://developer.windowsphone.com/windows-phone-7-series/ Multitouch Intro http://msdn.microsoft.com/en-us/library/ff426933(VS.96).aspx Manipulation Sample for Silverlight http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4

More Related