2D Graphics Programming for Games

Published:
Content:
Author(s):
Free Standard Shipping

Purchasing Options

Hardback
ISBN 9781466501898
Cat# K14405

$49.95

$39.96

SAVE 20%


eBook (VitalSource)
ISBN 9781466501904
Cat# KE15865

$49.95

$34.97

SAVE 30%


eBook Rentals

Other eBook Options:
 

Features

  • Shows how the core concepts of graphics programming are the same regardless of platform
  • Helps graphics programmers communicate effectively with game artists and designers
  • Requires a basic understanding of programming
  • Reviews necessary math principles in the appendices
  • Provides code samples in C# and XNA, with more samples in C++, OpenGL, DirectX, and Flash available on a supporting website
  • Includes exercise questions or programming challenges at end of each chapter

Watch the author’s videos on Particle Effects/Systems:

Fire
Smoke, Snow, Explosions
Student Samples

Watch the author’s videos on Depth:

Eye Level and Horizon
Parallax

Summary

The success of Angry Birds, Peggle, and Fruit Ninja has proven that fun and immersive game experiences can be created in two dimensions. Furthermore, 2D graphics enable developers to quickly prototype ideas and mechanics using fewer resources than 3D.

2D Graphics Programming for Games provides an in-depth single source on creating 2D graphics that can be easily applied to many game platforms, including iOS, Android, Xbox 360, and the PlayStation Suite. The author presents examples not only from video games but also from art and animated film.

The book helps new programmers learn the concepts and techniques used to produce appealing 2D graphics. It starts with the basics and then covers topics pertaining to motion and depth, such as cel animation, tiling, and layering. The text also describes advanced graphics, including the use of particle systems, shaders, and splines. Code samples in the text and online allow readers to see a particular line of code in action or as it relates to the code around it. In addition, challenges and suggested projects encourage readers to work through problems, experiment with solutions, and tinker with code.

Full of practical tools and tricks, this color book gives novices in-depth guidance on making professional, high-quality graphics for games. It also improves the relationship between programmers and artists by explaining how certain art and design challenges can be solved with a programmatic solution.

Table of Contents

I Getting Started in 2D
Introduction
About This Book
Why C# and XNA?
Game Development 101
Game Developer Platforms
Book Organization

Basics of Computer Graphics
Bits and Bytes
Display
Double Buffering
Graphic File Formats

Sprites!
What Is a Sprite?
Layering with Depth
The Sprite Sheet and the GPU
Scaling Sprites

II Motion and Depth
Animation
Historical Animation
Cel Animation
A Few Principles of Animation
Animation Cycles

Camera and Tiling
A Simple Camera
Simple Camera Zoom
Tiling
Isometric Tiled Graphics

The Illusion of Depth
A Historical Perspective on Perspective
Layering
The Six Principles of Depth
The 6 Principles in Code
Traditional Perspective
Summary

User Interface
UI Types
Fonts
Localization
Safe Frames
Menus

III Advanced Graphics
Particle Systems
What’s a Particle?
Creating Effects
Blending Types
Types of Effects
An Effects System
Optimization

GPU Programming
Pixel Modification
Full Screen Pixel Modifications
What Is a Shader
Shader Languages
Pixel Shader Examples

Polish, Polish, Polish!
Transitions
Sinusoidal Movement
Splines
Working with Your Artist
A Conclusion

IV Appendices
Math Review: Geometry

Geometry Primer

Math Review: Vectors
Vectors and Notation
Vector Comparison
Length, Addition, and Subtraction
Unit Vectors and Normalizing a Vector
Standard Unit Vectors and Polar Representation

Math Review: Trigonometry
Triangle Trig
Unit-Circle Trig
Trig as a Collection of Periodic Functions
Translations and Transforms of Trig Functions
Circles and Ellipses
The Tangent Function

Bibliography

Glossary

Index

Exercises appear at the end of each chapter.

Author Bio(s)