Free Sample
+ Collection

Sparrow iOS Game Framework Beginner’s Guide

Beginner's Guide
Johannes Stein

Create mobile games for iOS devices with the Sparrow iOS Game Framework
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782161509
Paperback274 pages

About This Book

  • Learn the principles of Game Mechanics and implement them with Sparrow’s powerful framework
  • Build an entire game throughout the course of the book
  • This is a practical guide with step-by-step instructions to learn the art of mobile game development

Who This Book Is For

This book is aimed at those who have always wanted to create their own games for iOS devices. Perhaps you've already dabbled in game development and want to know how to develop games for the Apple App Store, or maybe you have developed Objective-C apps in the past but you are new to game development. In either case, this book will help with descriptive examples and teach you to develop a game throughout its course. Some experience in Objective-C and a basic understanding of object-oriented programming are required.

Table of Contents

Chapter 1: Getting Started with Sparrow
Understanding the basics of Sparrow
System requirements
Setting up the Apple developer account
Downloading Xcode
Downloading Sparrow
Contents of the Sparrow package
Setting up Sparrow
Time for action – adding Sparrow as a source tree reference
Time for action – using the barebone project as a template
Time for action – installing command-line tools
Time for action – installing CocoaPods
Time for action – using the barebone project as a template
Running the template on the actual device
Time for action – running the template on the actual device
Getting Sparrow documentation files
Time for action – adding the Sparrow API documentation to Xcode
The idea for the game
Code conventions
Summary
Chapter 2: Displaying Our First Objects
Understanding display objects
Setting the background color
Time for action – changing the background color
Creating our cardboard puppet doll
Time for action – creating a cardboard puppet doll
Explaining macros
Manipulating display objects
Time for action – manipulating display objects
Summary
Chapter 3: Managing Assets and Scenes
Working with assets
Managing our assets
Time for action – creating a base class
Creating a texture manager
Time for action – managing our textures
Creating a sound manager
Time for action – implementing a sound manager
Creating a file manager
Time for action – managing remaining file types
Time for action – getting started with basic error handling
Putting it all together
Time for action – creating an asset container class
Time for action – displaying an image
What are scenes?
Time for action – implementing a scene class
Creating a scene director
Time for action – managing our scenes with a scene director
Summary
Chapter 4: The Basics of Our Game
Taking care of cross-device compatibility
Starting with the development of our game
Creating our scene manager setup
Time for action – creating our scene manager setup
Adding images to the battlefield scene
Time for action – adding images to the battlefield scene
Arranging images in the pirate cove scene
Time for action – arranging images in the pirate cove scene
Summary
Chapter 5: Beautifying Our Game
Working with tweens
Time for action – moving the pirate ship
Time for action – updating the movement
Working with sprite sheets
Learning about texture formats
Time for action – loading our first texture atlas
Summary
Chapter 6: Adding Game Logic
Extending the asset manager
Time for action – adding texture atlases to the asset manager
Structuring our ships
Time for action – creating a ship class
Extending the ship class
Time for action – adding more functionality to the ship class
Shooting cannonballs
Time for action – allowing the ship to shoot cannonballs
Collision detection
Time for action – letting cannonballs collide with ships
Loading gameplay-relevant data
Time for action – avoiding hardcoded values
Summary
Chapter 7: User Interface
Displaying the hit points of each ship
Time for action – placing a health bar on top of each ship
Adding buttons to the screen
Time for action – putting buttons on the screen
Time for action – allowing the player to pause and resume
Time for action – conceding the game
Adding dialogs to the screen
Time for action – creating a dialog class
Adding custom events to the dialogs
Time for action – adding our own buttons to our dialog
Drawing text on the screen
Time for action – adding a text field to the dialog
Time for action – using bmGlyph to create a bitmap font
Time for action – using our bitmap font for a text field
Summary
Chapter 8: Artificial Intelligence and Game Progression
Artificial intelligence in theory
Letting the enemy ship move and attack
Time for action – getting the enemy ship to move around
Time for action – the enemy should attack the player
Time for action – spicing up the AI with fuzzy values
Adding progression to our game
Time for action – adding a World class
Time for action – updating the scene and dialog classes
Time for action – making the pirate cove playable
Adding win and lose conditions
Time for action – being able to win or lose
Summary
Chapter 9: Adding Audio to Our Game
Finding music and sound
Adding audio playback
Time for action – getting audio files to play
Time for action – playing music in our scenes
Time for action – sound effects in the pirate cove
Summary
Chapter 10: Polishing Our Game
Adding additional scenes
Time for action – showing the game over scene
Time for action – having the game over scene show up
Time for action – integrating the main menu into our game
Time for action – creating an intro for our game
Implementing tutorial mechanics
Time for action – adding a tutorial to our intro scene
Loading and saving the current state
Time for action – loading and saving the last played game
Summary
Chapter 11: Integrating Third-party Services
Getting word out to potential testers
Time for action – integrating Ubertesters
Time for action – creating a build for beta testers
Time for action – deploying an application
Explaining Game Center
Time for action – integrating Game Center authentication
An overview of analytics services
Summary

What You Will Learn

  • Create display objects and learn how to render them on the screen
  • Animate objects on the screen
  • Develop your game for multiple devices such as the iPhone and the iPad
  • Organize your game into scenes and classes and build upon the iOS directory structure
  • Create and design the user interface utilizing the Sparrow API
  • Apply basic artificial intelligence to enemy objects to enhance the difficulty level of the game
  • Add finishing touches to your game with music and sound effects

In Detail

Sparrow is a game framework with a focus on ease-of-use and current state-of-the-art technologies. The Sparrow game framework is intended for 2D games and multimedia applications and has built-in support for animation, managing objects on the screen, and touch support.

Sparrow iOS Game Framework Beginner's Guide aims to teach a complete overview on how to develop a mobile game for iOS using Objective-C as the programming language and the Sparrow game framework. Instead of teaching concepts separately, this book will take a methodical approach, taking you through the development of an entire game using Sparrow's powerful framework.

Authors

Read More