Preface

Creating games in C++ is a complicated process requiring a lot of time and dedication to achieve results. A good foundation of reusable classes can speed up development time and allow focus to be on creating a great game rather than struggling with low-level code. This book aims to show an approach to creating a reusable framework that could be used for any game, whether 2D or 3D.

What this book covers

Chapter 1, Getting started with SDL, covers setting up SDL in Visual C++ 2010 express and then moves onto the basics of SDL including creating a window and listening for quit events.

Chapter 2, Drawing in SDL, covers the development of some core drawing classes to help simplify SDL rendering. The SDL_image extension is also introduced to allow the loading of a variety of different image file types.

Chapter 3, Working with Game Objects, gives a basic introduction to inheritance and polymorphism along with the development of a reusable GameObject class that will be used throughout the rest of the book.

Chapter 4, Exploring Movement and Input Handling, gives a detailed look at handling events in SDL. Joystick, keyboard, and mouse input are all covered with the development of reusable classes.

Chapter 5, Handling Game States, covers the design and implementation of a finite state machine to manage game states. Implementing and moving between different states is covered in detail.

Chapter 6, Data-driven Design, covers the use of TinyXML to load states. A class to parse states is developed along with examples for different states.

Chapter 7, Creating and Displaying Tile Maps, brings together everything from the previous chapters to allow the creation of levels using the Tiled map editor. A level parsing class is created to load maps from an XML file.

Chapter 8, Creating Alien Attack, covers the creation of a 2D side scrolling shooter, utilizing everything learned in the previous chapters.

Chapter 9, Creating Conan the Caveman, covers the creation of a second game, altering the code from Alien Attack, showing that the framework is flexible enough to be used for any 2D game genre.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.204.186