Showing posts with label Game Programming. Show all posts
Showing posts with label Game Programming. Show all posts

Thursday, November 3, 2011

A Course in Game Theory -- Solution Manual







Contents
Preface ix
2 Nash Equilibrium 1
Exercise 18.2 (First price auction) 1
Exercise 18.3 (Second price auction) 1
Exercise 18.5 (War of attrition) 2
Exercise 19.1 (Location game) 2
Exercise 20.2 (Necessity of conditions in Kakutani’s theorem) 3
Exercise 20.4 (Symmetric games) 3
Exercise 24.1 (Increasing payoffs in strictly competitive game) 3
Exercise 27.2 (BoS with imperfect information) 4
Exercise 28.1 (Exchange game) 4
Exercise 28.2 (More information may hurt) 4
3 Mixed, Correlated, and Evolutionary Equilibrium 7
Exercise 35.1 (Guess the average) 7
Exercise 35.2 (Investment race) 7
Exercise 36.1 (Guessing right) 8
Exercise 36.2 (Air strike) 8
Exercise 36.3 (Technical result on convex sets) 9
Exercise 42.1 (Examples of Harsanyi’s purification) 9
Exercise 48.1 (Example of correlated equilibrium) 10
Exercise 51.1 (Existence of ESS in 2 × 2 game) 10
4 Rationalizability and Iterated Elimination of Dominated Actions 11
Exercise 56.3 (Example of rationalizable actions) 11
Exercise 56.4 (Cournot duopoly) 11
Exercise 56.5 (Guess the average) 11
Exercise 57.1 (Modified rationalizability in location game) 11
Exercise 63.1 (Iterated elimination in location game) 12
Exercise 63.2 (Dominance solvability) 12
Exercise 64.1 (Announcing numbers) 12
Exercise 64.2 (Non-weakly dominated action as best response) 12
5 Knowledge and Equilibrium 13vi Contents
Exercise 69.1 (Example of information function) 13
Exercise 69.2 (Remembering numbers) 13
Exercise 71.1 (Information functions and knowledge functions) 13
Exercise 71.2 (Decisions and information) 13
Exercise 76.1 (Common knowledge and different beliefs) 13
Exercise 76.2 (Common knowledge and beliefs about lotteries) 14
Exercise 81.1 (Knowledge and correlated equilibrium) 14
6 Extensive Games with Perfect Information 15
Exercise 94.2 (Extensive games with 2 × 2 strategic forms) 15
Exercise 98.1 (SPE of Stackelberg game) 15
Exercise 99.1 (Necessity of finite horizon for one deviation property) 16
Exercise 100.1 (Necessity of finiteness for Kuhn’s theorem) 16
Exercise 100.2 (SPE of games satisfying no indifference condition) 16
Exercise 101.1 (SPE and unreached subgames) 17
Exercise 101.2 (SPE and unchosen actions) 17
Exercise 101.3 (Armies) 17
Exercise 102.1 (ODP and Kuhn’s theorem with chance moves) 17
Exercise 103.1 (Three players sharing pie) 17
Exercise 103.2 (Naming numbers) 18
Exercise 103.3 (ODP and Kuhn’s theorem with simultaneous moves) 18
Exercise 108.1 ( -equilibrium of centipede game) 19
Exercise 114.1 (Variant of the game Burning money) 19
Exercise 114.2 (Variant of the game Burning money) 19
7 A Model of Bargaining 21
Exercise 123.1 (One deviation property for bargaining game) 21
Exercise 125.2 (Constant cost of bargaining) 21
Exercise 127.1 (One-sided offers) 21
Exercise 128.1 (Finite grid of possible offers) 22
Exercise 129.1 (Outside options) 23
Exercise 130.2 (Risk of breakdown) 24
Exercise 131.1 (Three-player bargaining) 24
8 Repeated Games 25
Exercise 139.1 (Discount factors that differ) 25
Exercise 143.1 (Strategies and finite machines) 25
Exercise 144.2 (Machine that guarantees v i ) 25
Exercise 145.1 (Machine for Nash folk theorem) 25
Exercise 146.1 (Example with discounting) 26
Exercise 148.1 (Long- and short-lived players) 26
Exercise 152.1 (Game that is not full dimensional) 26
Exercise 153.2 (One deviation property for discounted repeated game) 26
Exercise 157.1 (Nash folk theorem for finitely repeated games) 27
9 Complexity Considerations in Repeated Games 29
Exercise 169.1 (Unequal numbers of states in machines) 29
Exercise 173.1 (Equilibria of the Prisoner’s Dilemma) 29
Exercise 173.2 (Equilibria with introductory phases) 29Contents vii
Exercise 174.1 (Case in which constituent game is extensive game) 30
10 Implementation Theory 31
Exercise 182.1 (DSE-implementation with strict preferences) 31
Exercise 183.1 (Example of non-DSE implementable rule) 31
Exercise 185.1 (Groves mechanisms) 31
Exercise 191.1 (Implementation with two individuals) 32
11 Extensive Games with Imperfect Information 33
Exercise 203.2 (Definition of X i (h)) 33
Exercise 208.1 (One-player games and principles of equivalence) 33
Exercise 216.1 (Example of mixed and behavioral strategies) 33
Exercise 217.1 (Mixed and behavioral strategies and imperfect recall) 33
Exercise 217.2 (Splitting information sets) 34
Exercise 217.3 (Parlor game) 34
12 Sequential Equilibrium 37
Exercise 226.1 (Example of sequential equilibria) 37
Exercise 227.1 (One deviation property for sequential equilibrium) 37
Exercise 229.1 (Non-ordered information sets) 39
Exercise 234.2 (Sequential equilibrium and PBE) 39
Exercise 237.1 (Bargaining under imperfect information) 39
Exercise 238.1 (PBE is SE in Spence’s model) 40
Exercise 243.1 (PBE of chain-store game) 40
Exercise 246.2 (Pre-trial negotiation) 41
Exercise 252.2 (Trembling hand perfection and coalescing of moves) 41
Exercise 253.1 (Example of trembling hand perfection) 42
13 The Core 45
Exercise 259.3 (Core of production economy) 45
Exercise 260.2 (Market for indivisible good) 45
Exercise 260.4 (Convex games) 45
Exercise 261.1 (Simple games) 45
Exercise 261.2 (Zerosum games) 46
Exercise 261.3 (Pollute the lake) 46
Exercise 263.2 (Game with empty core) 46
Exercise 265.2 (Syndication in a market) 46
Exercise 267.2 (Existence of competitive equilibrium in market) 47
Exercise 268.1 (Core convergence in production economy) 47
Exercise 274.1 (Core and equilibria of exchange economy) 48
14 Stable Sets, the Bargaining Set, and the Shapley Value 49
Exercise 280.1 (Stable sets of simple games) 49
Exercise 280.2 (Stable set of market for indivisible good) 49
Exercise 280.3 (Stable sets of three-player games) 49
Exercise 280.4 (Dummy’s payoff in stable sets) 50
Exercise 280.5 (Generalized stable sets) 50
Exercise 283.1 (Core and bargaining set of market) 50
Exercise 289.1 (Nucleolus of production economy) 51viii Contents
Exercise 289.2 (Nucleolus of weighted majority games) 52
Exercise 294.2 (Necessity of axioms for Shapley value) 52
Exercise 295.1 (Example of core and Shapley value) 52
Exercise 295.2 (Shapley value of production economy) 53
Exercise 295.4 (Shapley value of a model of a parliament) 53
Exercise 295.5 (Shapley value of convex game) 53
Exercise 296.1 (Coalitional bargaining) 53
15 The Nash Bargaining Solution 55
Exercise 309.1 (Standard Nash axiomatization) 55
Exercise 309.2 (Efficiency vs. individual rationality) 55
Exercise 310.1 (Asymmetric Nash solution) 55
Exercise 310.2 (Kalai–Smorodinsky solution) 56
Exercise 312.2 (Exact implementation of Nash solution) 56

Another Game Programming Books

Download

Thursday, September 15, 2011

Pro Android Games






Contents at a Glance
Contents..................................................................................................................... iv
About the Author ........................................................................................................ x
About the Technical Reviewer ................................................................................... xi
Introduction .............................................................................................................. xii
■ Chapter 1: Welcome to Android Gaming.................................................................1
■ Chapter 2: Compiling Native Code in Android ......................................................27
■ Chapter 3: Building a Java Game from Scratch ...................................................55
■ Chapter 4: Java Games Continued: Fun with Polygons ........................................81
■ Chapter 5: Hybrid 3D Graphics with OpenGL and JNI.........................................117
■ Chapter 6: 3D Shooters Episode I: Wolfenstein 3D for Android ..........................161
■ Chapter 7: 3D Shooters Episode II: Doom for Android........................................221
■ Appendix: Deployment and Compilation Tips.....................................................271
■ Index: .................................................................................................................287


Another Android Books
Another Game Programming Books
Download

Saturday, July 30, 2011

Internet Game Programming with Java







Introduction
WEEK 1 At a Glance
Chapter 1 Games on the Web

The State of the Net
What the Web Has to Offer
Web-Based versus Non-Web Based Games
Non-Java Based Games
Mpath
Cyber Warrior Network
ImagiNation Network
Total Entertainment Network
Outland
Sim-Net
Java-Based Web Games
Avalon
Internet MahJong Server
iChess
Unearthed
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 2 Java Game Programming

Java and Web Games
Java Features for Games
Graphics and Animation
User Input
Sound
Networking
Media Management
Game Design
Basic Idea
Storyline
Play Modes
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 3 Object-Oriented Programming with Java

What Is OOP?
Objects
Classes
Encapsulation
Messages
Inheritance
OOP and Games
Java and Other OOP Languages
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 4 The Basics of Graphics

Graphics in Games
Game Window Size
Target Audience
Setting and Mood
Graphics Style
The GIF Image Format
Creating and Editing Graphics
Graphics Utilities
Line-Art Graphics
3-D Rendered Graphics
Scanned Photography and Video-Captured Graphics
Background Graphics and Textures
Animated Graphics
Finding Graphics
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 5 Java Graphics Techniques

The Graphics Coordinate System
The Basics of Color
The Graphics Class
Drawing Graphics Primitives
Drawing Text
Drawing Images
Tracking Images
The MediaTracker Class
Using the Media Tracker
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 6 Sprite Animation

What Is Animation?
Types of Animation
Frame-Based Animation
Cast-Based Animation
Implementing Sprite Animation
The Sprite Class
The SpriteVector Class
The Background Classes
Sample Applet: Atoms
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 7 Sim Tarantula: Creepy Crawly Sprites

Extending the Sprite Class
Designing a Directional Sprite
The DirectionalSprite Class
Designing Sim Tarantula
Sample Applet: Sim Tarantula
The Sprite Classes
The SimTarantula Class
Summary
Q&A
Workshop
Quiz
Exercises

WEEK 1 In Review
WEEK 2 At a Glance
Chapter 8 User Input in Games

Gaming and User Input
User Input Devices
The Keyboard
The Mouse
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 9 Handling User Input with Java

Event-Driven Programming
Java Input Event
awt Event Handling
Keyboard Events
Mouse Events
Sample Applet: Flying Saucer
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 10 Traveling Gecko: Blistering Desert Fun

Designing Traveling Gecko
Sprites
Game Play
Sample Applet: Traveling Gecko
The Sprite Classes
The TravelingGecko Class
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 11 The Basics of Sound

The Physics of Sound
Digital Sound Fundamentals
The AU Sound Format
Using Sound in Games
Sound Utilities
Cool Edit
Sound Exchange (SoX)
Sound Machine
Sound Hack
Creating and Editing Sounds
Recording with a Microphone
Sampling from External Sound Sources
Finding Sounds
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 12 Playing Sound with Java

Java Sound Support
The AudioClip Class
Alternatives to Using AudioClip
Sample Applet: WildAnimals
Summary
Q&A
Workshop
Quiz
Exercises
Chapter 13 Scorpion Roundup: Action By Moonlight

Designing Scorpion Roundup
Sprites
Game Play
Options
Sample Applet: Scorpion Roundup
The Sprite Classes
The ScorpionRoundup Class
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 14 Squishing Bugs in Java Games

Debugging Basics
Single-Stepping Code
Watching Variables
Using Breakpoints
Debugging Strategies
Bug Prevention
Bug Detection
Choosing a Debugger
Summary
Q&A
Workshop
Quiz
Exercises

WEEK 2 In Review
WEEK 3 At a Glance
Chapter 15 Teaching Games to Think

Artificial Intelligence Fundamentals
Types of Game AI
Roaming AI
Behavioral AI
Strategic AI
Implementing Your Own AI
AI in Commercial Games
Battlecruiser: 3000AD
Cloak, Dagger, and DNA
Destiny
Dungeon Keeper
Grand Prix II
AI Resources on the Web
World Wide Web Virtual Library
The University of Chicago AI Lab
Machine Learning in Games
Bibliography on Machine Learning in Strategic Game Playing
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 16 Connect4: Human versus Machine

Designing Connect4
How to Play the Game
The Elements of the Game
The AI Strategy
Sample Applet: Connect4
The Game Engine Classes
The Connect4 Class
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 17 The Basics of Multiplayer Gaming

The Raw appeal of Multiplayer Games
Network versus Non-Network Games
Gaming on the Internet
Types of Multiplayer Games
Turn-Based Games
Event-Based Games
Network Game Problems
Network Game Solutions
State Synchronization
Input Synchronization
A Hybrid Solution
Game Theory
Summary
Q&A
Workshop
Quiz

Chapter 18 Networking with Java

Network Basics
Addresses
Protocols
Ports
The Client/Server Paradigm
Sockets
Stream Sockets
Datagram Sockets
A Reusable Socket Class
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 19 NetConnect4: Human versus Human

Designing NetConnect4
The Server
The Client
Putting Them Together
Sample Applet: NetConnect4
Running NetConnect4
Developing NetConnect4
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 20 Optimizing Java Code for Games

What Is Code Optimization?
Maintainability
Size
Speed
Optimizing with the JDK Compiler
Costs of Common Operations
Isolating Problem Code
Optimization Techniques
Rethink Algorithms
Use Native Methods
Use Inline Methods
Replace Slow Java API Classes and Methods
Use Look-Up Tables
Eliminate Unnecessary Evaluations
Eliminate Common Subexpressions
Expand Loops
Summary
Q&A
Workshop
Quiz
Exercises

Chapter 21 Assembling a Game Development Toolkit

The Imprtance of Tools
Content Tools
Java Developer's Kit
Integrated Development Environments
Sun's Java Workshop
Symantec Café
Borland C++ 5.0 and Borland's Java Debugger
Microsoft Jakarta
Natural Intelligence's Roaster
Metrowerks CodeWarrior Gold
Silicon Graphics Cosmo Code
Java WebIDE
Programming Tools and Technologies
Liquid Motion
CodeColorizer
ActiveX
Summary
Q&A
Workshop
Quiz
Exercises


Another Java Books
Another Game Programming Books
Download

Tuesday, June 21, 2011

Designing Arcade Computer Game Graphics






Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Arcade Games and Computer Arcade Game Platforms . . . . 1
What’s an Arcade Game? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Arcade Game Sub-Genres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Maze/Chase Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Pong Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Shooters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Puzzlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Platformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
This Book and Arcade Games . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Computer Arcade Game Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Macintosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Video Game Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 2 Designing for Different Display Modes . . . . . . . . . . . . 17
A Summary of Video Hardware Standards . . . . . . . . . . . . . . . . . . . . . . . 18
Color Graphics Adapter (CGA) . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Enhanced Graphics Adapter (EGA). . . . . . . . . . . . . . . . . . . . . . . . 18
Video Graphics Adapter (VGA) . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Multicolor Graphics Array (MCGA) . . . . . . . . . . . . . . . . . . . . . . . 19
Super Video Graphics Adapter (SVGA). . . . . . . . . . . . . . . . . . . . . . 20
Display Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Screen Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Why It’s Imprtant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Screen Resolution Issues . . . . . . . . . . . . . . . . . . . . . . . . . . 24
What You Can Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Aspect Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Why It’s Imprtant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Aspect Ratio Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
What You Can Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Refresh Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Why It’s Imortant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Refresh Rate Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
What You Can Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Color Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Why It’s Imprtant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Color Capability Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
What You Can Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Gamma Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Why It’s Imprtant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Gamma Level Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
What You Can Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Choosing Display Modes to Design For . . . . . . . . . . . . . . . . . . . . . . . . 42
Screen Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Image Clarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Color Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
System Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Audience Hardware Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . 45
Programming Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Graphics Production Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Display Mode Selection Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Comprehensive Comparison of Display Mode Attributes . . . . . . . . . . . . 48
Specific Display Mode Recommendations . . . . . . . . . . . . . . . . . . . . 50
Display Mode and Arcade Game Sub-Genre Recommendations . . . . . . . . 51
Arcade Game Type Recommendation Explanations . . . . . . . . . . . . 51
Rules for Display Mode Selection. . . . . . . . . . . . . . . . . . . . . . . . . 52
Chapter 3 Image Compression and Graphic File Formats. . . . . . . . 55
Image Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Lossless Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
RLE Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Packbits Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
LZ77 Compression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
LZW Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Lossy Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Color Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
JPEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Essential Graphic File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
BMP (Bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
GIF (Graphics Interchange Format) . . . . . . . . . . . . . . . . . . . . . . . 62
IFF (Interchange File Format) . . . . . . . . . . . . . . . . . . . . . . . . . . 64
PCX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
PICT (Picture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Imprtant Graphic File Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
FLIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
JPEG (Joint Photographic Experts Group) . . . . . . . . . . . . . . . . . . . . 68
PNG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
PSD (Photoshop). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
PSP (Paint Shop Pro) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
TGA (Targa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
TIFF (Tagged Image File Format) . . . . . . . . . . . . . . . . . . . . . . . . 72
XPM (X PixMap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
File Format Suitability for Arcade Game Graphics . . . . . . . . . . . . . . . . . . . 74
File Format Compression Savings . . . . . . . . . . . . . . . . . . . . . . . . 77
Caveats for Working with Graphic File Formats . . . . . . . . . . . . . . . . . . . . 79
File Corruption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Incompatible Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Graphic File Format Recommendations . . . . . . . . . . . . . . . . . . . . . . . . 81
Graphics Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Artwork Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Operating System and Platform. . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 4 Files and File Management . . . . . . . . . . . . . . . . . . 85
File Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
DOS and Windows 3.1 File Naming Rules . . . . . . . . . . . . . . . . . . . . 86
Windows 95, 98, NT 4.0, and 2000 File Naming Rules . . . . . . . . . . . . . 87
Macintosh File Naming Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Linux File Naming Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
General File Naming Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . 88
A Sample File Naming Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Managing and Organizing Directories . . . . . . . . . . . . . . . . . . . . . . 91
Exchanging Files Across Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Disk Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Macintosh Disk Compatibility with Different Platforms. . . . . . . . . . 93
Linux Disk Compatibility with Different Platforms . . . . . . . . . . . . 94
DOS Disk Compatibility with Different Platforms . . . . . . . . . . . . . 94
Windows Disk Compatibility with Different Platforms . . . . . . . . . . 94
File Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
File Format Conversion Issues . . . . . . . . . . . . . . . . . . . . . . . 95
File Naming Across Platforms . . . . . . . . . . . . . . . . . . . . . . . 96
Compressed Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
File Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Impotance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Device Capacity and Performance . . . . . . . . . . . . . . . . . . . . . . . . 100
Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Backup Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Floppy Disk Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Zip Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
CD-R/CD-RW Drives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Internet-Based Backup Systems . . . . . . . . . . . . . . . . . . . . . . . . 104
File Backup Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A Final Word about File Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Version Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
How Version Control Can Help . . . . . . . . . . . . . . . . . . . . . . . . . 108
Go Back in Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Compare Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Preserve Content Safely . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Lock Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Implementing Version Control. . . . . . . . . . . . . . . . . . . . . . . . . . 109
A Final Word about Version Control Systems. . . . . . . . . . . . . . . . . . 110
Basic Asset Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Do You Really Need an Asset Management System? . . . . . . . . . . . . . 111
Choosing an Asset Management System . . . . . . . . . . . . . . . . . . . . 111
Database Driven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Thumbnail Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Asset Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Large Catalog Capacity. . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Multiple Image Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Low Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Chapter 5 Evaluating Graphics Creation Tools . . . . . . . . . . . . . 113
Graphics Creation Tool Categories . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Painting Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Screen Capture Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Image Viewers/Converters . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Palette Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Evaluating Graphics Tools and Essential Features . . . . . . . . . . . . . . . . . . 117
Essential Painting Program Features . . . . . . . . . . . . . . . . . . . . . . 117
Brush Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Shape Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Block Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Navigation Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Color Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Image Processing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Special Effects Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Other Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Miscellaneous Features . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Essential Screen Capture Utility Features . . . . . . . . . . . . . . . . . . . 148
Capture Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Common File Format Support . . . . . . . . . . . . . . . . . . . . . . . 149
Ease of Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Essential Image Viewer/Converter Features . . . . . . . . . . . . . . . . . . 150
Extensive Graphic File Format Support. . . . . . . . . . . . . . . . . . 151
Good Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Batch Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Image Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Special Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Essential Palette Tool Features . . . . . . . . . . . . . . . . . . . . . . . . . 153
Color Palette Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Color Palette Extraction from Bitmaps . . . . . . . . . . . . . . . . . . 153
Palette Construction from Input Files. . . . . . . . . . . . . . . . . . . 153
Common File Format Support . . . . . . . . . . . . . . . . . . . . . . . 154
Chapter 6 Essential Graphics Tools . . . . . . . . . . . . . . . . . . . 155
Criteria for My Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Interface and Ease of Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Performance and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Unique or Special Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Availability and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Gripes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Recommended DOS Painting Programs . . . . . . . . . . . . . . . . . . . . . . . . 159
Deluxe Paint IIe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
GrafX2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Improces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
NeoPaint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Other Useful DOS Painting Programs. . . . . . . . . . . . . . . . . . . . . . 176
Recommended Windows Painting Programs . . . . . . . . . . . . . . . . . . . . . 176
NeoPaint for Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Paint Shop Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Pro Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Other Useful Windows Painting Programs . . . . . . . . . . . . . . . . . . . 189
Recommended DOS Screen Capture Utilities . . . . . . . . . . . . . . . . . . . . 190
Screen Thief . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Recommended Windows Screen Capture Utilities . . . . . . . . . . . . . . . . . . 192
HyperSnapDX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
SnagIt Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Recommended DOS Image Viewers/Converters . . . . . . . . . . . . . . . . . . . 197
SEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Other Useful DOS Image Viewers/Converters . . . . . . . . . . . . . . . . . 198
Recommended Windows Image Viewers/Converters . . . . . . . . . . . . . . . . 199
IrfanView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
XNView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Other Useful Windows Image Viewers/Converters . . . . . . . . . . . . . . 203
Recommended Palette Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Opal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
PalMerge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Other Useful Graphics Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
MkExpl 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Universe 1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Chapter 7 Color and Arcade Game Graphics. . . . . . . . . . . . . . 209
Basic Color Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Color Mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Additive Color Mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Subtractive Color Mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Color Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
The Language and Meaning of Color . . . . . . . . . . . . . . . . . . . . . . . . . 214
The Cross-Cultural Meaning of Color. . . . . . . . . . . . . . . . . . . . . . 217
Color and Mood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Color Perception Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Age and Color Perception . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Gender and Color Perception . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Other Imprtant Color Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Shade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Tint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Luminance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Smoothing Objects with Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Volume, Light, and Shadow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Basic Rules of Light and Shadow . . . . . . . . . . . . . . . . . . . . . . . . 224
Accurately Representing Volume with Color . . . . . . . . . . . . . . . . . . 226
Rules for Gradient Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Transparency, Translucency, and Opacity . . . . . . . . . . . . . . . . . . . . . . . 230
Bounding Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Bounding Color Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Color and Arcade Game Design Styles . . . . . . . . . . . . . . . . . . . . . . . . 234
Cartoon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Retro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Realistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
General Rules for Using Color in Arcade Games . . . . . . . . . . . . . . . . . . . 238
Color Visibility and Usability . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Color Context and Aesthetics . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Chapter 8 All About Color Palettes . . . . . . . . . . . . . . . . . . . 243
Color Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Color Palette Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Cross-Platform Color Palette Issues . . . . . . . . . . . . . . . . . . . . . . . . . 250
System Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
DOS System Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Windows System Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Linux System Palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Macintosh System Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Java System Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Platform-Specific Palette Peculiarities . . . . . . . . . . . . . . . . . . . . . . . . 258
DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Macintosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Creating Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Planning a Color Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Game Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Game Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Game Mood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Technical Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Implementing Your Color Palette . . . . . . . . . . . . . . . . . . . . . . . . 268
Step 1—Defining the Required Color Palette Components . . . . . . . 269
Step 2—Deciding on a Color Palette Order . . . . . . . . . . . . . . . . 274
Step 3—Adding System Colors . . . . . . . . . . . . . . . . . . . . . . 274
Step 4—Selecting Your Colors. . . . . . . . . . . . . . . . . . . . . . . 275
Step 5—Defining Your Color Ranges and Gradients . . . . . . . . . . . 279
Step 6—Reserving Palette Entries for Programmed Effects . . . . . . 281
Step 7—Testing Your Color Palette . . . . . . . . . . . . . . . . . . . . 281
Step 8—Saving Your Palette . . . . . . . . . . . . . . . . . . . . . . . . 282
A Color Palette Creation Exercise. . . . . . . . . . . . . . . . . . . . . . . . 282
Tips for Creating Effective Color Palettes . . . . . . . . . . . . . . . . . . . . . . 286
Gradient Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Programmed Color Effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Transparent Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Miscellaneous Color Palette Tips . . . . . . . . . . . . . . . . . . . . . . . . 288
Color Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Palette Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Dithering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Straight Color Remapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Chapter 9 Arcade Game Animation. . . . . . . . . . . . . . . . . . . 293
What is Animation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Animation Properties and Fundamentals . . . . . . . . . . . . . . . . . . . . . . . 294
Motion Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Motion Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Key-frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Weight and Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Secondary Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Cycles and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Tempo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Sprite Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Variable Sizes and Shapes . . . . . . . . . . . . . . . . . . . . . . . . . 305
Free Range of Movement . . . . . . . . . . . . . . . . . . . . . . . . . 305
Separate from Background . . . . . . . . . . . . . . . . . . . . . . . . . 305
Grid Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Maintaining Size Consistency . . . . . . . . . . . . . . . . . . . . . . . 307
Assisting the Animation Process . . . . . . . . . . . . . . . . . . . . . 307
Optimizing Sprites for Implementation in Games . . . . . . . . . . . . 307
Optimizing Sprites for Screen Performance . . . . . . . . . . . . . . . 307
General Rules for Creating Grid Squares . . . . . . . . . . . . . . . . . . . . 310
Core Arcade Game Animation Primitives . . . . . . . . . . . . . . . . . . . . . . . 310
Major Arcade Game Animation Primitives . . . . . . . . . . . . . . . . . . . 311
The Cylindrical Primitive . . . . . . . . . . . . . . . . . . . . . . . . . 311
The Rotational Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . 314
The Disintegration Primitive . . . . . . . . . . . . . . . . . . . . . . . 315
The Color Flash Primitive . . . . . . . . . . . . . . . . . . . . . . . . . 318
The Scissors Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
The Growing Primitive. . . . . . . . . . . . . . . . . . . . . . . . . . . 322
The Shrinking Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Minor Arcade Game Animation Primitives . . . . . . . . . . . . . . . . . . . 323
The Piston Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
The Squeeze Primitive. . . . . . . . . . . . . . . . . . . . . . . . . . . 324
The Swing Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
The Slide Primitive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
The Open/Close Primitive . . . . . . . . . . . . . . . . . . . . . . . . . 327
The Bounce Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
The Stomp Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Complex Arcade Game Animation Primitives . . . . . . . . . . . . . . . . . 329
The Slinking Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
The Flying Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
The Walking Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
The Running Primitive (Humans) . . . . . . . . . . . . . . . . . . . . . 339
The Running Primitive (Animals) . . . . . . . . . . . . . . . . . . . . . 343
The Jumping Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
The Crawling Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Creating Your Animation Sequences. . . . . . . . . . . . . . . . . . . . . . . . . . 351
General Animation Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Animation Usage in Arcade Games . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Chapter 10 Fonts and Arcade Games . . . . . . . . . . . . . . . . . . 357
What are Fonts? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Font Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Serifs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Sans Serifs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Monospaced. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Proportional. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Bitmapped. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Scaleable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Font Legibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Aliased . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Anti-Aliased. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Weight. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Leading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Kerning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Common Font Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
ROM Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
ZSoft Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
GEM Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Fastgraph Fonts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Custom Game Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Borland Stroked Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
TrueType Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
System Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Platform-Specific Font Support . . . . . . . . . . . . . . . . . . . . . . . . . 374
General Rules for Using Fonts in Arcade Games . . . . . . . . . . . . . . . . . . . 375
Using Fonts in Arcade Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Game Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Body Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Arcade Game Font Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . 379
Chapter 11 Planning Arcade Game Graphics . . . . . . . . . . . . . . 385
The Design Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
The Game Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Game Back Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Game Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Game Object Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Game Functionality Overview . . . . . . . . . . . . . . . . . . . . . . . 388
The Game Action Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
The Game Action Flowchart . . . . . . . . . . . . . . . . . . . . . . . . 389
The Screen Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Screen Mock-ups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
The Graphics Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Game Creative Statement . . . . . . . . . . . . . . . . . . . . . . . . . 394
Artwork Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Target Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Estimated Object Count . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Artwork Screen Resolution and Playfield Size . . . . . . . . . . . . . . 395
Artwork Color Depth. . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Artwork File Format(s) . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Artwork File Naming Scheme . . . . . . . . . . . . . . . . . . . . . . . 397
Artwork Color Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Artwork Gamma Level. . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Artwork Object Dimensions . . . . . . . . . . . . . . . . . . . . . . . . 398
Frames per Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Object Actions and Facings . . . . . . . . . . . . . . . . . . . . . . . . 399
Game Text Font(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Miscellaneous Art Direction . . . . . . . . . . . . . . . . . . . . . . . . 400
Technical Restrictions and Stipulations . . . . . . . . . . . . . . . . . . . . . 401
The Project Schedule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
The Game Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Chapter 12 Hands-on Arcade Game Project—Fish Dish . . . . . . . . . 405
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
The Three Phases of Fish Dish’s Design . . . . . . . . . . . . . . . . . . . . . . . 407
Phase I: The Fish Dish Design Analysis. . . . . . . . . . . . . . . . . . . . . . . . 407
Differentiating Game Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Choosing a Design Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Audience and Emotional Appeal . . . . . . . . . . . . . . . . . . . . . . 415
Visual Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Difficulty of Implementation . . . . . . . . . . . . . . . . . . . . . . . . 417
Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Online Game Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
The Available Display Area . . . . . . . . . . . . . . . . . . . . . . . . 420
Artwork File Size Issues . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
The Color Palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Determining the Order of Element Creation . . . . . . . . . . . . . . . . . . 431
Phase II: The Fish Dish Design Plan . . . . . . . . . . . . . . . . . . . . . . . . . 433
The Fish Dish Game Summary . . . . . . . . . . . . . . . . . . . . . . . . . 433
Game Back Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Game Description/Game Concept . . . . . . . . . . . . . . . . . . . . . 433
Game Object Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Game Functionality Overview . . . . . . . . . . . . . . . . . . . . . . . 436
The Game Action Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
The Game Action Flowchart . . . . . . . . . . . . . . . . . . . . . . . . 437
The Screen Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
The Fish Dish Graphics Specification . . . . . . . . . . . . . . . . . . . . . . 447
Game Creative Statement . . . . . . . . . . . . . . . . . . . . . . . . . 447
Artwork Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Target Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Estimated Object Count . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Artwork Screen Resolution and Playfield Size . . . . . . . . . . . . . . 449
Artwork Color Depth. . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Artwork File Format(s) . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Artwork File Naming Scheme . . . . . . . . . . . . . . . . . . . . . . . 449
Artwork Color Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Artwork Gamma Level. . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Artwork Object Dimensions . . . . . . . . . . . . . . . . . . . . . . . . 451
Frames per Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Object Actions and Facings . . . . . . . . . . . . . . . . . . . . . . . . 453
Game Text Font(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Phase III: The Fish Dish Design Execution . . . . . . . . . . . . . . . . . . . . . . 453
Artwork Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Step-by-Step Game Object Design . . . . . . . . . . . . . . . . . . . . . . . 455
Salmon Fishdie Object Creation . . . . . . . . . . . . . . . . . . . . . . 456
Red Devil Object Creation . . . . . . . . . . . . . . . . . . . . . . . . . 461
Gold Digger Object Creation. . . . . . . . . . . . . . . . . . . . . . . . 462
Green Meanie Object Creation . . . . . . . . . . . . . . . . . . . . . . 463
Gray Shark Object Creation . . . . . . . . . . . . . . . . . . . . . . . . 465
Blue Angel Object Creation . . . . . . . . . . . . . . . . . . . . . . . . 466
Bad Tuna Object Creation . . . . . . . . . . . . . . . . . . . . . . . . . 467
Head Hunter Object Creation . . . . . . . . . . . . . . . . . . . . . . . 469
Starfish Object Creation . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Happy Clam Object Creation. . . . . . . . . . . . . . . . . . . . . . . . 471
M.C. Hammerhead Object Creation . . . . . . . . . . . . . . . . . . . . 472
Salmon Fishdie Angel Object Creation . . . . . . . . . . . . . . . . . . 473
Pause Bubble Object Creation . . . . . . . . . . . . . . . . . . . . . . . 475
Shield Bubble Object Creation. . . . . . . . . . . . . . . . . . . . . . . 476
Background Screen Creation . . . . . . . . . . . . . . . . . . . . . . . 477
Chapter 13 Miscellaneous Topics and Final Thoughts . . . . . . . . . . 479
Game Level Backgrounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Sources of Inspiration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Final Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Appendix A Artist Interviews . . . . . . . . . . . . . . . . . . . . . . . 487
Appendix B CD-ROM Contents . . . . . . . . . . . . . . . . . . . . . . 499
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

Another Game Programming Books
Download

Saturday, June 18, 2011

Game Animation with Java MIDP






Contents
1 Introduction..........................................................................................................................................................5
1.1 Purpose and Scope................................................................................................................................5
1.2 Target Audience.....................................................................................................................................5
2 Sprite Graphics.....................................................................................................................................................6
2.1 Introduction to Sprites.........................................................................................................................6
2.2 Sprite Properties ....................................................................................................................................6
2.3 Frames ......................................................................................................................................................6
2.4 Threading.................................................................................................................................................8
2.4.1 Extending the Thread Object............................................................................................8
2.4.2 Implementing the Runnable Interface .........................................................................9
2.4.3 Using Timers ...................................................................................................................... 10
2.5 Tiled Backgrounds.............................................................................................................................. 11
2.6 Double Buffering and Clipping........................................................................................................ 15
2.6.1 Double Buffering............................................................................................................... 15
2.6.2 Clipping................................................................................................................................ 15
3 An Example: Helicopter.................................................................................................................................. 17
3.1 Overview ............................................................................................................................................... 17
3.2 ExampleMidlet.java ............................................................................................................................ 18
3.3 MyCanvas.java...................................................................................................................................... 20
3.4 MyMovingObject.java......................................................................................................................... 23
3.5 MyBackground.java............................................................................................................................ 25
3.6 Helicopter.jad....................................................................................................................................... 30


Another Game Programming Books
Another J2ME Books
Download

Wednesday, March 2, 2011

Essential Mathematics for Games and Interactive Applications






Contents
Preface xix
Introduction xxiii
Chapter 1
Real-World Computer Number Representation 1
1.1 Introduction 1
1.2 Representing Real Numbers 2
1.2.1 Approximations 2
1.2.2 Precision and Error 3
1.3 Floating-Point Numbers 4
1.3.1 Review: Scientific Notation 4
1.3.2 A Restricted Scientific Notation 5
1.4 Binary “Scientific Notation” 6
1.5 IEEE 754 Floating-Point Standard 9
1.5.1 Basic Representation 9
1.5.2 Range and Precision 11
1.5.3 Arithmetic Operations 13
1.5.4 Special Values 16
1.5.5 Very Small Values 19
1.5.6 Catastrophic Cancelation 22
1.5.7 Double Precision 24
1.6 Real-World Floating-Point 25
1.6.1 Internal FPU Precision 25
1.6.2 Performance 26
1.6.3 IEEE Specification Compliance 29
1.6.4 Graphics Processing Units and Half-Precision
Floating-Point Formats 31
1.7 Code 32
1.8 Chapter Summary 33
Chapter 2
Vectors and Points 35
2.1 Introduction 35
2.2 Vectors 36
2.2.1 Geometric Vectors 36
2.2.2 Linear Combinations 39
2.2.3 Vector Representation 40
2.2.4 Basic Vector Class Implementation 42
2.2.5 Vector Length 44
2.2.6 Dot Product 47
2.2.7 Gram-Schmidt Orthogonalization 51
2.2.8 Cross Product 53
2.2.9 Triple Products 56
2.2.10 Real Vector Spaces 59
2.2.11 Basis Vectors 62
2.3 Points 63
2.3.1 Points as Geometry 64
2.3.2 Affine Spaces 66
2.3.3 Affine Combinations 68
2.3.4 Point Implementation 70
2.3.5 Polar and Spherical Coordinates 72
2.4 Lines 75
2.4.1 Definition 75
2.4.2 Parameterized Lines 76
2.4.3 Generalized Line Equation 77
2.4.4 Collinear Points 79
2.5 Planes 80
2.5.1 Parameterized Planes 80
2.5.2 Generalized Plane Equation 80
2.5.3 Coplanar Points 82
2.6 Polygons and Triangles 82
2.7 Chapter Summary 86
Chapter 3
Matrices and Linear Transformations 87
3.1 Introduction 87
3.2 Matrices 88
3.2.1 Introduction to Matrices 88
3.2.2 Simple Operations 90
3.2.3 Vector Representation 92
3.2.4 Block Matrices 92
3.2.5 Matrix Product 94
3.2.6 Identity Matrix 96
3.2.7 Performing Vector Operations with Matrices 97
3.2.8 Implementation 98
3.3 Linear Transformations 101
3.3.1 Definitions 101
3.3.2 Null Space and Range 103
3.3.3 Linear Transformations and Basis Vectors 104
3.3.4 Matrices and Linear Transformations 106
3.3.5 Combining Linear Transformations 108
3.4 Systems of Linear Equations 110
3.4.1 Definition 110
3.4.2 Solving Linear Systems 112
3.4.3 Gaussian Elimination 113
3.5 Matrix Inverse 117
3.5.1 Definition 117
3.5.2 Simple Inverses 120
3.6 Determinant 121
3.6.1 Definition 121
3.6.2 Computing the Determinant 123
3.6.3 Determinants and Elementary Row Operations 126
3.6.4 Adjoint Matrix and Inverse 128
3.7 Eigenvalues and Eigenvectors 129
3.8 Chapter Summary 130
Chapter 4
Affine Transformations 133
4.1 Introduction 133
4.2 Affine Transformations 134
4.2.1 Matrix Definition 134
4.2.2 Formal Definition 136
4.2.3 Formal Representation 138
4.3 Standard Affine Transformations 139
4.3.1 Translation 139
4.3.2 Rotation 141
4.3.3 Scaling 150
4.3.4 Reflection 151
4.3.5 Shear 154
4.3.6 Applying an Affine Transformation Around an
Arbitrary Point 156
4.3.7 Transforming Plane Normals 158
4.4 Using Affine Transformations 159
4.4.1 Manipulation of Game Objects 159
4.4.2 Matrix Decomposition 164
4.4.3 Avoiding Matrix Decomposition 166
6.3 Projective Transformation 212
6.3.1 Definition 212
6.3.2 Normalized Device Coordinates 216
6.3.3 View Frustum 216
6.3.4 Homogeneous Coordinates 220
6.3.5 Perspective Projection 221
6.3.6 Oblique Perspective 228
6.3.7 Orthographic Parallel Projection 231
6.3.8 Oblique Parallel Projection 232
6.4 Culling and Clipping 235
6.4.1 Why Cull or Clip? 235
6.4.2 Culling 238
6.4.3 General Plane Clipping 239
6.4.4 Homogeneous Clipping 244
6.5 Screen Transformation 246
6.5.1 Pixel Aspect Ratio 248
6.6 Picking 249
6.7 Management of Viewing Transformations 252
6.8 Chapter Summary 254
Chapter 7
Geometry and Programmable Shading 255
7.1 Introduction 255
7.2 Color Representation 257
7.2.1 RGB Color Model 257
7.2.2 Colors as “Vectors” 257
7.2.3 Color Range Limitation 258
7.2.4 Operations on Colors 259
7.2.5 Alpha Values 260
7.2.6 Color Storage Formats 264
7.3 Points and Vertices 266
7.3.1 Per-Vertex Attributes 266
7.3.2 An Object’s Vertices 267
7.4 Surface Representation 270
7.4.1 Vertices and Surface Ambiguity 270
7.4.2 Triangles 271
7.4.3 Connecting Vertices into Triangles 271
7.4.4 Drawing Geometry 274
7.5 Rendering Pipeline 275
7.5.1 Fixed-Function versus Programmable Pipelines 277
7.6 Shaders 278
7.6.1 Using Shaders to Move from Vertex to Triangle
to Fragment 278
7.6.2 Shader Input and Output Values 279
7.6.3 Shader Operations and Language Constructs 280
7.7 Vertex Shaders 280
7.7.1 Vertex Shader Inputs 280
7.7.2 Vertex Shader Outputs 281
7.7.3 Basic Vertex Shaders 282
7.7.4 Linking Vertex and Fragment Shaders 282
7.8 Fragment Shaders 283
7.8.1 Fragment Shader Inputs 283
7.8.2 Fragment Shader Outputs 284
7.8.3 Compiling, Linking, and Using Shaders 284
7.8.4 Setting Uniform Values 286
7.9 Basic Coloring Methods 287
7.9.1 Per-Object Colors 288
7.9.2 Per-Vertex Colors 288
7.9.3 Per-Triangle Colors 290
7.9.4 Sharp Edges and Vertex Colors 290
7.9.5 More about Basic Shading 291
7.9.6 Limitations of Basic Shading Methods 292
7.10 Texture Mapping 292
7.10.1 Introduction 292
7.10.2 Shading via Image Lookup 293
7.10.3 Texture Images 294
7.10.4 Texture Samplers 297
7.11 Texture Coordinates 297
7.11.1 Mapping Texture Coordinates onto Objects 298
7.11.2 Generating Texture Coordinates 300
7.11.3 Texture Coordinate Discontinuities 301
7.11.4 Mapping Outside the Unit Square 302
7.11.5 Texture Samplers in Shader Code 309
7.12 The Steps of Texturing 309
7.12.1 Other Forms of Texture Coordinates 310
7.12.2 From Texture Coordinates to a Texture Sample Color 311
7.13 Limitations of Static Shading 312
7.14 Chapter Summary 313
Chapter 8
Lighting 315
8.1 Introduction 315
8.2 Basics of Light Approximation 316
8.2.1 Measuring Light 317
8.2.2 Light as a Ray 318
8.3 A Simple Approximation of Lighting 318
8.4 Types of Light Sources 319
8.4.1 Directional Lights 320
8.4.2 Point Lights 321
8.4.3 Spotlights 327
8.4.4 Other Types of Light Sources 330
8.5 Surface Materials and Light Interaction 331
8.6 Categories of Light 332
8.6.1 Emission 332
8.6.2 Ambient 332
8.6.3 Diffuse 334
8.6.4 Specular 338
8.7 Combined Lighting Equation 343
8.8 Lighting and Shading 348
8.8.1 Flat-Shaded Lighting 349
8.8.2 Per-Vertex Lighting 350
8.8.3 Per-Fragment Lighting 354
8.9 Textures and Lighting 358
8.9.1 Basic Modulation 359
8.9.2 Specular Lighting and Textures 360
8.9.3 Textures as Materials 362
8.10 Advanced Lighting 363
8.10.1 Normal Mapping 363
8.11 Reflective Objects 366
8.12 Shadows 367
8.13 Chapter Summary 368
Chapter 9
Rasterization 369
9.1 Introduction 369
9.2 Displays and Framebuffers 370
9.3 Conceptual Rasterization Pipeline 371
9.3.1 Rasterization Stages 372
9.4 Determining the Fragments: Pixels Covered by a Triangle 373
9.4.1 Fragments 373
9.4.2 Depth Complexity 373
9.4.3 Converting Triangles to Fragments 375
9.4.4 Handling Partial Fragments 376
9.5 Determining Visible Geometry 378
9.5.1 Depth Buffering 378
9.5.2 Depth Buffering in Practice 387
9.6 Computing Fragment Shader Inputs 388
9.6.1 Uniform Values 389
9.6.2 Per-Vertex Attributes 389
11.2 Probability 493
11.2.1 Basic Probability 494
11.2.2 Random Variables 497
11.2.3 Mean and Standard Deviation 501
11.2.4 Special Probability Distributions 502
11.3 Determining Randomness 505
11.3.1 Chi-Square Test 506
11.3.2 Spectral Test 512
11.4 Random Number Generators 513
11.4.1 Linear Congruential Methods 516
11.4.2 Lagged Fibonacci Methods 520
11.4.3 Carry Methods 521
11.4.4 Mersenne Twister 523
11.4.5 Conclusions 526
11.5 Special Applications 527
11.5.1 Integers and Ranges of Integers 527
11.5.2 Floating-Point Numbers 528
11.5.3 Nonuniform Distributions 528
11.5.4 Spherical Sampling 530
11.5.5 Disc Sampling 532
11.5.6 Noise and Turbulence 534
11.6 Chapter Summary 538
Chapter 12
Intersection Testing 541
12.1 Introduction 541
12.2 Closest Point and Distance Tests 542
12.2.1 Closest Point on Line to Point 542
12.2.2 Line–Point Distance 544
12.2.3 Closest Point on Line Segment to Point 545
12.2.4 Line Segment–Point Distance 546
12.2.5 Closest Points Between Two Lines 548
12.2.6 Line–Line Distance 550
12.2.7 Closest Points Between Two Line Segments 551
12.2.8 Line Segment–Line Segment Distance 553
12.2.9 General Linear Components 554
12.3 Object Intersection 554
12.3.1 Spheres 556
12.3.2 Axis-Aligned Bounding Boxes 563
12.3.3 Swept Spheres 571
12.3.4 Object-Oriented Boxes 576
12.3.5 Triangles 583
12.4 A Simple Collision System 588
12.4.1 Choosing a Base Primitive 589
12.4.2 Bounding Hierarchies 590
12.4.3 Dynamic Objects 591
12.4.4 Performance Improvements 593
12.4.5 Related Systems 596
12.4.6 Section Summary 599
12.5 Chapter Summary 599
Chapter 13
Rigid Body Dynamics 601
13.1 Introduction 601
13.2 Linear Dynamics 602
13.2.1 Moving with Constant Acceleration 602
13.2.2 Forces 605
13.2.3 Linear Momentum 606
13.2.4 Moving with Variable Acceleration 607
13.3 Numerical Integration 609
13.3.1 Definition 609
13.3.2 Euler’s Method 611
13.3.3 Runge-Kutta Methods 614
13.3.4 Verlet Integration 616
13.3.5 Implicit Methods 619
13.3.6 Semi-Implicit Methods 621
13.4 Rotational Dynamics 622
13.4.1 Definition 622
13.4.2 Orientation and Angular Velocity 622
13.4.3 Torque 625
13.4.4 Angular Momentum and Inertia Tensor 626
13.4.5 Integrating Rotational Quantities 628
13.5 Collision Response 630
13.5.1 Contact Generation 630
13.5.2 Linear Collision Response 634
13.5.3 Rotational Collision Response 638
13.5.4 Extending the System 640
13.6 Efficiency 643
13.7 Chapter Summary 645
Bibliography 647
Index 655
Trademarks 671
About the CD-Rom 672

Another Game Programming Books
Download
Related Posts with Thumbnails

Put Your Ads Here!