Learning C# by Programming Games
- Length: 450 pages
- Edition: 2013
- Language: English
- Publisher: Springer
- Publication Date: 2013-06-18
- ISBN-10: 3642365795
- ISBN-13: 9783642365799
- Sales Rank: #2662472 (See Top 100 Books)
C# is the language of choice for learning how to program. It is a very well structured object-oriented language and avoids some of the problems of Java. An excellent free programming environment is available for C#, as well as a game programming framework. And (if necessary) moving from C# to C++ is easy.
Developing computer games is a perfect way to learn how to program in modern programming languages. This book teaches how to program in C# through the creation of computer games – and without requiring any previous programming experience.
Contrary to most programming books, Egges, Fokker and Overmars do not organize the presentation according to programming language constructs, but instead use the structure and elements of computer games as a framework. For instance, there are chapters on dealing with player input, game objects, game worlds, game states, levels, animation, physics, and intelligence. The reader will be guided through the development of four games showing the various aspects of game development. Starting with a simple shooting game, the authors move on to puzzle games consisting of multiple levels, and conclude the book by developing a full-fledged platform game with animation, game physics, and intelligent enemies. They show a number of commonly used techniques in games, such as drawing layers of sprites, rotating, scaling and animating sprites, showing a heads-up display, dealing with physics, handling interaction between game objects, and creating pleasing visual effects such as snow or glitter. At the same time, they provide a thorough introduction to C# and object-oriented programming, introducing step by step important aspects of programming in general, including many programming constructs and idioms, syntax diagrams, collections, and exception handling.
The book is also designed to be used as a basis for a game-oriented programming course. For each part, there are concluding exercises and challenges, which are generally more complex programming endeavors. Lots of supplementary materials for organizing such a course are available on the accompanying web site www.csharpprogramminggames.com, including installation instructions, solutions to the exercises, software installation instructions, game sprites and sounds.
Table of Contents
Part I: Getting Started
Chapter 1: Building Your First Game Application
Chapter 2: Programming
Chapter 3: Game Programming Basics
Chapter 4: Creating a Game World
Part II: Creating Colorful Games
Chapter 5: Knowing What the Player Is Doing
Chapter 6: Reacting to Player Input
Chapter 7: Basic Game Objects
Chapter 8: Adding Interaction
Chapter 9: A Limited Number of Lives
Chapter 10: Organizing Game Objects
Chapter 11: Finishing the Game
Part III: Structures and Patterns
Chapter 12: Collections of Game Objects
Chapter 13: Fullscreen Games
Chapter 14: Game Objects in a Structure
Chapter 15: Redesigning the Game World
Chapter 16: Gameplay Programming
Chapter 17: Game States
Chapter 18: Finishing the Game
Part IV: Making Your Games Appealing
Chapter 19: Sprite Sheets
Chapter 20: Menus and Settings
Chapter 21: Game State Management
Chapter 22: Loading Levels from Files
Chapter 23: Pairing the Penguins
Chapter 24: Finishing the Game
Part V: Animation and Complexity
Chapter 25: Creating the Main Game Structure
Chapter 26: Animation
Chapter 27: Game Physics
Chapter 28: Intelligent Enemies
Chapter 29: Adding Player Interaction
Chapter 30: Finishing the Game
Appendix A: Exercises and Challenges
Appendix B: Syntax Diagrams