Limit search to available items
Book Cover
Author Mitchell, Shaun

Title SDL Game Development
Published Birmingham : Packt Publishing, 2013


Description 1 online resource (256 pages)
Contents Cover; Copyright; Credits; About the Author; About the Reviewers;; Table of Contents; Preface; Chapter 1: Getting Started with SDL; Why use SDL?; What is new in SDL 2.0?; Migrating SDL 1.2 extensions; Setting up SDL in Visual C++ Express 2010; Using Mercurial to get SDL 2.0 on Windows; Cloning and building the latest SDL 2.0 repository; I have the library; now what?; Hello SDL; An overview of Hello SDL; SDL initialization flags; SDL renderer flags; What makes up a game; Breaking up the Hello SDL code; What does this code do?; The Game class; Fullscreen SDL; Summary
Chapter 2: Drawing in SDLBasic SDL drawing; Getting some images; Creating an SDL texture; Source and destination rectangles; Animating a sprite sheet; Flipping images; Installing SDL_image; Using SDL_image; Tying it into the framework; Creating the texture manager; Using texture manager as a singleton; Summary; Chapter 3: Working with Game Objects; Using inheritance; Implementing polymorphism; Using abstract base classes; Should we always use inheritance?; Could the same thing be achieved with a simpler solution?; Derived classes should model the ""is a"" relationship
Possible performance penaltiesPutting it all together; Summary; Chapter 4: Exploring Movement and Input Handling; Setting up game objects for movement; What is a vector?; Some common operations; Addition of two vectors; Multiply by a scalar number; Subtraction of two vectors; Divide by a scalar number; Normalizing a vector; Adding the Vector2D class; Adding velocity; Adding acceleration; Creating fixed frames per second; Input handling; Creating our input handler class; Handling joystick/gamepad input; SDL joystick events; Initializing joysticks; Listening for and handling axis movement
Dealing with joystick button inputHandling mouse events; Using mouse button events; Handling mouse motion events; Implementing keyboard input; Wrapping things up; Summary; Chapter 5: Handling Game States; A simple way for switching states; Implementing finite state machines; A base class for game states; Implementing FSM; Implementing menu states; Function pointers and callback functions; Implementing the temporary play state; Pausing the game; Creating the game over state; Summary; Chapter 6: Data-driven Design; Loading XML files; Basic XML structure; Implementing Object Factories
Using Distributed FactoriesFitting the factory into the framework; Parsing states from an XML file; Loading the menu state from an XML file; Loading other states from an XML file; Loading the play state; Loading the pause state; Loading the game over state; Summary; Chapter 7: Creating and Displaying Tile Maps; What is a tile map?; Getting familiar with the Tiled application; Parsing and drawing a tile map; Creating the TileLayer class; Creating the LevelParser class; Parsing tilesets; Parsing a tile layer; Drawing the map; Scrolling a tile map; Parsing object layers
Summary Written as a practical and engaging tutorial, SDL Game Development guides you through developing your own framework and the creation of two engaging games. If you know C++ and you're looking to make great games from the ground up, then this book is perfect for you
Notes Developing the ObjectLayer class
Print version record
SUBJECT SDL (electronic resource)
SDL (electronic resource) fast
Subject Multimedia systems.
Video games -- Programming.
Video games -- Programming
Multimedia systems
Form Electronic book
ISBN 9781849696838