Project Setup

To make it easy to create your own Xcode projects with Sparrow, the download package contains two projects that can serve as the starting point for your own games:

The Barebone Project

The Barebone project is the most lightweight way to set up Sparrow. It does only what is absolutely necessary: create an SPViewController with Sparrow content. The rest is up to you.

Use this project for your first tests with the Sparrow Framework. It's super lightweight and does not contain any content that might confuse beginners.

The Scaffold Project

The Scaffold project contains some more code that will help you get started, e.g. a Media class for easy access to your assets, method stubs for auto-rotation, etc. We will look at the project in more detail in a separate chapter.

Use that project as the basis for your actual game, as it saves you a lot of effort!

Creating your own Project

Whenever you start a new Sparrow project, choose an appropriate project from those two and follow these steps to use it as a basis for your game:

  1. Copy the complete folder to the place where you want to have your game project.
  2. Open the Xcode project.
  3. Build and run — just to see if everything works fine.
    • If it does not work, check if you have created the SPARROW_SRC variable in Xcode, if it points to the right place and has no spaces in its path.
  4. Rename the project:
    • Click directly on the project name in the Project Navigator to make it editable. Change the name and accept the requests of the popups that follow.
    • Click on “Product - Manage Schemes” and then on the Scheme name (“Scaffold” or “Barebone”) to rename that, too.
  5. Select the target hardware: iPhone / iPod Touch / iPad
    • Enter the project settings, tab: “Build”
    • Select the target of your choice for the setting “Targeted Device Family”

That's it!

All the sample code in this manual uses “ARC” by default (Automatic Reference Counting). In older Objective-C versions, you had to do a lot of manual memory management; with ARC, this is no longer necessary.

If you want to use Sparrow without ARC, you can do that, too. Just disable “Automatic Reference Counting” in the build settings of your project.


Next Section: The Barebone Project

  manual/project_setup.txt · Last modified: 2014/07/03 10:36 by daniel
 
Powered by DokuWiki