Game developer with C++/Direct3D 9 codebase Most of this content will be in C++ Lots of it applies to Windows phone … Who you are:

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

Välkommen till Sommarkollo Introduce XNA Game Studio Express Make A Game!
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
CSE 380 – Computer Game Programming Audio Engineering.
Creating Games For Windows, Xbox 360, and Windows Phone 7 Ryan Plemons
CHAPTER 16 Audio © 2008 Cengage Learning EMEA. LEARNING OBJECTIVES In this chapter you will learn about: – –The fundamentals of sound – –DirectX Audio.
Survey of Graphics and Games. Outline Overview of computer graphics – Coursework – Research Programming using game engines Computer game and animation.
Tools for Investigating Graphics System Performance
Status – Week 259 Victor Moya. Summary OpenGL Traces. OpenGL Traces. DirectX Traces. DirectX Traces. Proxy CPU. Proxy CPU. Command Processor. Command.
Many-Core Programming with GRAMPS Jeremy Sugerman Kayvon Fatahalian Solomon Boulos Kurt Akeley Pat Hanrahan.
Final Presentation Spring 2003 Project ID: D0822 Project Name: WinCE integrating BT media share application Supervisor: Evgeny Rivkin Performed by: Maya.
AGD: 5. Game Arch.1 Objective o to discuss some of the main game architecture elements, rendering, and the game loop Animation and Games Development.
Gearbox Software PRODUCTION PIPELINE – JOBS TITLES – JOB DESCRIPTIONS.
There has never been a better time to build a game that targets PC, tablets, phone and Xbox!
You can use 3D graphics to enhance and differentiate your Metro style app.
Computer Graphics Introducing DirectX
High Performance in Broad Reach Games Chas. Boyd
LastLeaf Sample PPT SMARTEST WAY TO CRAFT PRESENTATIONS.
How to Create Your First
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
MVC pattern and implementation in java
Integrate your game with Windows platform Vladimir Kolesnikov Technical Evangelist
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
$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.
Broad set of multitasking features Balances user experience with phone health Familiar.NET programming model.
Software GCSE COMPUTING.
Silverlight Hitesh Trivedi Computer Science B.Tech A-Sec J.I.E.T.
11.10 Human Computer Interface www. ICT-Teacher.com.
Tennis for Two, 1958, by William Higinbotham, Brookhaven National Lab CSE 380 – Computer Game Programming Graphics Device Management.
4/23/2017 4:23 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
2 Philosophy Customer Design Experience Platform.
Developing the Game User Interface (UI) Lesson 5.
1 ETC. 2 Sounds FX Sounds FX –WAV audio files –Load into memory and play it »Load »Play »Stop »Pause –2D or 3D »3D should be integrated into scene management.
Next-Generation Graphics APIs: Similarities and Differences Tim Foley NVIDIA Corporation
Syzygy Design overview Distributed Scene Graph Master/slave application framework I/O Device Integration using Syzygy Scaling down: simulators and other.
Class 02 – 03 Feb 2014 Setup Where do we begin? Know your content Discovering your target user.
CS 480/680 Intro Dr. Frederick C Harris, Jr. Fall 2014.
Maths & Technologies for Games DirectX 11 – New Features Tessellation & Displacement Mapping CO3303 Week 19.
Xbox MB system memory IBM 3-way symmetric core processor ATI GPU with embedded EDRAM 12x DVD Optional Hard disk.
1 Contents  Audio  Sprite  Input devices  Game production milestones  Course summary.
© Copyright Khronos Group, Page 1 OpenGL ES SIGGRAPH 2006 Neil Trevett Vice President Embedded Content, NVIDIA President, Khronos.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Windows 8 A touch screen computer on a desktop. Windows Metro.
GAM666 – Introduction To Game Programming ● Programmer's perspective of Game Industry ● Introduction to Windows Programming ● 2D animation using DirectX.
Introduction to Game Programming Pertemuan 11 Matakuliah: T0944-Game Design and Programming Tahun: 2010.
Created for Pharr South Continuing Education Presented by Henk & Linda Sluis 1.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
Building Windows Phone 7 Games and Applications Yes, yes! “Games and Applications” and not “Applications and Games” Content is under NDA – please do no.
Our Graphics Environment Landscape Rendering. Hardware  CPU  Modern CPUs are multicore processors  User programs can run at the same time as other.
DISCOVERING COMPUTERS 2018 Digital Technology, Data, and Devices
What is DirectX? DirectX is built by Microsoft as a collection of API’s (Application Programming Interfaces) for the purpose of multimedia processing.
Virtual Roundtable Discussion
5/2/2018 1:53 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS.
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
Build /24/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Build /13/2018 2:24 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
A lap around DirectX game development tools
Programming HCI Yingcai Xiao Yingcai Xiao.
Myth Busting: Hosted Web Apps
OPERATING SYSTEMS.
Windows Phone multitasking
What’s new for Silverlight & XNA developers in Windows Phone Mango
Build /23/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Desktop Window Manager
Debugging Tools Tim Purcell NVIDIA.
02 | What DirectX Can Do and Creating the Main Game Loop
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Computer Graphics Introducing DirectX
Presentation transcript:

Game developer with C++/Direct3D 9 codebase Most of this content will be in C++ Lots of it applies to Windows phone … Who you are:

100M strong and growing Touch devices = new eyeball minutes and revenue Awesome new platform features and performance Trusted apps with free distribution, updates, and optional billing service Skills and technologies used to create desktop games remain hugely valuable Why bring your game to Windows Store?

Estimated Porting Costs Low Art assets Media assets Gameplay Medium Graphics & Audio Input model Packaging/Revenue Gameplay

Updating Direct3D 9 to Direct3D 11

One API for PC graphics hardware, phone, XBox Broad OS availability New features, enhanced performance Cleaner, more streamlined programming interfaces Benefits from future enhancements

Formalized fetch from VB/IB as Input Assembler Formalized stencil/z-test and alpha- blend as Output Merger Eliminates legacy fixed-function Vertex Shader Input Assembler Rasterization Vertex Buffer Texture Color Memory Geometry Shader Pixel Shader Output Merger Index Buffer Depth/Stencil Texture New stages: Geometry Shader, Tessellation Hull Shader Tessellator Domain Shader

API redesigned to more closely reflect underlying hardware Resources now two logical pieces Direct3D 11 Resource contains actual bits View controls interpretation of those bits and binding to pipeline stages Multiple views can reference the same resource GPU and Video Memory virtualized No more “LOST DEVICE” condition Multiple Direct3D applications can now properly multitask and share the GPU Separation of low-level tasks and those of the 3D runtime (DXGI)

IDirect3DIndexBuffer9 IDirect3DVertexBuffer9 IDirect3DBaseTexture9 IDirect3DTexture9 IDirect3DCubeTexture9 IDirect3DVolumeTexture9 IDirect3DVertexDeclaration 9 ID3D11Buffer ID3D11Texture1D ID3D11Texture2D ID3D11Texture3D ID3D11InputLayout

IDirect3D9 IDirect3DDevice9 ::Present D3DSWAPEFFECT_DISCARD D3DSWAPEFFECT_COPY D3DSWAPEFFECT_FLIP D3DSWAPEFFECT_FLIPEX IDXGIFactory, IDXGIAdapter, IDXGIDevice IDXGISwapChain ::Present DXGI_SWAP_EFFECT_DISCARD DXGI_SWAP_EFFECT_SEQUENTIAL with 1 buffer DXGI_SWAP_EFFECT_SEQUENTIAL with >=2 buffers DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL >=2 buffers

ID3D11Device Each graphics application must create at least one device Create* methods allocate/free all API objects/resources Methods are multi-thread safe ID3DContext Object created upon device creation Used to tell device to perform commands/operations Contexts must be called on a single thread at a time But multi-threaded rendering is possible

Each GPU reports its feature level based on capabilities Feature levels provide guaranteed feature set Vast improvement “caps bits” tangle Feature level numbers correspond to API features supported by hardware Each feature level is a superset of the feature level before it Feature levels do not imply performance On device create, app provides a list of supported feature levels Runtime will return the highest level the user’s hardware can handle Windows RT requires support for FL9.1 Port your existing code, then add optional enhanced content Feature level == GPU Generation 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 };

2D and Audio

If you do your 2D using 3D, consider porting to Direct2D No performance hit Excellent quality options Integrated text and imaging Supported by Microsoft XAML is the replacement for MFC, etc. Vital if you have lots of controls XAML includes its own input model vs CoreWindow Variety of ways to integrate with DirectX: SwapchainPanel, SurfaceImageSource See XAML presentation 2-D Graphics, Text, and UI

Game Audio Overview XAudio2 Low-level access to audio hardware Used directly for special effects in PCM, ADPCM Media Foundation Decodes many audio formats into buffers Used for background music Sample available: Marble Maze Third party audio frameworks also available Server Browser

Using XAudio2 Server Browser // Create the XAudio2 engine and mastering voice on the default audio device XAudio2Create(&m_audioEngine); m_audioEngine->CreateMasteringVoice(&m_masteringVoice); // Load all audio data for the sound effect into a single in-memory buffer MediaLoader soundFile(ref new Platform::String(SOUND_FILE)); m_soundEffectBuffer = soundFile.ReadAll(); // Create a single source voice for a sound effect m_audioEngine->CreateSourceVoice(&m_sourceVoice, &(soundFile.GetOutputWaveFormatEx())); // Trigger sound effect: queue in-memory buffer for playback and start the voice XAUDIO2_BUFFER buf = {0}; buf.AudioBytes = m_soundEffectBuffer.size(); buf.pAudioData = &m_soundEffectBuffer[0]; buf.Flags = XAUDIO2_END_OF_STREAM; m_sourceVoice->SubmitSourceBuffer(&buf); m_sourceVoice->Start();

CoreWindow::KeyDown CoreWindow::PointerPressed Use these to get back up and running. WndProc  Events

Triggers event handlers for queued events. PeekMessage  ProcessAllIfPresent Returns immediately if queue is empty. GetMessage  ProcessOneAndAllPending Waits if queue is empty (use this to save power). ProcessUntilQuit : yield the main thread until exit. Event handlers continue to fire. Message pump  Dispatcher::ProcessEvents

DEMO: Using CoreWindow t:

CoreWindow::Pointer[Pressed/Moved/Released] Same event for touch, mouse, stylus. Query for type with PointerDeviceType. Some device-specific events. Mouse wheel. Mouse moved (use for mouse-look controls). Supporting touch input: PointerPoint

Mouse-look controls Games need free mouse movement to drive cameras. Predominantly first-person shooters. Mouse API returns incremental values since last frame. Hide the cursor to lock mouse to the window. Samples: DirectX Shooting Game sample, and DirectX touch input sample.

Implementing touch-look Use virtual thumb-sticks. Use DPI appropriately for a consistent experience. Or just make positioning / sensitivity configurable. Several approaches to positioning. Fixed positioning. Relative to start position. Follow at edges.

Game controller support Xinput is the API – now in the box! Supports XBOX 360 controller. Query-based (not events). Side-effect: doesn’t reset system inactivity timer. Use DisplayRequest::RequestActive to manually trigger “active” state. Sample: ControllerSketch

Allow gamers to use the input devices they want. Don’t forget to clamp total input. Otherwise WASD+Gamepad = 2x speed. Allow seamless transitions. Don’t require going to settings menu.

Active updates for start screen tiles. XML-based content format. Local: programmatic / timer based. Live: use Windows Notification Server (WNS). Use this for less urgent updates. Several standard formats in tile schema. Including simply “TileWideImage” for ultimate flexibility. See also: tile badges # unread messages, etc.

Similar model to live tiles. XML-based content format. Can be pushed from WNS. Use this to provide urgent notifications. Can be disabled by users.

Resources