1 / 84

Creating a Cutting-Edge Game for Windows Tablets

Creating a Cutting-Edge Game for Windows Tablets. Chas. Boyd Windows Graphics 3-043. The Broad Range of PCs. The Opportunity. More users are spending more time with tablets/convertibles Living r oom and commute The hardware ecosystem is going there as a result

tamar
Download Presentation

Creating a Cutting-Edge Game for Windows Tablets

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. Creating a Cutting-Edge Game for Windows Tablets Chas. Boyd Windows Graphics 3-043

  2. The Broad Range of PCs

  3. The Opportunity • More users are spending more time with tablets/convertibles • Living room and commute • The hardware ecosystem is going there as a result • You can target those users via a Windows Store Game

  4. Broader PC Innovation • We know the platform is already capable of much more • Let us show you how you can use that platform to create an experience where you will stand out from the masses • These are the key areas where we have invested: • All the key tablet features • Most cutting-edge technology • You can self-publish • Easiest development

  5. PennyArcadeon Surface Pro • www.penny-arcade.com 02/22/2013 • “For me the Surface Pro is actually a great piece of hardware” • -Gabe

  6. Windows 8 Game Platform Technologies Your Killer Game Game Input Movies & Cut Scenes Graphics Audio Local Services Connected Services Tools Visual Studio Direct3D11 DirectX Video Pointer Point Windows Live WASAPI PLM Sensor API Windows Store Direct2D Asset Viewers Media Foundation AppData XAudio2 XInput Xbox LIVE Contracts Asset Processors HTML XAML

  7. PointerPoint Input • win->PointerPressed += refnewTypedEventHandler<CoreWindow^,PointerEventArgs^> • (this, &LonLatController::OnPointerPressed); • voidLonLatController::OnPointerPressed( • _In_CoreWindow^ sender, • _In_PointerEventArgs^ args • ) • { • float2 position = float2( // position of contact • args->CurrentPoint->Position.X, • args->CurrentPoint->Position.Y • ); • m_lonLatLastPoint = position; // save for use in controller • m_lonLatPointerID = args->CurrentPoint->PointerId; • }

  8. Cutting Edge Graphics in Windows 8.0 • Halo: Spartan Assault Reckless Racing Ultimate

  9. Windows 8.1 Game Platform Technologies Your Killer Game Game Input Movies & Cut Scenes Graphics Audio Local Services Connected Services Tools Visual Studio Direct3D11.2 DirectX Video Pointer Point Windows Live, Azure WASAPI PLM Azure Sensor API Windows Store Install Direct2D Asset Viewers Media Foundation AppData XAudio2 XInput Xbox LIVE Contracts Asset Processors HTML WiFi Direct XAML Shader Debugging

  10. Cutting Edge Games: Graphics

  11. Direct3D11 • Photoreal Rendering can help differentiate your product • Tablets run the Direct3D 11 Graphics API • e.g. Surface Pro, etc. • The Direct3D 11 API runs all PC hardware: Tablets to SLI • reduced-precision data types, shadow sampling, etc.

  12. DirectX 11 Feature Levels

  13. DirectX 11 Feature Level 9 • Vertex shaders • Pixel shaders • 8 Textures • 4 Render Targets • Cube maps • Volume textures • Anisotropic filtering • Antialiasing • HDR rendering • Texture compression • BC1, BC2, BC3

  14. DirectX 11 Feature Level 10 Geometry shaders Stream out 128 Textures per shader 8 Render Targets Integers in shaders Vertex textures Shader sampling Constant buffers Alpha-to-coverage Basic DirectCompute BC4, BC5 formats • Vertex shaders • Pixel shaders • 8 Textures • 4 Render Targets • Cube maps • Volume textures • Anisotropic filtering • Antialiasing • HDR rendering • Texture compression • BC1, BC2, BC3

  15. DirectX 11 Feature Level 11 Geometry shaders Stream out 128 Textures per shader 8 Render Targets Integers in shaders Vertex textures Shader sampling Constant buffers Alpha-to-coverage Basic DirectCompute BC4, BC5 formats Full DirectCompute Random access writes Tessellation shaders New compression formats BC6, BC7 Min10float, min16float Shader linking Present() optimizations Hardware overlays/scalers Tiled Resources • Vertex shaders • Pixel shaders • 8 Textures • 4 Render Targets • Cube maps • Volume textures • Anisotropic filtering • Antialiasing • HDR rendering • Texture compression • BC1, BC2, BC3

  16. Approximate Market Segmentation DX9 DX10 DX9 DX10 DX11 DX11

  17. Creating the Direct3D Device and Context ComPtr<ID3D11Device> device; ComPtr<ID3D11DeviceContext> context; D3D11CreateDevice( nullptr, // use the default adapter D3D_DRIVER_TYPE_HARDWARE, 0, // use 0 unless a software device creationFlags, // defined above featureLevels, // what app will support ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, // should always be D3D11_SDK_VERSION &device, // created device &m_featureLevel, // feature level of the device &context // corresponding immediate context );

  18. Tiled Resources

  19. Graphine

  20. Tiled Resources Applications • Games: terrain, shadow maps, skyboxes, etc. • Atlases: fine-grained memory management with minimal state changes • Imaging: 256Mpixel image display/editing • Maps: massive datasets • See Talk 4-063: • Massive virtual textures for games: Direct3D Tiled Resources

  21. Cutting Edge Game Performance • How do I make my high-end game fast enough on a tablet?

  22. Graphics Performance on Tablets • 2D / sprite games should run at native resolution wherever possible • Look at ways to minimize overdraw, such as more complex meshes. • 3D games may need to render the scene at lower-than-native resolution, and scale up to native before the overlay elements (score, etc) are applied • This is common practice on the PC and consoles • The new overlapping Swapchain API enables accelerated scaling • As we’ll see later

  23. Graphics Performance -Language • Also consider programming language • C++ is the fastest language we offer • Enables the most ‘vertical’ portability • The C++ sample code is very straightforward • Modeled after XNA architecture

  24. Cutting Edge Games: Size

  25. App Packaging and Distribution Typical cutting edge games of today come on dual layer DVDs (xbox 360, PC, etc) and are 8 GB to 25GB Digital downloads can take a while… How do I fit my game on a tablet?

  26. App Packages in Windows 8 ARM Binaries Audio Textures Shaders Animations x86 Binaries Audio Textures Shaders Animations x64 Binaries Audio Textures Shaders Animations 2GB 2GB 2GB

  27. App Packages in Windows 8.1 ARM Binaries Audio Textures Shaders Animations x86 Binaries Audio Textures Shaders Animations x64 Binaries Audio Textures Shaders Animations 8GB 8GB 8GB 25GB

  28. How do I minimize download time & storage? • DX9 GPUs don’t support some texture formats • Choice: • Use DX9 textures even for DX11 users (LCD) • DX11 users want the higher quality their hardware can use • Ship both: make DX9 users wait for DX11 textures to download • New PC hardware has wireless connectivity and SSD storage

  29. Windows 8.1 App Bundle x86 Binaries x64 Binaries ARM Binaries DX9 Textures DX10 Textures DX11 Textures 1.0x UI Elements 1.4x UI Elements 1.8x UI Elements 25GB

  30. Deployment 1 ARM Binaries DX9 Textures 1.0x UI Elements ARM binaries DX9 Textures 1.0x UI elements

  31. Deployment 2 x86 Binaries x64 Binaries ARM Binaries DX9 Textures DX10 Textures DX11 Textures 1.0x UI Elements 1.4x UI Elements 1.8x UI Elements

  32. Deployment 2 x64 Binaries DX9 Textures DX11 Textures 1.0x UI Elements 1.4x UI Elements x64 binaries DX11 Textures 1.4x UI elements

  33. App Packaging -How To • Keep game resources in separate folders • Standard naming convention for resource identifiers • Build time: Packager tags them all in the bundle • Deployment: Installer checks device, and installs the applicable bits • Note: The default bits for a single package are always installed: • FLDX9, 1.0x DPI setting, Locale language

  34. Group assets by FeatureLevel

  35. Create theApp Bundle

  36. App Bundle Contents

  37. App Bundle Contents

  38. App Bundle Contents

  39. App Bundle Contents

  40. Notify Resource Manager of Desired Folder // Set current UI thread's MRT ResourceContext'sDXFeatureLevel // Note: GetForCurrentView is per UI thread and will fail on the background thread auto rcontext  = Windows::ApplicationModel::Resources::Core::ResourceContext::GetForCurrentView(); rcontext->QualifierValues->Insert("DXFeatureLevel", "DX9"); // “DX10” or “DX11”

  41. Set Feature Level D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_1 }; String ResourceContextFL; switch ( m_featureLevel ) { case D3D_FEATURE_LEVEL9_1: case D3D_FEATURE_LEVEL9_2: case D3D_FEATURE_LEVEL9_3: ResourceContextFL = “DX9”; break; case D3D_FEATURE_LEVEL10_0: case D3D_FEATURE_LEVEL10_1: ResourceContextFL = “DX10”; break; case D3D_FEATURE_LEVEL_11_0: case D3D_FEATURE_LEVEL_11_1: ResourceContextFL = “DX11”; break; default: error; }

  42. App Bundle Summary App bundles let you tailor your product to your customer Up to Blu-Ray™ install sizes DirectX APIs already help you span different vendors App Bundles let you span different generations as well, as the industry continues moving forward via innovation

  43. Cutting Edge Games: Controls

  44. Automatic Input Routing Touch Weight Mouse Weight Game Logic Keyboard + Weight Game Controller Weight Accelerometer Weight

More Related