Even experienced game developers sometimes have a hard time making their vision for a great game a reality. The number of available programming languages, libraries, and production methods can make the development process overwhelming and result in complicated, unreliable game code. C# Game Programming: For Serious Game Creation shows programmers how to write simple, clean, and reliable code step-by-step through the creation of a basic game. The game is built using C#, a high-level programming language, and OpenGL, an industry favorite for graphics display. You'll get an overview of the methods and libraries used to build good games, learn how to use those libraries and create your own, and finally build your own scrolling shooter game. You'll even find tips and information on how to develop your own game ideas and you'll have an excellent code base to work with. C# Game Programming: For Serious Game Creation provides you with all the information you need to take your game ideas from concept to completion. Contents 7 Introduction 13 PART I: BACKGROUND 16 Chapter 1 The History of C# 18 C# Basics 18 Summary 32 Chapter 2 Introducing OpenGL 34 Architecture of OpenGL 36 OpenGL Is Changing 39 OpenGL and the Graphics Card 40 The Tao Framework 43 Summary 45 Chapter 3 Modern Methods 46 Pragmatic Programming 46 Summary 59 PART II: IMPLEMENTATION 62 Chapter 4 Setup 64 Introducing Visual Studio Express—A Free IDE for C# 64 Subversion, an Easy Source Control Solution 75 Tao 84 NUnit 86 Summary 95 Chapter 5 The Game Loop and Graphics 96 How Do Games Work? 96 Implementing a Fast Game Loop in C# 97 Graphics 106 Summary 118 Chapter 6 Game Structure 120 The Basic Pattern of a Game Object 120 Handling Game State 121 Game State Demo 127 Setting the Scene with Projections 129 Sprites 135 Chapter 7 Rendering Text 160 Font Textures 160 Font Data 163 Rendering Text 169 Refining the Text Class 174 Faster Rendering with glDrawArrays 180 Summary 184 Chapter 8 Game Math 186 Trigonometric Functions 186 Vectors 194 Two-Dimensional Intersection 212 Tweens 221 Matrices 228 Chapter 9 Making the Game Engine 244 A New Game Engine Project 244 Extending the Game Engine 248 Adding Sound Support 261 Improving Input 274 Chapter 10 A Simple Side-Scrolling Shooting Game 304 A Simple Game 304 The First Implementation Pass 305 Developing the Inner Game 329 Continuing Iterations 395 Chapter 11 Creating Your Own Game 400 Project Management 400 Display Methods 403 Types of Games 407 Final Words 425 Appendix A: Recommended Reading 426 The Practice of Programming 426 The C# Language and Software Architecture 427 Math and Graphics Programming 427 OpenGL 428 Index 430 A 430 B 430 C 431 D 431 E 432 F 432 G 432 H 433 I 434 J 434 K 434 L 434 M 434 N 435 O 435 P 436 Q 436 R 436 S 437 T 438 U 439 V 439 W 440 X 440 Y 440 Z 440 1435455568,9781435455566,9781435456235 "C♯ Game Programming: For Serious Game Creation shows programmers how to write simple, clean, and reliable code step-by-step through the creation of a basic game. The game is built using C♯, a high-level programming language, and OpenGL, an industry favorite for graphics display. You'll get an overview of the methods and libraries used to build good games, learn how to use those libraries and create your own, and finally build your own scrolling shooter game. You'll even find tips and information on how to develop your own game ideas and you'll have an excellent code base to work with. C♯ Game Programming: For Serious Game Creation provides you with all the information you need to take your game ideas from concept to completion."--Resource description page Written for experienced programmers, C# Game Programming: For Serious Game Creation shows game programmers how to create games using the C# language and OpenGL. Using the latest features of C# and clean, object oriented code, readers will be taken step-by-step through the creation of two games. After the completion of the book, readers will have the skills they need to program their very own 2D and 3D games. An accompanying CD-Rom features all the source code used in the book along with the graphics used in the sample games and trial versions of the software used including Nuni, Subversion, Tortoise SVN, Tao Frame, and Visual Studio Express.