SlideShare a Scribd company logo
1 of 24
Porting Unity games to Windows*
Porting…
Store
Lifecycle
Splash Screen
Settings
Networking
Platform APIs
GPU
Memory
Input
Layout/Screen
Hardware
Live Tiles
Notifications
Sharing
Voice (WP only)
Light-up
Porting recommendations
1. Prepare your game for x-platform
2. Port your logic
3. Port or replace your plugins
4. Platform specific optimizations
& configuration
5. Implement Light-up
6. Optimize performance
Preparing for x-platform
Feature Detection
Dynamic screen size/resolution
Portable Scripts (with platform defines)
Plugins
Unity Run-time on Windows Store and
Windows Phone Apps
Compile & run-time differences
Compiler: Mono
Run-time: Mono
Compiler: Mono
Run-time:
.NET for WP
Compiler: .NET
Run-time:
.NET Core + WinRT
Universal apps
(WP 8.1, Win8 & 8.1 )
Windows Phone 8Unity Editor
.NET CLR (Desktop)
Mono and.NET Core differences…
Mono is a subset of .NET Framework
Mono
.NET Core
Trouble!!
These classes exist in
Mono but are not available to
Unity in Windows Store
and Phone!!
.NET Core is a subset of .NET Framework
What is missing?
Namespace Example classes Workaround
System.Collections Hashtable, ArrayList, List Use WinRTLegacy (from Unity)
System.IO File, StreamReader, TextReader Write using Windows.Storage
System.Xml XmlDocument, XmlElement Use WinRTLegacy for basic coverage
System.Reflection Write using equivalent WinRT APIs
System.Security.Cryptography SHA1, TripleDES Use WinRTLegacy for basic coverage
System.Net Socket, NetworkStream Use WinRT networking APIs
System.Threading Thread WinRT is async, use Task, use
coroutines
System.Runtime.Serialisation BinaryWriter No direct binary support. Use
alternate methods
Conditional Compilation on Windows/Universal
Use .NET Core (default)
C# compiled using MS Compiler
Can call Windows Runtime APIs from inline scripts
C# types are not visible to JS classes
.NET Core partially
C# scripts in ( Plugins || Standard Assets) use Mono Compiler, can’t
reference Windows Run-time
C# types compiled w/ Mono are visible to JS scripts
None
Uses Mono compiler for everything, no inline calls to WinRT types
Windows Store
Keyboard
Mouse
Touch
Accelerometer/Gyro
Camera
Microphone
Controller
Windows Phone
Touch
Accelerometer or Gyro
Camera
Microphone
Back Button
Input
Capabilities (Windows Phone)
Developers must declare
hardware or software capabilities
in the app’s manifest
Users get presented the required
capabilities upon install
Capabilities (Windows)
Developers must declare
hardware or software
capabilities in the app’s
manifest
Users get presented the
required capabilities upon
install
Tips and Tricks
Back button ( Windows Phone )
Windows Phone:
App pops the back stack or dismisses modal UI if back button is pressed
App exits when back button is pressed from ‘home’ page and no modal
UI is visible
Unity
Handles back button (natively) and maps it to KeyCode.Escape
Exits the app if back button pressed and Application.Quit is called ( )
Back button
//Unity does this for you automatically
<phone:PhoneApplicationPage
BackKeyPress="PhoneApplicationPage_BackKeyPress" >
private void PhoneApplicationPage_BackKeyPress(object sender, CancelEventArgs e)
{
e.Cancel = UnityApp.BackButtonPressed();
}
//IN your unity code, handle back button, you should quit, go back or dismiss modal UI
void Update {
if (Input.GetKeyDown(KeyCode.Escape)){
Application.Quit();
}
}
Keyboard (Phone & Windows, Unity 4.5+ )
Seamless keyboard support via GUI
Programmatic access via TouchScreenKeyboard class
On Windows, set keyboard.area is not supported
Setting keyboard.active after instantiate is not required anymore
Memory (Windows Phone)
Memory Limits
http://msdn.microsoft.com/en-us/library/windows/apps/jj681682(v=vs.105).aspx
App type 512 MB 1-GB phones 2-GB phones
Windows Phone 8.0 180 MB 380 MB 780 MB
Silverlight 8.1 and
Windows Runtime 8.1
185 MB 390 MB 825 MB
App type Platform
ID_FUNCCAP_EXTEND_MEM Gets you the 180 MB and 380MB WP8
ID_REQ_MEMORY_300 Opts out of lower memory devices WP8
minDeviceMemory Appx similar for ID_REQ_MEMORY WP81, Appx
Manifest settings
Memory Tips (Windows Phone)
Test on low-end devices
Use the Unity profiler
Compress textures to DXT1 or DXT5
Reduce Audio Memory Usage
‘Stream from disc’ instead of ‘Compressed in memory’
Memory, useful APIs (Windows Phone)
DeviceStatus.DeviceTotalMemory
DeviceStatus.ApplicationCurrentMemoryUsage
DeviceStatus.ApplicationPeakMemoryUsage
Asset bundles
Can’t be explicitly downloaded
Useful to support multiple resolutions
Useful to chunk features (e.g. tutorial)
Audio ( Phone)
If you hear “crackles” on debug builds, try master
Test on devices, emulator will not be representative
To maximize memory, stream from disk
Look at media codecs for Windows Phone
http://msdn.microsoft.com/en-
us/library/windows/apps/ff462087(v=vs.105).aspx
Handling Screen Size Changes
UnityEngine.WSA.Application.windowSizeChanged += WindowSizeChanged;
public static void WindowSizeChanged(int width, int height)
{
if(width <= 500) {
GameController.SP.paused();
}
else {
GameController.SP.unpaused();
}
}
Summary
Different run-times
Editor is Mono
Device is .NET
A fairly typical hardware port
Pay attention to
Memory on Windows Phone 8
Back button
Input on Windows
©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics 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.

More Related Content

What's hot

Engine terminology
Engine terminologyEngine terminology
Engine terminologythomasmcd6
 
Eirplay game production
Eirplay game productionEirplay game production
Eirplay game productionPete Lynch
 
Windows 7 Tips Tricks Ppt Version
Windows 7 Tips Tricks Ppt VersionWindows 7 Tips Tricks Ppt Version
Windows 7 Tips Tricks Ppt Versionjohn weston
 
Windows 8 ppt by parveen vijaraniya
Windows 8 ppt by parveen vijaraniyaWindows 8 ppt by parveen vijaraniya
Windows 8 ppt by parveen vijaraniyavijaraniya
 
Huawei emui anoop ts
Huawei emui anoop tsHuawei emui anoop ts
Huawei emui anoop tsIIT Roorkee
 
Windows phone 7 overview
Windows phone 7 overviewWindows phone 7 overview
Windows phone 7 overviewSoumow Dollon
 
Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Comunidade NetPonto
 
Windows 8.1 seminar presentation
Windows 8.1 seminar presentationWindows 8.1 seminar presentation
Windows 8.1 seminar presentationAnkitKumarBansal5
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)LewisB2013
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...BeMyApp
 
Michael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminologyMichael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminologyMike Hughes
 
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
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TVDavid Carver
 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshopnarigadu
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Soumow Dollon
 
Mobile GameDevelopment using Flash Lite
Mobile GameDevelopment using Flash LiteMobile GameDevelopment using Flash Lite
Mobile GameDevelopment using Flash LiteJuwal Bose
 

What's hot (20)

Engine terminology
Engine terminologyEngine terminology
Engine terminology
 
Eirplay game production
Eirplay game productionEirplay game production
Eirplay game production
 
09. User Input
09. User Input09. User Input
09. User Input
 
Windows 7 Tips Tricks Ppt Version
Windows 7 Tips Tricks Ppt VersionWindows 7 Tips Tricks Ppt Version
Windows 7 Tips Tricks Ppt Version
 
Windows 8 ppt by parveen vijaraniya
Windows 8 ppt by parveen vijaraniyaWindows 8 ppt by parveen vijaraniya
Windows 8 ppt by parveen vijaraniya
 
Huawei emui anoop ts
Huawei emui anoop tsHuawei emui anoop ts
Huawei emui anoop ts
 
Windows phone 7 overview
Windows phone 7 overviewWindows phone 7 overview
Windows phone 7 overview
 
User interfaces
User interfacesUser interfaces
User interfaces
 
Windows 8 Developer Preview
Windows 8 Developer PreviewWindows 8 Developer Preview
Windows 8 Developer Preview
 
Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7Construir Aplicações Silverlight para Windows Phone 7
Construir Aplicações Silverlight para Windows Phone 7
 
Windows 8.1 seminar presentation
Windows 8.1 seminar presentationWindows 8.1 seminar presentation
Windows 8.1 seminar presentation
 
Unity3D Programming
Unity3D ProgrammingUnity3D Programming
Unity3D Programming
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
Michael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminologyMichael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminology
 
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
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TV
 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshop
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5
 
Mobile GameDevelopment using Flash Lite
Mobile GameDevelopment using Flash LiteMobile GameDevelopment using Flash Lite
Mobile GameDevelopment using Flash Lite
 

Similar to Porting unity games to windows - London Unity User Group

Iasi 15 noiembrie 2009 Introduction to Windows Mobile programming
Iasi  15 noiembrie 2009   Introduction to Windows Mobile programmingIasi  15 noiembrie 2009   Introduction to Windows Mobile programming
Iasi 15 noiembrie 2009 Introduction to Windows Mobile programmingCatalin Gheorghiu
 
XNA and Windows Phone
XNA and Windows PhoneXNA and Windows Phone
XNA and Windows PhoneGlen Gordon
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xnaGlen Gordon
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - IntroductionFrancis Seriña
 
Let’s talk virtualization
Let’s talk virtualizationLet’s talk virtualization
Let’s talk virtualizationEtienne Tremblay
 
Android testing
Android testingAndroid testing
Android testingBitbar
 
Developing windows 10 universal apps
Developing windows 10 universal appsDeveloping windows 10 universal apps
Developing windows 10 universal appsTom Walker
 
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Daniel Meixner
 
Adc2012 windows phone 8
Adc2012 windows phone 8Adc2012 windows phone 8
Adc2012 windows phone 8AlexanderGoetz
 
Windows Phone 8 Advanced Developers Conference
Windows Phone 8 Advanced Developers ConferenceWindows Phone 8 Advanced Developers Conference
Windows Phone 8 Advanced Developers ConferenceDamir Dobric
 
Sony Erricson X1 Panel Development
Sony Erricson X1 Panel DevelopmentSony Erricson X1 Panel Development
Sony Erricson X1 Panel DevelopmentSeo Jinho
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screenspaultrani
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Going Mobile by Nate Beck
Going Mobile by Nate BeckGoing Mobile by Nate Beck
Going Mobile by Nate Beckmochimedia
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishingMuhd Basheer
 
Ideal Deployment In .NET World
Ideal Deployment In .NET WorldIdeal Deployment In .NET World
Ideal Deployment In .NET WorldDima Pasko
 

Similar to Porting unity games to windows - London Unity User Group (20)

Iasi 15 noiembrie 2009 Introduction to Windows Mobile programming
Iasi  15 noiembrie 2009   Introduction to Windows Mobile programmingIasi  15 noiembrie 2009   Introduction to Windows Mobile programming
Iasi 15 noiembrie 2009 Introduction to Windows Mobile programming
 
Getting started windows phone unity
Getting started windows phone unityGetting started windows phone unity
Getting started windows phone unity
 
Getting started windows store unity
Getting started windows store unityGetting started windows store unity
Getting started windows store unity
 
XNA and Windows Phone
XNA and Windows PhoneXNA and Windows Phone
XNA and Windows Phone
 
Porting tips windows phone unity
Porting tips windows phone unityPorting tips windows phone unity
Porting tips windows phone unity
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Windows phone 7 xna
Windows phone 7 xnaWindows phone 7 xna
Windows phone 7 xna
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
Let’s talk virtualization
Let’s talk virtualizationLet’s talk virtualization
Let’s talk virtualization
 
Android testing
Android testingAndroid testing
Android testing
 
Developing windows 10 universal apps
Developing windows 10 universal appsDeveloping windows 10 universal apps
Developing windows 10 universal apps
 
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
Windows und Windows Phone App Entwicklung (Daniel Meixner, DWX 2014)
 
Adc2012 windows phone 8
Adc2012 windows phone 8Adc2012 windows phone 8
Adc2012 windows phone 8
 
Windows Phone 8 Advanced Developers Conference
Windows Phone 8 Advanced Developers ConferenceWindows Phone 8 Advanced Developers Conference
Windows Phone 8 Advanced Developers Conference
 
Sony Erricson X1 Panel Development
Sony Erricson X1 Panel DevelopmentSony Erricson X1 Panel Development
Sony Erricson X1 Panel Development
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Going Mobile by Nate Beck
Going Mobile by Nate BeckGoing Mobile by Nate Beck
Going Mobile by Nate Beck
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishing
 
Ideal Deployment In .NET World
Ideal Deployment In .NET WorldIdeal Deployment In .NET World
Ideal Deployment In .NET World
 

More from Lee Stott

Cortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacksCortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacksLee Stott
 
Project Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning APIProject Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning APILee Stott
 
Visual studio professional 2015 overview
Visual studio professional 2015 overviewVisual studio professional 2015 overview
Visual studio professional 2015 overviewLee Stott
 
Azure cloud for students and educators
Azure cloud   for students and educatorsAzure cloud   for students and educators
Azure cloud for students and educatorsLee Stott
 
Getting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine MicrosoftGetting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine MicrosoftLee Stott
 
Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)Lee Stott
 
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud SubscriptionSetting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud SubscriptionLee Stott
 
Imagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and EducatorsImagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and EducatorsLee Stott
 
Visual Studio Tools for Unity Unity User Group 23rd Feb
Visual Studio Tools for Unity  Unity User Group 23rd FebVisual Studio Tools for Unity  Unity User Group 23rd Feb
Visual Studio Tools for Unity Unity User Group 23rd FebLee Stott
 
Unity camp london feb 2015
Unity camp london feb 2015Unity camp london feb 2015
Unity camp london feb 2015Lee Stott
 
Marmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftMarmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftLee Stott
 
E book Mobile App Marketing_101
E book Mobile App Marketing_101E book Mobile App Marketing_101
E book Mobile App Marketing_101Lee Stott
 
Game Republic 24th April 2014 - Maximising your app revenue
Game Republic 24th April 2014  - Maximising your app revenueGame Republic 24th April 2014  - Maximising your app revenue
Game Republic 24th April 2014 - Maximising your app revenueLee Stott
 
Updateshow Manchester April 2014
Updateshow Manchester April 2014Updateshow Manchester April 2014
Updateshow Manchester April 2014Lee Stott
 
Microsoft Office for Education
Microsoft Office for EducationMicrosoft Office for Education
Microsoft Office for EducationLee Stott
 
Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability Lee Stott
 
Game Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 GatesheadGame Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 GatesheadLee Stott
 
GamesWest 2013 December
GamesWest 2013 December GamesWest 2013 December
GamesWest 2013 December Lee Stott
 
Microsoft Graduate Recuirtment postcard
 Microsoft Graduate Recuirtment postcard Microsoft Graduate Recuirtment postcard
Microsoft Graduate Recuirtment postcardLee Stott
 
Microsoft 2014 Graduate brochure
Microsoft 2014 Graduate brochureMicrosoft 2014 Graduate brochure
Microsoft 2014 Graduate brochureLee Stott
 

More from Lee Stott (20)

Cortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacksCortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacks
 
Project Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning APIProject Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning API
 
Visual studio professional 2015 overview
Visual studio professional 2015 overviewVisual studio professional 2015 overview
Visual studio professional 2015 overview
 
Azure cloud for students and educators
Azure cloud   for students and educatorsAzure cloud   for students and educators
Azure cloud for students and educators
 
Getting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine MicrosoftGetting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine Microsoft
 
Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)
 
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud SubscriptionSetting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
 
Imagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and EducatorsImagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and Educators
 
Visual Studio Tools for Unity Unity User Group 23rd Feb
Visual Studio Tools for Unity  Unity User Group 23rd FebVisual Studio Tools for Unity  Unity User Group 23rd Feb
Visual Studio Tools for Unity Unity User Group 23rd Feb
 
Unity camp london feb 2015
Unity camp london feb 2015Unity camp london feb 2015
Unity camp london feb 2015
 
Marmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftMarmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott Microsoft
 
E book Mobile App Marketing_101
E book Mobile App Marketing_101E book Mobile App Marketing_101
E book Mobile App Marketing_101
 
Game Republic 24th April 2014 - Maximising your app revenue
Game Republic 24th April 2014  - Maximising your app revenueGame Republic 24th April 2014  - Maximising your app revenue
Game Republic 24th April 2014 - Maximising your app revenue
 
Updateshow Manchester April 2014
Updateshow Manchester April 2014Updateshow Manchester April 2014
Updateshow Manchester April 2014
 
Microsoft Office for Education
Microsoft Office for EducationMicrosoft Office for Education
Microsoft Office for Education
 
Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability
 
Game Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 GatesheadGame Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 Gateshead
 
GamesWest 2013 December
GamesWest 2013 December GamesWest 2013 December
GamesWest 2013 December
 
Microsoft Graduate Recuirtment postcard
 Microsoft Graduate Recuirtment postcard Microsoft Graduate Recuirtment postcard
Microsoft Graduate Recuirtment postcard
 
Microsoft 2014 Graduate brochure
Microsoft 2014 Graduate brochureMicrosoft 2014 Graduate brochure
Microsoft 2014 Graduate brochure
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Porting unity games to windows - London Unity User Group

  • 1. Porting Unity games to Windows*
  • 3. Porting recommendations 1. Prepare your game for x-platform 2. Port your logic 3. Port or replace your plugins 4. Platform specific optimizations & configuration 5. Implement Light-up 6. Optimize performance
  • 4. Preparing for x-platform Feature Detection Dynamic screen size/resolution Portable Scripts (with platform defines) Plugins
  • 5. Unity Run-time on Windows Store and Windows Phone Apps
  • 6. Compile & run-time differences Compiler: Mono Run-time: Mono Compiler: Mono Run-time: .NET for WP Compiler: .NET Run-time: .NET Core + WinRT Universal apps (WP 8.1, Win8 & 8.1 ) Windows Phone 8Unity Editor
  • 7. .NET CLR (Desktop) Mono and.NET Core differences… Mono is a subset of .NET Framework Mono .NET Core Trouble!! These classes exist in Mono but are not available to Unity in Windows Store and Phone!! .NET Core is a subset of .NET Framework
  • 8. What is missing? Namespace Example classes Workaround System.Collections Hashtable, ArrayList, List Use WinRTLegacy (from Unity) System.IO File, StreamReader, TextReader Write using Windows.Storage System.Xml XmlDocument, XmlElement Use WinRTLegacy for basic coverage System.Reflection Write using equivalent WinRT APIs System.Security.Cryptography SHA1, TripleDES Use WinRTLegacy for basic coverage System.Net Socket, NetworkStream Use WinRT networking APIs System.Threading Thread WinRT is async, use Task, use coroutines System.Runtime.Serialisation BinaryWriter No direct binary support. Use alternate methods
  • 9. Conditional Compilation on Windows/Universal Use .NET Core (default) C# compiled using MS Compiler Can call Windows Runtime APIs from inline scripts C# types are not visible to JS classes .NET Core partially C# scripts in ( Plugins || Standard Assets) use Mono Compiler, can’t reference Windows Run-time C# types compiled w/ Mono are visible to JS scripts None Uses Mono compiler for everything, no inline calls to WinRT types
  • 11. Capabilities (Windows Phone) Developers must declare hardware or software capabilities in the app’s manifest Users get presented the required capabilities upon install
  • 12. Capabilities (Windows) Developers must declare hardware or software capabilities in the app’s manifest Users get presented the required capabilities upon install
  • 14. Back button ( Windows Phone ) Windows Phone: App pops the back stack or dismisses modal UI if back button is pressed App exits when back button is pressed from ‘home’ page and no modal UI is visible Unity Handles back button (natively) and maps it to KeyCode.Escape Exits the app if back button pressed and Application.Quit is called ( )
  • 15. Back button //Unity does this for you automatically <phone:PhoneApplicationPage BackKeyPress="PhoneApplicationPage_BackKeyPress" > private void PhoneApplicationPage_BackKeyPress(object sender, CancelEventArgs e) { e.Cancel = UnityApp.BackButtonPressed(); } //IN your unity code, handle back button, you should quit, go back or dismiss modal UI void Update { if (Input.GetKeyDown(KeyCode.Escape)){ Application.Quit(); } }
  • 16. Keyboard (Phone & Windows, Unity 4.5+ ) Seamless keyboard support via GUI Programmatic access via TouchScreenKeyboard class On Windows, set keyboard.area is not supported Setting keyboard.active after instantiate is not required anymore
  • 17. Memory (Windows Phone) Memory Limits http://msdn.microsoft.com/en-us/library/windows/apps/jj681682(v=vs.105).aspx App type 512 MB 1-GB phones 2-GB phones Windows Phone 8.0 180 MB 380 MB 780 MB Silverlight 8.1 and Windows Runtime 8.1 185 MB 390 MB 825 MB App type Platform ID_FUNCCAP_EXTEND_MEM Gets you the 180 MB and 380MB WP8 ID_REQ_MEMORY_300 Opts out of lower memory devices WP8 minDeviceMemory Appx similar for ID_REQ_MEMORY WP81, Appx Manifest settings
  • 18. Memory Tips (Windows Phone) Test on low-end devices Use the Unity profiler Compress textures to DXT1 or DXT5 Reduce Audio Memory Usage ‘Stream from disc’ instead of ‘Compressed in memory’
  • 19. Memory, useful APIs (Windows Phone) DeviceStatus.DeviceTotalMemory DeviceStatus.ApplicationCurrentMemoryUsage DeviceStatus.ApplicationPeakMemoryUsage
  • 20. Asset bundles Can’t be explicitly downloaded Useful to support multiple resolutions Useful to chunk features (e.g. tutorial)
  • 21. Audio ( Phone) If you hear “crackles” on debug builds, try master Test on devices, emulator will not be representative To maximize memory, stream from disk Look at media codecs for Windows Phone http://msdn.microsoft.com/en- us/library/windows/apps/ff462087(v=vs.105).aspx
  • 22. Handling Screen Size Changes UnityEngine.WSA.Application.windowSizeChanged += WindowSizeChanged; public static void WindowSizeChanged(int width, int height) { if(width <= 500) { GameController.SP.paused(); } else { GameController.SP.unpaused(); } }
  • 23. Summary Different run-times Editor is Mono Device is .NET A fairly typical hardware port Pay attention to Memory on Windows Phone 8 Back button Input on Windows
  • 24. ©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics 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.