Advanced techniques for the development of 2D Windows 8 games using Direct X and C++ Markus Jost CEO, Lead Programmer, Codebox GmbH

Slides:



Advertisements
Similar presentations
Using 2D sprite with OpenGL 2003 team Koguyue. Overview Motivation and basic concepts Advantages with using OpenGL Basic requirements of implementation.
Advertisements

CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
GlTF and rest3d Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Graphics Pipeline.
The Art and Technology Behind Bioshock’s Special Effects
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
CHAPTER 10 Alpha Blending and Fog © 2008 Cengage Learning EMEA.
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
Fast GPU Histogram Analysis for Scene Post- Processing Andy Luedke Halo Development Team Microsoft Game Studios.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
Macromedia Flash” Workshop on “ Introduction to 29-Aug to 1-Sep 2004.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Interactive Media and Game Development
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Chapter 3 Survival Techniques. Goals Discover that being an Illustrator artist is more than just knowing the tools Develop a basic understanding of the.
Modeling and Animation with 3DS MAX R 3.1 Graphics Lab. Korea Univ. Reference URL :
1 Chapter 1: Graphics Systems and Models. 2 Applications of C. G. – 1/4 Display of information Maps GIS (geographic information system) CT (computer tomography)
Unit 30 P1 – Hardware & Software Required For Use In Digital Graphics
Real-time Rendering of Dynamic Vegetation Alexander Kusternig Vienna University Of Technology.
Procedural terrain on the GPU Chalmers University of Technology Advanced computer graphics – DAT205 David Sundelius Adam Scott.
Integrating Multi-Resolution Meshes Into Games - GDC '99 Multi-Resolution Mesh in Dark Reign II March 18, 1999 *All trademarks and brands property of their.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
CSE 381 – Advanced Game Programming Basic 3D Graphics
Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer.
Geometric Objects and Transformations. Coordinate systems rial.html.
3D Objects Subject:T0934 / Multimedia Programming Foundation Session:12 Tahun:2009 Versi:1/0.
Computer Graphics Texture Mapping
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
9.3. P ARTICLE S YSTEMS Development of a particle system.
Computer Graphics Bitmaps & Sprites CO2409 Computer Graphics Week 3.
CSE 381 – Advanced Game Programming Code Setup.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Introduction to the development of 2D Windows 8 games using Direct X and C++ Markus Jost CEO, Lead Programmer, Codebox GmbH
3D Programming and DirectX API. Content Mathematics Mathematics Prepare to Write a 3D program Prepare to Write a 3D program Program Structure Program.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Computer Graphics Blending CO2409 Computer Graphics Week 14.
Havok FX Physics on NVIDIA GPUs. Copyright © NVIDIA Corporation 2004 What is Effects Physics? Physics-based effects on a massive scale 10,000s of objects.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Auran Jet Engine Keng Shih-Ling
Image-based Rendering Ref: RTRv2. 2 Introduction Sprite, billboard, overview.
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Multi-Resolution Mesh in Dark Reign II March 18, 1999 *All trademarks and brands property of.
1 Chapter 1: Graphics Systems and Models. 2 Applications of C. G. – 1/4 Display of information Maps GIS (geographic information system) CT (computer tomography)
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
Educational Application of 2D Animation One of the most common uses of 2D animation is in the adobe flash player program, where thousands of video clips.
How to Harmony Using Unity and Toon Boom Harmony at Double Stallion.
ITEC2110, Digital Media Chapter 3 Digital Image Processing 1 GGC -- ITEC Digital Media.
Image Fusion In Real-time, on a PC. Goals Interactive display of volume data in 3D –Allow more than one data set –Allow fusion of different modalities.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
Martin Kruliš by Martin Kruliš (v1.0)1.
1 Particle Systems for Games Particle System 3D MIM, hyeon.
1 Chapter 1: Introduction to Graphics. 2 What is computer graphics.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Textures, Sprites, and Fonts
Computer Graphics Imaging
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Bones Skeletal Unity-2D How & When
Deferred Lighting.
The Graphics Rendering Pipeline
CSE 381 – Advanced Game Programming Terrain
Computer Animation Texture Mapping.
Chapter III Modeling.
Chapter I Introduction
UMBC Graphics for Games
Computer Graphics Introduction to Shaders
Game Programming Algorithms and Techniques
Development of a particle system
Unity Game Development
Week 11 - Monday CS361.
Presentation transcript:

Advanced techniques for the development of 2D Windows 8 games using Direct X and C++ Markus Jost CEO, Lead Programmer, Codebox GmbH

Agenda

Cross-Device UI Design Chapter 1/4

Illustrating design thoughts by sample

Performance tuning Chapter 2/4

Texture Atlases © Gango Games <!--Format: n => name of the sprite x => sprite x pos in texture y => sprite y pos in texture w => sprite width (may be trimmed) h => sprite height (may be trimmed) oX => sprite's x-corner offset (only available if trimmed) oY => sprite's y-corner offset (only available if trimmed) oW => sprite's original width (only available if trimmed) oH => sprite's original height (only available if trimmed) r => 'y' only set if sprite is rotated -->

Build-time processing media Pipeline Direct3D 11:

SpriteBatch Sample:

Sample optimization optimization

Advanced Techniques Chapter 3/4

Sprite-Level1 x:-150 y:-100 angle: 0 Sprite-Level1 x:100 y:-60 angle: 15

SpriteSheet Animation Create animation sequences from an Atlas  Pros:  High level of detail  Easy to implement  Cons:  Very High Memory use  Low FPS resolution  Hand drawn frames take time

Bone Animations Create animations using a tool (e.g. Flash) combining body parts  Pros:  Way less memory consumption  Allows many many animations to reuse same texture parts  Runs at max FPS  Artists are used to using Flash  Fast creation  Cons:  Low level of details  Restrictions in design  More work to implement

3D Animations Use 3D Animations made with 3DSMax or any other 3D Animation Tool  Pros:  Smooth Animations  High Level of Details  Depending on LOD, fast production  Cons:  Doesn’t mix well with 2D  GPU intense  Also Memory intense due to Animation data

 Used for example for smoke, fire, dust, snow, rain etc.  Lots of tiny textures that face the camera  Each particle has its own state  Position  Rotation  Scale  Color  1 Texture…  Using PointSprites, particles have only 1 vertex  Usually alpha blended -> performance  Avoid filling Particle Sytsems  Supported by most GPUs

Sample

Implementation S s = V h * S i * sqrt(1/(A + B * D e + C *( D e 2 ))) V h : Viewport height S i : Initial point size D e 2 : The Distance from eye to position A, B, C : User defined values float fPointSize = 1.0f, fPointScaleB = 1.0f; m_d3dDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, true); //create vertices? m_d3dDevice->SetRenderState(D3DRS_POINTSCALEENABLE, true); //use scale function? m_d3dDevice->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&fPointSize)); m_d3dDevice->SetRenderState(D3DRS_POINTSCALE_B, *((DWORD*)&fPointScaleB)); m_d3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true); m_d3dDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_ONE); m_d3dDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_ONE); #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ | D3DFVF_PSIZE | D3DFVF_DIFFUSE) struct D3DVERTEX { float fX, fY, fZ, fSize; DWORD dwColor; }; D3DXCreateTextureFromFile(m_d3dDevice,"texture.png",&pTex); m_d3dDevice->SetTexture(0,pTex); m_d3dDevice->SetStreamSource(0,pVB,0,sizeof(D3DVERTEX)); m_d3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, numPoints);

Box2D

Questions? Chapter 4/4