Home Page Icon
Home Page
Table of Contents for
II. Implementation
Close
II. Implementation
by Daniel Schuller
C# Game Programming: For Serious Game Creation
Copyright
Dedication
Acknowledgments
About the Author
Introduction
CD-ROM Downloads
I. Background
1. The History of C#
C# Basics
Versions of C#
C# 2.0
Generics
Anonymous Delegates
C# 3.0
LINQ
Lambda Functions
Object Initializers
Collection Initializers
Local Variable Type Inference and Anonymous Types
C# 4.0
Dynamic Objects
Optional Parameters and Named Arguments
Summary
2. Introducing OpenGL
Architecture of OpenGL
Vertices—The Building Blocks of 3D Graphics
The Pipeline
OpenGL Is Changing
OpenGL ES
WebGL
OpenGL and the Graphics Card
Shaders—Programs on the Graphics Card
The Tao Framework
Summary
3. Modern Methods
Pragmatic Programming
Game Programming Traps
KISS
DRY
C++
Source Control
Using Source Control
Unit Testing
Test Driven Development
Unit Testing in C#
Summary
II. Implementation
4. Setup
Introducing Visual Studio Express—A Free IDE for C#
A Quick Hello World
Visual Studio Express Tips
Automatic Refactoring and Code Generation
Renaming
Creating Functions
Separating Chunks of Code
Shortcuts
Subversion, an Easy Source Control Solution
Where to Get It
Installation
Creating the Repository
Adding to the Repository
History
Extending Hello World
Tao
NUnit
Using NUnit with a Project
Running Tests
An Example Project
Summary
5. The Game Loop and Graphics
How Do Games Work?
A Closer Look at the Game Loop
Implementing a Fast Game Loop in C#
Adding High-Precision Timing
Graphics
Full Screen Mode
Rendering
Clearing the Background
Vertices
Triangles
Coloring and Spinning the Triangle
Summary
6. Game Structure
The Basic Pattern of a Game Object
Handling Game State
Game State Demo
Setting the Scene with Projections
Form Size and OpenGL Viewport Size
Aspect Ratio
The Projection Matrix
2D Graphics
Sprites
Positioning the Sprite
Managing Textures with DevIl
Textured Sprites
Alpha Blending Sprites
Color Modulating Sprites
A Sprite and Renderer Class
Using the Sprite Class
7. Rendering Text
Font Textures
Font Data
Parsing the Font Data
Using the CharacterData
Rendering Text
Calculating the FPS
V-Sync and Frame-Rate
Profiling
Refining the Text Class
Faster Rendering with glDrawArrays
Modifying the Renderer
Profiling the Batch Draw Method
Summary
8. Game Math
Trigonometric Functions
Plotting a Graph
Trigonometric Functions for Special Effects
Vectors
What Is a Vector?
The Length Operation
Vector Equality
Vector Addition, Subtraction, and Multiplication
Normal Vectors
The Dot Product Operation
The Cross-Product Operation
Finishing Touches to the Vector Structure
Two-Dimensional Intersection
Circles
Rectangles
Tweens
An Overview of Tweening
The Tween Class
Using Tweens
Matrices
What Is a Matrix?
The Identity Matrix
Matrix-Matrix and Vector-Matrix Multiplication
Translating and Scaling
Rotation
Inverse
Matrix Operations on Sprites
Modifying the Sprite to Use Matrices
Optimization
9. Making the Game Engine
A New Game Engine Project
Extending the Game Engine
Using the Game Engine in a Project
Multiple Textures
Adding Sound Support
Creating Sound Files
Developing a SoundManager
Improving Input
Wrapping Game Controllers
Adding Better Mouse Support
Adding Keyboard Support
10. A Simple Side-Scrolling Shooting Game
A Simple Game
The First Implementation Pass
The Start Menu State
The Inner Game State
The Game Over State
Developing the Inner Game
Moving the Player Character
Faking Movement with a Scrolling Background
Adding Some Simple Enemies
Introducing Simple Weapons
Damage and Explosions
Managing Explosions and Enemies
Level Definitions
Enemy Movement
Enemy Attacks
Continuing Iterations
11. Creating Your Own Game
Project Management
Display Methods
2D Games
3D Games
Types of Games
Text Games
Puzzle Games
First-Person Shooter Games
Strategy Games
Role-Playing Games
Roguelike Games
Tile-Based Role-Playing Games
3D Role-Playing Games
Platform Games
Final Words
A. Recommended Reading
The Practice of Programming
The Pragmatic Programmer: From Journeyman to Master (ISBN 0-201-61622-X) by Andrew Hunt and David Thomas
Code Complete Second Edition: A Practical Handbook of Software Construction (ISBN-13: 978-0735619678) by Steve McConnell
The C# Language and Software Architecture
CLR via C#, 3rd Edition (ISBN-13: 978-0735627048) by Jeffrey Richter
Head First Design Patterns (ISBN-13: 978-0596007126) by Eric T Freeman, Elisabeth Robson, Bert Bates, and Kathy Sierra
Math and Graphics Programming
3D Math Primer for Graphics and Game Development (ISBN-13: 978-1556229114) by Fletcher Dunn and Ian Parberry
Computer Graphics: Principles and Practice in C (2nd Edition) (ISBN-13: 978-0201848403) by James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes
OpenGL
OpenGL Programming Guide: The Official Guide to Learning OpenGL (ISBN-13: 978-0321552624) by Dave Shreiner
OpenGL Shading Language 3rd Edition by Randi J. Rost, Bill Licea-Kane, Dan Ginsburg, John M. Kessenich, Barthold Lichtenbelt, Hugh Malan, and Mike Weiblen
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
3. Modern Methods
Next
Next Chapter
4. Setup
Part II. Implementation
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset