Book Image

Sparrow iOS Game Framework Beginner's Guide

By : Stein
Book Image

Sparrow iOS Game Framework Beginner's Guide

By: Stein

Overview of this book

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. 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 (15 chapters)
13
Afterword
14
Index

Managing our assets


Now that we know what assets are, how can we manage them for our game? Before we get to that, let's take a look at what we know so far and what the prerequisites to effectively load assets are.

Firstly, we know that there are different kinds of assets that can either be plain text files or binary.

One thing to keep in mind is the memory in mobile devices nowadays. While it is the same as the memory in desktop devices from a few years back, not all of this is reserved for our application. We should also keep in mind that the size of an asset on the disk may not be the same in memory as it is for compressed files, especially if the file content is compressed on the disk but has to be uncompressed in memory.

Consequently, there are a few things we can do, which are as follows:

  • Limit the number of assets we are loading; this can prove difficult as a game can require a high amount of assets

  • Limit the number of assets that are currently loaded in memory

  • Cache assets that are already...