microsoft: Создание игр на directx для windows 8 и windows phone 8
DESCRIPTION
Речь пойдет об особенностях создания игр для платформ Windows 8 и Windows Phone 8, начиная от возможностей интеграции с платформой, и заканчивая «смешиванием» DirectX кода на C++ с интерфейсными элементами на XAML/С#.TRANSCRIPT
Создание игр для Windows 8 и Windows Phone 8
Сергей Байдачный специалист по разработке программного обеспечения
Майкрософт Украина
О платформе Windows 8
Central and Eastern Europe
Зачем это нужно? С момента начала продаж Windows 7 по март 2012. Данные IDC
690M
Windows 7
345M
Android
196M
iOS
32M
Mac
Central and Eastern Europe
2D graphics 3D graphics
Segoe UI Fonts, text analysis, layout Image & video decoding
HTML5, CSS3 & Direct2D Direct3D
Segoe UI HTML5, CSS3 & DirectWrite HTML5, Direct2D effects,
WIC & Media Foundamon
DirectCompute & C++AMP
Архитектура графической подсистемы в Windows 8
Немного о DirectX
Версии DirectX • Windows XP DirectX 9 hardware DirectX 9 API • Windows Vista DirectX 10 hardware DirectX 10 API • Windows 7 DirectX 11 hardware DirectX 11 API
• Как разрабатывать игры для всех этих версий DirectX?
Feature levels • DirectX11 API предлагает унифицированный механизм разработки приложений
• Feature levels по отношению к оборудованию – Feature level 9 DirectX 9 hardware (ARM/power efficient machines) – Feature level 10 DirectX 10 hardware (many laptops) – Feature level 11 DirectX 11 hardware (high end gaming machines)
DirectX 11.1 • DirectX11.1 это DirectX 11 для Windows 8J • Интеграция в стек технологий платформы • DirectX11+ использует tessellamon и stereoscopic 3D
Windows SDK • The DirectX SDK is now part of the Windows SDK
– Use the Windows SDK to pass cermficamon
• This offers new opportunimes for Windows Store Apps – Build-‐mme shader compilamon with Visual Studio’s HLSL compiler, FXC.exe
– Try the Visual Shader Designer in Visual Studio 2012 • Check out MSDN for more informamon
Немного о Windows Phone 8
Windows Phone
Две модели приложений
Управляемая • Использование уже существующих подходов (C#/XAML)
• Большое количество элементов управления
• Поддержка XNA
Нативная • Разработка приложений на С++
• Переносимость некоторых библиотек и кода с Windows 8
• Повышение производительности игр при утилизации DirectX
Windows Phone
Две модели приложений
• Допускается встраивание DirectX компонент в XAML интерфейс
• Создание приложений на HTML 5 не поддерживается, но …
Windows Phone
C++ в Windows Phone 8 • Visual C++ 2012 • Тот же С++, что и в Windows 8
• Новые возможности C++11 RValue references Forward declared enums Bidirectional fences
static_assert Alignment Data-‐dependency ordering
Auto Standard-‐layout and trivial types exception_ptr
Trailing return types Extended friend declarations Thread-‐local storage
Lambdas Local and unnamed types as template arguments __func__
Decltype Range-‐based for-‐loop C99 preprocessor
Right angle brackets override and final long long
extern templates Minimal GC support
nullptr Atomics
Strongly typed enums Strong compare and exchange
Windows Phone
Что же можно делать на С++
Networking Proximity In-‐App Purchase Sensors Locamon File System Core app model Threading
Windows Phone
Немного о DirectX • C++/DirectX – поддержка нативных приложений • XNA продолжает поддерживаться • Поддержка DirectX 11.1, но уровень 9.3 • Возможность интеграции XAML и DirectX
И еще о C++
Windows Phone
C++ reimagined C++ 11
auto
shared_ptr
decltype
. . . . . h�p://msdn.microso�.com/en-‐us/library/hh567368.aspx
C++/CX Улучшение производительности С++ разработчика на платформе Windows 8 и Windows Phone 8
Windows Phone
C++ Component Extensions (C++/CX) Key Bindings Feature Summary
1. Data Types ref class Reference type
value class Value type
interface class Interface
property Property with get/set
event “Delegate property” with add/remove/raise
delegate Type-‐safe funcmon pointer
generic Type-‐safe generics
2. AllocaEon gcnew Garbage-‐collected allocamon
ref new Reference-‐counted allocamon
3. Pointer & Reference
^ Strong pointer (“hat” or “handle”)
% Strong reference
Поговорим о фреймворках
Ogre3d
SharpDX
PhoneGap
Trigger.io
CROSS PLATFORM • Desktop -‐ Mac and PC
53.1% • Game Developer Magazine survey of mobile developers
CROSS PLATFORM • Desktop -‐ Linux (Ubuntu 32-‐bit / 64-‐bit)
CROSS PLATFORM • Web Browsers
CROSS PLATFORM • Mobile -‐ iOS and Android
CROSS PLATFORM • Adobe Flash Player
CROSS PLATFORM • Consoles -‐ Playstamon 3, Nintendo Wii, Xbox 360
CROSS-PLATFORM Consoles - Nintendo Wii U
CROSS-‐PLATFORM • New Windows pla¡orms
Builds to Visual Studio 2012 Windows Editor only
Script in c#
WINDOWS RT • Intel and ARM processors supported • Plugins available to support Live Tiling, Xbox Live
PRODUCT STATUS • Product in closed beta at the moment • Titles already available on App Store • Going to open beta early 2013
PRODUCT STATUS Product going to closed beta in December 2012 Going to open beta early 2013
LICENSING • Not finalised as yet • Windows desktop and tablet in Unity/Unity Pro • Windows Phone 8 add-‐on $400/$1500
CONTACT
• www.unity3d.com • [email protected]
THANKS
Публикация приложений
Central and Eastern Europe
Магазин
Store policy • ARM or Neutral packages must support feature level 9_1
• You may specify a higher feature level when submi¥ng app – Check the feature level at the launch of your app – Nomfy the user if their machine is not the appropriate feature level
• Specify feature level in app descripmon • More informamon about feature level store policy on MSDN
Central and Eastern Europe
Регистрация h�p://dev.windowsphone.com – Windows Phone h�ps://appdev.microso�.com/StorePortals -‐ Windows 8 Бесплатная регистрация для студентов Можно регистрироваться как компания или как отдельный разработчик
Конкурс приложений для Windows Phone
• h�p://wp8.promorc.com
Вопросы?
[email protected] HTTP://BAYDACHNYY.COM
Вопросы