Game Programming Gems 3

Similar documents
Game Programming Gems 3

Engineering Real- Time Applications with Wild Magic

Advanced 3D Game Programming with DirectX* 10.0

LOD and Occlusion Christian Miller CS Fall 2011

Contents. Part I Game Engine Design 1. Introduction. Contributor Biographies. About the Editor

#53011 HIGHPOWER NMC MATCH 1/1/16 NRA

Real-Time Rendering. Tomas Möller Eric Haines. A K Peters Natick, Massachusetts

CS GAME PROGRAMMING Question bank

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

GPU Pro4. Advanced Rendering Techniques. Edited by Wolfgang Engel. fj\ CRC Press \C*^ J Taylor & Francis Croup

Course Reader for CSE Computer Graphics Autumn 2007 Instructor: Zoran Popović

Game Programming for the PC and XBox

Graphics Shaders. Theory and Practice. Second Edition. Mike Bailey. Steve Cunningham. CRC Press. Taylor&FnincIs Croup tootutor London New York

CS248. Game Mechanics

A model to blend renderings

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

Z-Buffer hold pixel's distance from camera. Z buffer

Rendering Grass with Instancing in DirectX* 10

GAME PROGRAMMING GEMS 8

Self-Organization in Sensor and Actor Networks

SHADERX 7 : ADVANCED RENDERING TECHNIQUES

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO F ^ k.^

etcalf Metcalf Miles Results 30/38 Beginner overall Chief of Timing & Scoring Race Director Licensed to: Sierra OT

Real-Time Rendering of a Scene With Many Pedestrians

Vertex Shaders for Geometry Compression

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Why modern versions of OpenGL should be used Some useful API commands and extensions

Computer Graphics: Programming, Problem Solving, and Visual Communication

Particle systems, collision detection, and ray tracing. Computer Graphics CSE 167 Lecture 17

Voxels. Tech Team - Johnny Mercado, Michael Matonis, Glen Giffey, John Jackson

The Application Stage. The Game Loop, Resource Management and Renderer Design

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Real-Time Non- Photorealistic Rendering

Time-sliced pathfinding on arbitrary polygon surfaces

NVIDIA Case Studies:

Pete Yarbro 2-MA 3-FTR st FTR Rick Frost 4-SS 3-FTR

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

ENGINEERING PROBLEM SOLVING WITH C++

Motivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline

Final Competition Rankings for the GGSM - MMT-14 held at the Western Montana Fish & Game Association in Missoula, MT Match Date: 6/28/14

Course Recap + 3D Graphics on Mobile GPUs

Lecture 21 of 41. Animation Basics Lab 4: Modeling & Rigging in Maya

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

November 2, 2004 Joint General and Special Elections Travis County November 02, 2004 Official Results Total Cumulative Report

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

Real-Time Reyes Programmable Pipelines and Research Challenges

LECTURE 2: VR SYSTEMS AND VIRTUAL WORLDS

GPU-Based Visualization of AMR and N-Body Dark Matter Simulation Data. Ralf Kähler (KIPAC/SLAC)

ACCELERATING ROUTE PLANNING AND COLLISION DETECTION FOR COMPUTER GENERATED FORCES USING GPUS

Programming Graphics Hardware. GPU Applications. Randy Fernando, Cyril Zeller

Abstract. Introduction. Kevin Todisco

Programming Game Engines ITP 485 (4 Units)

PhoneBook (Sorting) You will be modifying your PhoneBook class to sort by different fields in a contact.

CHAPTER 1 Graphics Systems and Models 3

Art Based Rendering of Fur by Instancing Geometry

Whiz-Bang Graphics and Media Performance for Java Platform, Micro Edition (JavaME)

GPU Pro 3. Advanced Rendering Techniques. Edited by Wolfgang Engel. CRC Press. ' Taylor &. Francis Group Boca Raton London New York

Modern C++ Design. Generic Programming and Design Patterns Applied. Andrei Alexandrescu. .~Addison-Wesley

Modern C++ Design. Generic Programming and Design Patterns Applied. Andrei Alexandrescu. AAddison-Wesley

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Drawing a Crowd. David Gosselin Pedro V. Sander Jason L. Mitchell. 3D Application Research Group ATI Research

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Division of Information Technology

Dynamic Resolution Rendering

TSBK03 Screen-Space Ambient Occlusion

Design of a Programmable Vertex Processing Unit for Mobile Platforms

Deformable Snow Rendering in Batman : Arkham Origins Colin Barré-Brisebois (Lead Rendering Programmer)

What is visualization? Why is it important?

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Library Pathfinder. HOLY ANGEL UNIVERSITY LIBRARY

A Reconfigurable Architecture for Load-Balanced Rendering

Choosing a Search Space Representation

Images from 3D Creative Magazine. 3D Modelling Systems

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Northern Kettles Fall Epic

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Craig Woolley Chief Information Officer (97 including 7 Vacant)

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

3D Representation and Solid Modeling

Open Game Engine Exchange Specification

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Design of a Programmable Vertex Processing Unit for Mobile Platforms

Ray Tracing CSCI 4239/5239 Advanced Computer Graphics Spring 2018

OpenGL. Shading Language. Third Edition

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

Interactive Stable Ray Tracing

What is visualization? Why is it important?

SYSTEMS PROGRAMMING. Srimanta Pal. Associate Professor Indian Statistical Institute Kolkata OXFORD UNIVERSITY PRESS

Texture Mapping. Reading. Implementing texture mapping. Texture mapping. Daniel Leventhal Adapted from Brian Curless CSE 457 Autumn 2011.

Applications of Explicit Early-Z Culling

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Transcription:

Game Programming Gems 3 Edited by Dante Treglia CHARLES R I V E R M E D I A CHARLES RIVER MEDIA, INC. Hingham, Massachusetts

Contents Foreword... xi Preface....... xv Acknowledgments About the Cover Image.. Contributor Bios xix. xxi xxiii SECTION 1 GENERAL PROGRAMMING 1 Introduction. 3 Kim Pallister 1.1 Scheduling Game Events 5 Michael Harvey and Carl Marshall 1.2 An Object-Composition Game Framework 15 Scott Patterson 1.3 Finding Redeeming Value in C-Style Macros 26 Steve Rabin 1.4 Platform-Independent, Function-Binding Code Generator 38 Allen Pouratian 1.5 Handle-Based Smart Pointers 44 Brian Hawkins 1.6 Custom STL Allocators 49 Pete Isensee 1.7 Save Me Now! 59 Martin Brownlow 1.8 Autolists Design Pattern.64 Ben Board v

vi Contents 1.9 Floating-Point Exception Handling 69 Soren Hannibal 1.10 Programming a Game Design-Compliant Engine Using UML 73 Thomas Demachy 1.11 Using Lex and Yacc To Parse Custom Data Files 83 Paul Kelly 1.12 Developing Games for a World Market 92 Aaron Nicholls 1.13 Real-Time Input and Ul in 3D Games 109 Greg Seegert 1.14 Natural Selection: The Evolution of Pie Menus, 117 Don Hopkins 1.15 Lightweight, Policy-Based Logging 129 Brian Hawkins 1.16 Journaling Services 136 Eric Robert 1.17 Real-Time Hierarchical Profiling 146 Greg Hjelstrom and Byon Garrabrant SECTION 2 MATHEMATICS.153 Introduction 155 John Byrd 2.1 Fast Base-2 Functions for Logarithms and Random Number Generation 157 James McNeill 2.2 Using Vector Fractions for Exact Geometry 160 Thomas Young 2.3 More Approximations to Trigonometric Functions 170 Robin Green 2.4 Quaternion Compression 187 Mark Zarb-Adami 2.5 Constrained Inverse Kinematics 192 Jason Weber

Contents vii 2.6 Cellular Automata for Physical Modeling 200 Tom Forsyth 2.7 Coping with Friction in Dynamic Simulations 215 Miguel Gomez SECTION 3 ARTIFICIAL INTELLIGENCE 227 Introduction 229 Steven Woodcock 3.1 Optimized Machine Learning with GoCap 231 Thor Alexander 3.2 Area Navigation: Expanding the Path-Finding Paradigm. 240 Ben Board and Mike Ducker 3.3 Function Pointer-Based, Embedded Finite-State Machines 256 Charles Farris 3.4 Terrain Analysis in an RTS The Hidden Giant 268 Daniel Higgins 3.5 An Extensible Trigger System for Al Agents, Objects, and Quests. 285 Steve Rabin 3.6 Tactical Path-Finding with A* 294 William van der Sterren 3.7 A Fast Approach to Navigation Meshes 307 Stephen White and Christopher Christensen 3.8 Choosing a Relationship Between Path-Finding and Collision 321 Thomas Young SECTION 4 GRAPHICS 333 Introduction 335 Jeff Lander 4.1 T-Junction Elimination and Retriangulation 338 Eric Lengyel 4.2 Fast Heightfield Normal Calculation 344 Jason Shankel

viii - Contents 4.3 Fast Patch Normals 349 Martin Broumlow 4.4 Fast and Simple Occlusion Culling 353 Wagner T. Correa, James T. Klosowski, and Cldudio T Silva 4.5 Triangle Strip Creation, Optimizations, and Rendering 359 Carl S. Marshall 4.6 Computing Optimized Shadow Volumes for Complex Data Sets... 367 Alex Vlachos and Drew Card 4.7 Subdivision Surfaces for Character Animation 372 William Leeson 4.8 Improved Deformation of Bones 384 Jason Weber 4.9 A Framework for Realistic Character Locomotion 394 Thomas Young 4.10 A Programmable Vertex Shader Compiler 404 Adam Lake 4.11 Billboard Beams 413 Brian Hawkins 4.12 3D Tricks for Isometric Engines 417 Greg Snook 4.13 Curvature Simulation Using Normal Maps 424 Oscar Blasco 4.14 Methods for Dynamic, Photorealistic Terrain Lighting 433 Naty Hojfman and Kenny Mitchell 4.15 Cube Map Lighting Techniques. 444 Kenneth L. Hurley 4.16 Procedural Texturing. 452 Mike Milliger 4.17 Unique Textures 459 Tom Forsyth 4.18 Textures as Lookup Tables for Per-Pixel Lighting Computations... 467 Alex Vlachos, John Isidoro, and Chris Oat 4.19 Rendering with Handcrafted Shading Models 477 Jan Kautz

Contents ix SECTION 5 NETWORK AND MULTIPLAYER 485 Introduction 487 Andrew Kirmse 5.1 Minimizing Latency in Real-Time Strategy Games 488 Jim Greer and Zachary Booth Simpson 5.2 Real-Time Strategy Network Protocol 496 Jan Svarovsky 5.3 A Flexible Simulation Architecture for Massively Multiplayer Games 506 Thor Alexander 5.4 Scaling Multiplayer Servers 520 Justin Randall 5.5 Template-Based Object Serialization 534 Jason Beardsley 5.6 Secure Sockets. 546 Pete Isensee 5.7 A Network Monitoring and Simulation Tool 557 Andrew Kirmse 5.8 Creating Multiplayer Games with DirectPlay 3.1 561 Gabriel Rohweder 5.9 Wireless Gaming Using the Java Micro Edition 573 David Fox SECTION 6 AUDIO 583 Introduction 585 Scott Patterson 6.1 Audio Compression with Ogg Vorbis 537 Jack Moffitt 6.2 Creating a Compelling 3D Audio Environment 595 Garin Hiebert 6.3 Obstruction Using Axis-Aligned Bounding Boxes 600 Carlo Vogelsang

x Contents 6.4 Using the Biquad Resonant Filter 606 PhilBurk 6.5 Linear Predictive Coding for Voice Compression and Effects 613 Eddie Edwards 6.6 The Stochastic Synthesis of Complex Sounds 622 PhilBurk 6.7 Real-Time Modular Audio Processing for Games 630 Frank Luchs Appendix: About the CD-ROM 639