Sparrow iOS Game Framework Beginner’s Guide


Sparrow iOS Game Framework Beginner’s Guide
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.95
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$67.94
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • 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

Book Details

Language : English
Paperback : 274 pages [ 235mm x 191mm ]
Release Date : June 2014
ISBN : 1782161503
ISBN 13 : 9781782161509
Author(s) : Johannes Stein
Topics and Technologies : All Books, Beginner's Guides, Open Source


Table of Contents

Preface
Chapter 1: Getting Started with Sparrow
Chapter 2: Displaying Our First Objects
Chapter 3: Managing Assets and Scenes
Chapter 4: The Basics of Our Game
Chapter 5: Beautifying Our Game
Chapter 6: Adding Game Logic
Chapter 7: User Interface
Chapter 8: Artificial Intelligence and Game Progression
Chapter 9: Adding Audio to Our Game
Chapter 10: Polishing Our Game
Chapter 11: Integrating Third-party Services
Appendix : Pop Quiz Answers
Afterword
Index
  • Chapter 1: Getting Started with Sparrow
    • Understanding the basics of Sparrow
    • System requirements
    • Setting up the Apple developer account
    • Downloading Xcode
    • Downloading Sparrow
      • Cloning the Git repository
    • Contents of the Sparrow package
      • The samples folder
      • The sparrow folder
      • Markdown files in the root folder
      • License
    • Setting up Sparrow
      • Option 1 – source tree reference
    • Time for action – adding Sparrow as a source tree reference
    • Time for action – using the barebone project as a template
      • Option 2 – CocoaPods
    • 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
      • Setting goals and expectations
      • Examining our gameplay elements
    • Code conventions
    • Summary
  • Chapter 2: Displaying Our First Objects
    • Understanding display objects
      • Explaining display object containers
    • Setting the background color
    • Time for action – changing the background color
      • What is a stage?
    • Creating our cardboard puppet doll
    • Time for action – creating a cardboard puppet doll
    • Explaining macros
      • The Angles macro
      • The Colors macro
      • The utility functions
      • Constants in Sparrow
        • Math
        • Color
    • 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
      • Basic error handling
    • 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
      • Understanding the texture size limit
      • How to deal with different screen sizes
        • Scaling the viewport
        • Black borders
        • Showing non-interactive screen space
        • Rearranging screen elements
        • Choosing the best option
      • Differences between various devices
      • Utilizing the iOS SDK
      • Retina and iPad support in Sparrow
      • App icons and splash images
      • The bottom line
    • 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
      • Understanding transitions
      • Explaining jugglers
      • Updating the movement and canceling tweens
    • Time for action – updating the movement
    • Working with sprite sheets
    • Learning about texture formats
      • Using TexturePacker to create sprite sheets
      • Loading our first texture atlas
    • 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
      • Pausing and resuming the game
        • Displaying the pause and resume buttons on the screen
    • Time for action – putting buttons on the screen
      • Implementing the logic to pause and resume the game
  • Time for action – allowing the player to pause and resume
    • Aborting the current game
  • 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
    • Displaying our first text field
  • Time for action – adding a text field to the dialog
    • Explaining system fonts
    • Explaining bitmap fonts
    • Creating our very own bitmap font
  • Time for action – using bmGlyph to create a bitmap font
    • Displaying a text field with bitmap fonts
  • Time for action – using our bitmap font for a text field
  • Summary
  • Chapter 8: Artificial Intelligence and Game Progression
    • Artificial intelligence in theory
      • Explaining fuzzy logic
      • Explaining state machines
    • Letting the enemy ship move and attack
      • Moving the ship
    • Time for action – getting the enemy ship to move around
      • Attacking other ships
    • Time for action – the enemy should attack the player
      • Adding fuzzy values to the AI
    • Time for action – spicing up the AI with fuzzy values
    • Adding progression to our game
      • Adding a World class
    • Time for action – adding a World class
      • Updating the scene and dialog classes
    • Time for action – updating the scene and dialog classes
      • Adding game mechanics to the pirate cove
    • Time for action – making the pirate cove playable
      • Adding progression to the game
    • 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
      • Generating sound effects
      • Learning about audio formats
      • Music and sound effects for our game
    • Adding audio playback
      • Starting the audio engine
    • Time for action – getting audio files to play
      • Playing music in our scenes
    • Time for action – playing music in our scenes
      • Adding a sound effect
    • Time for action – sound effects in the pirate cove
    • Summary
  • Chapter 10: Polishing Our Game
    • Adding additional scenes
      • The game over scene
        • Creating the game over scene
    • Time for action – showing the game over scene
      • Connecting the game over scene
  • Time for action – having the game over scene show up
    • Adding a main menu
  • Time for action – integrating the main menu into our game
    • Adding an intro scene
  • 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
  • Time for action – creating a build for beta testers
    • Deploying an application
  • Time for action – deploying an application
  • Explaining Game Center
    • Integrating Game Center authentication
  • Time for action – integrating Game Center authentication
  • An overview of analytics services
    • Flurry analytics
    • Flox
  • Summary
  • Appendix : Pop Quiz Answers
    • Chapter 1, Getting Started with Sparrow
    • Chapter 2, Displaying Our First Objects
    • Chapter 3, Managing Assets and Scenes
    • Chapter 4, The Basics of Our Game
    • Chapter 5, Beautifying Our Game
    • Chapter 6, Adding Game Logic
    • Chapter 7, User Interface
    • Chapter 8, Artificial Intelligence and Game Progression
    • Chapter 9, Adding Audio to Our Game
    • Chapter 10, Polishing Our Game
    • Chapter 11, Integrating Third-party Services

Johannes Stein

Johannes Stein has been interested in software and game development for most part of his life. He has used a variety of technologies, programming languages, and platforms.In the last few years, he has worked as a freelancer using web and mobile technologies for a number of different companies and start-ups, working on several iOS apps and games. Among the technologies he used were Sparrow, cocos2D, and UIKit. He has co-authored the book Irrlicht 1.7 Realtime 3D Engine Beginner's Guide that was published in 2011 by Packt Publishing. He can be followed on Twitter: @Stoney_FD.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Sparrow iOS Game Framework Beginner’s Guide +    Microsoft BizTalk 2010: Line of Business Systems Integration =
50% Off
the second eBook
Price for both: $44.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • 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.

Approach

An easy-to-follow guide full of descriptive step-by-step procedures on how to develop a game for iOS. With each topic, a new challenge will be tackled to get a deeper knowledge of the Sparrow game framework and gain the skills to develop a complete mobile experience.

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.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software