Download presentation
Presentation is loading. Please wait.
Published byNicholas Sullivan Modified over 9 years ago
2
$10B in game software per year worldwide 145M active gamers in US alone Over 50% of all current ‘apps’ are games Windows is now spanning an even broader range of devices
3
Windows 8 has everything you need to write and ship a game to millions of customers
5
Typical Game Components Cut Scenes Your Killer Game Game Input Graphics Audio 3-D Streaming Touch Activatio n Sound FX User ID Connected Services Local Services 2-D, Text Game Controlle rs Sensors Music Distributi on Roaming UI Controls Effects Storage Search & Settings … Compiler s Debugger s Asset Processo rs Tools
6
Graphics
7
Games require smooth interaction -> fast graphics DirectX gives you control of the low-level hardware
8
3D Rendering Direct3D 11 is fully supported in Metro style apps Choice of the latest AAA games All Windows 8 systems support Direct3D The most direct graphics API available in Windows 8 Separate talk available on Direct3D Hardware feature levels’ range from DirectX9 to DirectX11 ‘Session on scaling visual quality across devices
9
2D Rendering and Text Many popular games use 2-D rendering Even 3-D games have “HUD Art”: score, health bar, etc. Direct2D is the rendering API for 2-D graphics Drawing vector graphics, bitmaps, image effects, and text Use DirectWrite for world-ready text layout and formatting Works seamlessly with Direct3D All Direct3D samples use Direct2D for HUD elements
10
Input
11
Touch PointerPoint API supports touch, + mouse, and stylus Sensors Sensor APIs return data from Gyro, Accelerometer, and Compass ‘Sensor Fusion’ returns orientation state computed from all three Game Controllers XInput API supports Xbox game controllers
12
Audio and Video
13
Audio XAudio2 Optimized for low-latency playback of sound effects Performs efficient mixing of multiple simultaneous effects Media Foundation Simplifies streaming audio such as background music, Can access songs from music library via a contract
14
Cut Scenes Media Foundation Simplifies streaming video playback Supports a variety of media formats Video is integrated with Direct3D11 for optimal performance See talk on Game Audio and Media
15
Initialization Allocate resources Load state, load media assets Main Loop: Poll input -local controls and network input Update state -AI, physics, collisions, animations, etc. Render -generate the graphics for the new state Present -present the resulting image on the display Update Audio
16
using namespace Windows::ApplicationModel; using namespace Windows::ApplicationModel::Core; auto dispatcher = m_window->Dispatcher; m_window->Activate(); while( true )// Main app loop { dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); updateAnimatedState();// update app logic, animations, etc. m_renderer->Render();// render scene to an image m_renderer->Present();// present the image on the display } // syncs with display refresh
17
Local Windows Services
18
A Good Game is a Good Metro style app Activation Splash Screen Loading state Suspend/resume Saving State Screen Layouts Tiles and Notifications App Bar Settings Menu Sharing
19
Included in your.appx package Gets displayed by OS before app launch Covers time spent activating app App should provide additional cover if it can’t run immediately No synchronous loading more than 5 sec Ideal user experience is less than ½ second
20
1. Synchronous load on app start (e.g. under OS splash screen) This can hit the timer, and is not an ideal user experience 2. Set up a loading screen and load behind that Delivers user feedback via progress bar 3. Stream asynchronously to pre-fetch data on demand Async I/O routines help with this 4. Procedurally generate content
21
User Launche s App
22
Suspend is triggered when app is no longer visible Time window of no more than 5 seconds Well-behaved apps should be much faster Game should stop rendering, save state, and free temp memory Avoid Termination App will be terminated if there is memory pressure App with largest memory usage is the first to get cut Games often are larger memory users, so free as many resources as possible on suspend (free scratch buffers, etc.)
24
1. Level-based: Save state at end of level, or at each checkpoint Issue: Player will have to replay that level if app gets terminated 2. Save recent state on Suspending event Player can continue in the middle of a level, even after a terminate Need to be quick (5s limit) 3. Save state opportunistically Levels, checkpoints, pauses, major events, etc. Async file routines help here App Storage APIs [891] Using Files is the presentation on these
25
Apps can select preferred initial orientation And can elect not to rotate Apps can rotate their own rendering based on sensors Landscap e Portrait
26
Apps will get resize events for these They only occur in landscape orientation Real-time games can just pause when snapped Put up status info, etc.
27
Good place to show the status What level you are on Number of friends playing Time until raid starts
28
Notifications Notifications = instant news When someone beats your high score When a Friend gets an achievement Notifications must be minimal Only when user has enabled one Check out talk on tiles and notifications
29
Standard item on ‘Charms Bar’ Activated by swipe-in from right Users will know to look here for In-game options (difficulty) Input control settings/options Try not to use for: Graphics quality settings System features
30
This is an ideal mechanism for sending In-game screenshots Brag clips These can go into the user’s libraries or to online apps via the share contract With a custom version, app can remove text, etc.
31
Runtime networking e.g. for multiplayer games Co-operative, or PVP API: WinRT Sockets, WebSockets Simplified syntax, transparent NAT traversal See talk [580] Xbox LIVE multiplayer APIs See talk [756] Building Xbox LIVE Games for Windows 8
32
Connected Services
33
Windows Live Live ID, SkyDrive, Windows 8 roaming state service Windows Store See store talk [121] Xbox LIVE for Windows See talk [756] Building Xbox LIVE Games for Windows 8 Azure Talk [871] Building Social Games for Windows 8 with Windows Azure
34
Roaming State Basic service is a part of Windows 8 [402] Deep Dive on Application Data Roaming [475] Create App Experiences that Span Time and Space Broader set of services available from Xbox Live Already announced
35
Tools
36
Enhanced with new game-oriented features: Updated C++ language support File->New Project templates for Direct3D and DX native C++ apps DirectX HLSL shader compilation and syntax highlighting Packaging compiled HLSL shaders into the.appx package Support for other asset types in MSBUILD and previewer Visualization, processing and packaging of Textures, meshes, shaders, and audio Debugging DirectX API calls Separate talk
37
Typical Game Components Cut Scenes Your Killer Game Game Input Graphics Audio 3-D Streaming Touch Activatio n Sound FX User ID Connected Services Local Services 2-D, Text Game Controlle rs Sensors Music Distributi on Roaming UI Controls Effects Storage Search & Settings … Compiler s Debugger s Asset Processo rs Tools
38
Windows 8 Game Platform Technologies Movies & Cut Scenes Your Killer Game Game Input Graphics Audio Direct3D DirectX Video Pointer Point Pointer Point PLM XAudio Windows Live Connected Services Local Services Direct2D XInput SensorAP I WASAPI Windows Store XBox Live TBA Media Foundatio n AppData Contracts Visual Studio Asset Viewers Asset Processor s Tools
39
Windows 8 provides all the features you need for a Metro style game Go for it!
40
FeatureSolution#Talk Sample GraphicsDirectXPLAT-766TIntroduction to DirectX for Metro style apps 3D RenderingDirect3DPLAT-751T3D Graphics in Metro Style Apps and GamesSimple3DGame Asset ProcessingVS11TOOL- 761T A lap around DirectX game development toolsResourceLoadin g 3D PerformanceDirect3D11PLAT-752TTuning GPU usage for any form factorSimple3DGame 2D, Text, ImagingDirect2DPLAT-769TAchieving high performance 2D graphics with Direct2D C++ LanguageVS11 C++TOOL- 532T Using the Windows Runtime from C++ IDE and Debugging VS11TOOL- 761T A lap around DirectX game development toolsFile->New Project TouchPointerPoin t APP-186TBuild advanced touch apps in Windows 8Simple3DTouch Accelerometer/Gyr o SensorAPIPLAT-781TUsing location & sensors in your appMarbleMaze Game InputXInputPLAT-754TFrom touch to gamepads: master player input in your Metro style game SimpleController Game Audio&Video XAudio2PLAT-755TCompelling audio and video for Metro style gamesBasicSound NetworkingWebSocket s PLAT-580TBuilding Windows runtime sockets apps Xbox ServicesXBoxLivePLAT-756TBuilding Xbox LIVE games for Windows 8 OS ServicesWindows 8AllBUILD Conference
41
DOCUMENTATION & ARTICLES Build your first Metro style game with DirectX Creating a DirectX game Developing the Metro style Marble Maze game with DirectX Creating a Metro style JavaScript Game
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.