Introduction
To get the free pdf or to buy a printed version go to the book page at lulu.com.
Microsoft's XNA Game Studio is becoming the most popular platform for students and beginning developers to learn game programming. This book, A Simple Introduction to Game Programming With C# and XNA 3.1: No Previous Programming Experience Required, aims to give people with a limited exposure to game programming an introduction to get them started. This is by no means a comprehensive introduction, but just goes over the basics.
Use In Education
Material from this book has been used at the community college and high school level, and I’ve received reports that younger kids are using it too to learn the basics of programming.
Why Use This Book to Learn XNA?
There are several popular XNA books, so why bother reading this one? When trying to find an introductory XNA book for the college course I found the options limited. Not that the books were bad, they just didn't suit the purpose. Some were too advanced for beginners, others focused on specialized issues (such as making helper libraries or spending significant time on optimization) and weren't general enough for a class. What I needed was a complete basic introduction to C# that XNA aimed at beginners.
That is what makes A Simple Introduction to Game Programming With C# and XNA 3.1 different from other books: it is aimed at complete beginners, not only people with no programming experience but those without much technical experience. This book also focuses on basic game programming concepts more than specific syntax. It is more of a basic programming book using XNA than a book that just lists how to do simple tasks in XNA. The book also keeps things simple by only covering 2D games and would be ideal for a high school or lower level college game programming course.
The material in A Simple Introduction to Game Programming With C# and XNA 3.1 has also been tested on students and has been adjusted based on feedback For instance, I was surprised to find that many students had difficulty in abstracting a basic player class. Putting in a sprite and moving it around on screen made sense, but they had trouble encapsulating this into a separate class. This issue became an entire chapter in the book (Chapter 7 – Creating a Player Class) to help students get over this hurdle. And I found that audio was not a major issue, and people can learn how to use it from the documentation and so it is not mentioned here.
Target Audience
The main audience for this book is people interested in learning game programming but who have no previous experience in programming and who know little about making games. This book is also for developers who may have some programming experience but limited exposure to game programming (such as looking at tutorials online.)
This book is not for experienced game developers who are wanting to learn XNA, or programmers who are looking for how to implement advanced effects with XNA, as they will find the scope of the book too limited.
Contents
Part I - An Introduction to Programming and C#
In this part of the book a basic introduction is presented on C#. An emphasis is placed on the basic concepts of programming and object-oriented design. This section has enough C# to get people started making 2D games in the next section.
Part II - Making 2D Games in XNA
The second part of this book presents a thorough introduction to 2D game programming. All of the major components, parallax backgrounds, animation, enemy interactions, adding start screens and particle systems are covered. We also walk through creating a complete game, a 2D spaceship scroller.
Also note that all of the source code and samples are up at xnagamemaking.com.
Feedback
Thank you for taking the time to look through this book. Any feedback (or corrections) is appreciated. I can be reached at curtis@xnagamemaking.com.
Curtis Bennett
