windows 10 uwp development overview

48
Jaime Rodriguez Windows, PAX , Microsoft Universal Windows Games @jaimerodriguez

Upload: devgamm-conference

Post on 21-Jan-2017

157 views

Category:

Software


6 download

TRANSCRIPT

Page 1: Windows 10 UWP Development Overview

Jaime RodriguezWindows, PAX , Microsoft

Universal Windows Games

@jaimerodriguez

Page 2: Windows 10 UWP Development Overview

About me 15 years at Microsoft, in Redmond, WA

3 years involved in gaming

Helps major publishers bring mobile games to Windows

PC/ Retro gamer: Arcade, strategy

[email protected], @jaimerodriguez

Page 3: Windows 10 UWP Development Overview

The Windows Development Ecosystem

Natural User Inputs

Dev Tool + One SDK

Cloud Services

Windows Store + Dev Center

Adaptive User

Interface

Holographic Xbox

Devices +IoT

Surface HubMobilePC

Windows Core

Growing Middleware

Deeper Tool Integration

Hardware Partnerships

Broader Event

Presence

Page 4: Windows 10 UWP Development Overview

Windows Core

ServicesStore

Notifications

Roaming

Credentials

App model

UI FrameworkWindows XAML DirectX HTML

Navigation

Packaging

ContractsBackgroun

d

Mobile APIs Xbox APIs Desktop APIs…

Universal App Platform APIs

DesktopApplication

s(‘Win32’)

Web

Universal Windows PlatformA unified Windows core and app model that supports how you develop your game

Page 5: Windows 10 UWP Development Overview

6

Demo

Universal Windows Game

Xbox

Mobile

Page 6: Windows 10 UWP Development Overview

Windows 10

Visual Studio

Developer AccountNeeded upon store submission only

Pre-requisites

Page 7: Windows 10 UWP Development Overview

Tooling

Page 8: Windows 10 UWP Development Overview

Code Editor(C#,C++, JavaScript)

Faster/Safer C++ compiler*

Cross-platform compiler* (iOS,Android, Linux)

Debugger

Visual Studio

Graphics DebuggerCPU/GPU profilerMemory profiler Visual Studio Tools For Unity*

Integrated Dev Environment Games & Graphics

*New features or significant improvements

Page 9: Windows 10 UWP Development Overview

C++ ConformanceC+ +

11C+ +

14C+ +

17

initializer_list

Non-static data member init

R-value references

Inheriting constructors

default/deleted func.

Inline namespaces

User-defined literals

noexcept

char16_t/char32_talignas/

alignof __func__ extended sizeof

Reference qualifiers

Unicode string literalsMagic

staticsthread_loc

alUnrestricted

unions Attributes Universal char names in literalsData-dep ordering

attributesconstexp

rExpression

SFINAETwo-phase

lookup

auto, decltype(auto) Generic lambdas

Generalized lambda captures

Digit separatorBinary

literalsSized

deallocatorsDeprecated

attributeVariable

templatesExtended constexprNSDMI for

aggregatesAuto with braced-init

listu8 char literal

Attribs on ns and enumcoroutine

s

typename in template template-param

modules concepts Nested namespace

Folded expressions

Updated from VS 2013Completed in VS 2015

Partial implementation in VS 2015Under consideration

Page 10: Windows 10 UWP Development Overview

D3D10/D3D11/D3D11.1Event historyPixel historyCall stackObject tableObject visualizationCustom events

Graphics debugger

Page 11: Windows 10 UWP Development Overview

Inspect modelsFBX, X, OBJ

Camera controlsExperiment & learnCreate Basic shapesTransforms (e.g., scale)

Visual Studio 20 15 - Model/mesher viewer

Page 12: Windows 10 UWP Development Overview

Visual designerIntermediate renderingReal-time renderingApply to modelsExport to HLSL

Shader designer

Page 13: Windows 10 UWP Development Overview

HLSL editor keyword colorizationHLSL compilation built into VSShader property setting in VS

HLSL editor and compilation

Page 14: Windows 10 UWP Development Overview

Universal Windows

Platform

Page 15: Windows 10 UWP Development Overview

Windows Core

ServicesStore

Notifications

Roaming

Credentials

App model

UI FrameworkWindows XAML DirectX HTML

Navigation

Packaging

ContractsBackgroun

d

Mobile APIs Xbox APIs Desktop APIs…

Universal App Platform APIs

DesktopApplication

s(‘Win32’)

Web

Universal Windows PlatformA unified Windows core and app model that supports how you develop your game

Page 16: Windows 10 UWP Development Overview

Universal Windows Platform APIsUser interface

Fundamentals

Devices Graphics and media Communications and data

ServicesGeo-

location

Proximity

Direct3D Direct2D Direct Write

PlayTo

Contracts

Bing

Azure Mobile

HTML5/CSS XAMLInput Controls

Authentication

Bluetooth

USB

HID WiFi direct

Point of service

3Dprinting Scanning

WebGL

HTTP

Contacts

Appoint-ments

PDF

Speech syntheis

Diagnostics

Portable

Sensors Playback Capture

Printing

SVGCanvas

Local storage SMS

Streams Background transfer

Syndication

Networking

XML and JSON

OneDrive

Live tiles and toastAccessibility Data binding

Application services

Threading/timers

Memory management Globalization Cryptography

Xbox Live

Page 17: Windows 10 UWP Development Overview

Universal Windows Platform Game Dev Foundations

Page 18: Windows 10 UWP Development Overview

Graphics Direct3D 11 APIs GPU reports its feature level based on capabilities

Feature levels provide guaranteed feature setFeature level numbers correspond to API features supported by hardwareEach feature level is a superset of the feature level before itFeature levels do not imply performance

On device create, app provides a list of supported feature levels

Runtime will return the highest level the hardware implements

D3D_FEATURE_LEVEL_9_1D3D_FEATURE_LEVEL_9_3,

D3D_FEATURE_LEVEL_9_1, D3D_FEATURE_LEVEL_9_3,D3D_FEATURE_LEVEL_10_1,D3D_FEATURE_LEVEL_11_0,D3D_FEATURE_LEVEL_11_1D3D_FEATURE_LEVEL_11_2D3D_FEATURE_LEVEL_12_0D3D_FEATURE_LEVEL_12_1

D3D_FEATURE_LEVEL_11_2 3D_FEATURE_LEVEL_12_0D3D_FEATURE_LEVEL_12_1http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx

Page 19: Windows 10 UWP Development Overview

Common Graphics API across PC and ConsoleSignificant reduction in CPU overhead as compared to DX11Direct access to the GPU HW to deliver highest performance possibleUp to 50% CPU and 20% GPU perf improvements

Significant Improvements in PC DX12 driversDeep partnership w/ NVIDIA, AMD and Intel

Explicit and Implicit Multi-GPU SupportSupport for both Linked (SLI / Cross Fire) and Unlinked (Different GPUs)

Better tooling Improved Shader Compiler and Shader Model 6PC Support for Performance Investigator for Xbox (PIX)

DirectX 12

Page 20: Windows 10 UWP Development Overview

Coming soon to Windows & XboxPreview for Xbox available in March 2016 XDK Developer Preview for PC in Windows Anniversary Edition, this summer.. Full API set and broad consumer support early next year.

HDR HDR SDR

“Hollywood Says ‘Meh’ to 4K TV But ‘More!’ to High Dynamic Range” – Variety

“NAB 2015 – HDR Outshines 4K - It is as stunning as the shift from SD to HD” – Imagine

1080p+HDR just looks better than 4K+SDR – Radeon RTG Tech Summit

Page 21: Windows 10 UWP Development Overview

Windowing

Windowed

Full Screen Tablet Mode

Full Screen Desktop Mode

Page 22: Windows 10 UWP Development Overview

ApplicationView class TryEnterFullScreenMode ExitFullScreenMode SetPreferredMinSize TryResizeView

Don’t hardcode behaviors User is in control of windowing, you can’t force a behavior programmatically

When sensors are not present, apps default to landscape

Implementing Windowing

Page 23: Windows 10 UWP Development Overview

Touch

Keyboard

GamePad/Controller

Sensors

Input

Page 24: Windows 10 UWP Development Overview

win->PointerPressed += ref new TypedEventHandler<CoreWindow^,PointerEventArgs^>

(this, &LonLatController::OnPointerPressed);

void LonLatController::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args){

float2 position = float2(args->CurrentPoint->Position.X,args->CurrentPoint->Position.Y);

m_lonLatLastPoint = position; // save for use in controller

m_lonLatPointerID = args->CurrentPoint->PointerId;

}

One API for touch, mouse & ink : Pointer

Page 25: Windows 10 UWP Development Overview

Can now show and hide InputPane

Get size of InputPane when docked

Can accept text input without a TextBox

Text Input

Touch Keyboard, docked

Floating Keyboard

Page 26: Windows 10 UWP Development Overview

Windows.Gaming.Input.GamepadWindows Mobile, Desktop, Xbox One Multiple GamepadsHeadset

Migrating XInput to Gamepad XInputUAP

Gamepad

Page 27: Windows 10 UWP Development Overview

Windows Store

Contoso, Ltd.

Download to Own In-App Purchase Trials (feature & time-based)Mobile Operator BillingAds & Mediation App Install AdsVideo AdsPromo codes Affiliate programBundles* Subscriptions*

Unified Xbox, Windows & Phone Multi-user accounts with roles Flighting (betas) Hidden AppsRich Analytics

Engagement Services SDKA/B Testing

Submission Payouts Analytics

Cortana Lock screen

Monetize

Engagement Discovery APIs

Dev Portal

Page 28: Windows 10 UWP Development Overview

Middleware

Page 29: Windows 10 UWP Development Overview

UWP requires Unity 5.2+ Exports a Visual Studio Project (ala Xcode/iOS)UWP runs on .NET (not Mono) Full featured on editor & runtime, partial support for cloud services(no UnityAds) For now, Hololens is separate preview branchXbox is separate plugin (free)

Tips:Use Master configuration Export to XAML so you get other XAML controlshttp://github.com/Microsoft/Unityplugins

Unity

Page 30: Windows 10 UWP Development Overview

Unity examples

Page 31: Windows 10 UWP Development Overview

OpenGL ES via OSS ANGLE projecthttps://github.com/MSOpenTech/angle)

ANGLE

OpenGL ES Validation Layer

ANGLE Translation Layer

ANGLE Direct3D 11 Renderer

Direct3D 11

Windows App(Calls to OpenGL ES)Microsoft is

contributorEngineers in Windows dedicated to contributing OpenGL ES2 conformant

Tips:https://github.com/MSOpenTech/angle/wiki/ Use the templatesUse nuget package

Page 33: Windows 10 UWP Development Overview

ANGLE Examples

Page 34: Windows 10 UWP Development Overview

UWP support since v3.8 • Monthly update cadence for UWP, create issue on

github if need latest • Download from http://cocos2d-x.org/download

Tips:• V2.2.x at https://github.com/MSOpenTech/cocos2d-x• Get started at http://msopentech.github.io/cocos2d-x/ • Microsoft Virtual Academy Tutorial

Cocos2d-x https://github.com/cocos2d/cocos2d-x

Page 35: Windows 10 UWP Development Overview

Cocos2D-x Examples

Page 36: Windows 10 UWP Development Overview

App Middleware for WindowsMiddleware partnerships that help with development, analysis, user acquisition, and monetization

Development User Acquisition MonetizationAnalysis

Visual StudioApplication Insights & Mobile

Engagement

Page 37: Windows 10 UWP Development Overview

Bridges

Page 38: Windows 10 UWP Development Overview

Universal Windows PlatformWindows StoreWeb .NET & Win32 iOS

Objective C

Windows 10 Bridges

Page 39: Windows 10 UWP Development Overview

Objective-C compiles to native codex86, x64 and ARM

Microsoft OSS implementation of iOS APIsRecompilation required Not 100% coverage of iOS APIs

Easy Integration with WinRT APIs

Project ‘Islandwood’: Reuse Objective-C and iOS code in UWP apps

41

Page 40: Windows 10 UWP Development Overview

How does it work?

Objective-C Compiler and Runtime

WinRT API projectionsXAML interoperability

Visual Studio Integration and Tooling

ARM32 / x86 libobjc2

Storyboards and XIBsiOS APIs

iOS Frameworks and Tooling

UWP

Page 41: Windows 10 UWP Development Overview

Existing Code Reuse Modern deploymentUWP app model Activation via types, file types, URI protocolsApp Identity

Project “Centennial“Desktop apps using Universal Deployment

Runs on user-mode Win32 APIS (~no sandbox)No elevation

Runs on x86 (no phone)

Universal Win32 / Universal constraints

Page 42: Windows 10 UWP Development Overview

Demo

Project Centennial

Page 43: Windows 10 UWP Development Overview

UWP apps using desktop extensionsSupport for existing .NET (WinForms/WPF) + Win32 appsDesktop App Converter packages Win32 apps for the Universal Windows installer and deployment technology

Easier distribution + migrationAccess UWP APIs within your app instantly to use Live Tiles, notifications, Cortana, and moreChoose the path forward that makes sense for your app:• Enhance your app (e.g. access UWP APIs)• Add a UWP process to the app package (e.g. add

XAML UI, app services, etc.)

Desktop/Win32 games Bringing your existing desktop apps to the Universal Windows Platform

.msi

.appx

Page 44: Windows 10 UWP Development Overview

Convert your app to improve the user’s installation and uninstallation process, while keeping the PC cleanEnhance and extend the app to light up new Windows 10 features, while migrating over timeFinally, expand to all Windows 10 devices like phones, Xbox One and HoloLens

Existing desktop appsBringing your existing desktop apps to the Universal Windows Platform

Universal Windows Package

Desktop app

Universal Windows Package

UWP APIs

Desktop app

Universal Windows Package

Desktop app

UWP app

Universal Windows Package

Desktop app

UWP app

Universal Windows Package

UWP app

Convert

Enhance

Extend

Migrate

Expand

Page 45: Windows 10 UWP Development Overview

The Windows Development Ecosystem

Natural User Inputs

Dev Tool + One SDK

Cloud Services

Windows Store + Dev Center

Adaptive User

Interface

Holographic Xbox

Devices +IoT

Surface HubMobilePC

Windows Core

Growing Middleware

Deeper Tool Integration

Hardware Partnerships

Broader Event

Presence

Page 46: Windows 10 UWP Development Overview

Our Commitment to Game Dev SuccessThe best place to play (and buy)Unifying Xbox features with PC gaming to create platform-level customer-facing experiencesCompany-wide commitment to Windows Store as the single best place to buy content, especially games

The best place for devs to create gamesIndustry standard tools and middlewareCross-platform and cross-device capabilities

Deep integration with gaming services across MS & our partnersWide suite of game creation and support capabilities, including Azure’s back-end & tooling Integrate, leverage & support the best third-party services & tools inside Microsoft’s

Page 47: Windows 10 UWP Development Overview

Спасибо!

[email protected] @jaimerodriguez @jaimerodriguez

Page 48: Windows 10 UWP Development Overview

© 2015 Microsoft Corporation. All rights reserved. Microsoft, Windows 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.