Chapter 2. Tutorial

Table of Contents

Preparing the kit
Creating your first package
Texturing and positioning
The position attribute
The scale and rotation attributes
Grouping objects
Animation in your scene
The transition node
Grouping action nodes
The event node
User interaction
Responding to user clicks
What's next?

Preparing the kit

The first step is to download the Popcode Developer Kit.

Once the download has finished, run the exe and extract the kit. It contains a number of files and folders, including:

  • the Packages folder;

  • the Popcode Test Target folder; and

  • the SceneViewer application.

The Packages Folder

This folder is where you will work on content. In order to create a new package, simply create a new folder in Packages. The folder starts with a number of example packages that serve as a good introduction to the features that you may find useful in your own packages.

The Popcode Test Target Folder

The image that the Popcode application places the content on top of is called a target. The Image Trainer application makes it possible to use your own images as targets (see Training Images). This folder of the Kit contains a target that we've put together that you can use to test out your content ideas. Inside this folder is:

  • PopcodeTestTarget.png - a high-resolution image that can be printed out; and

  • - the corresponding target file that the Popcode app uses to recognise the printed image.

This tutorial will demonstrate the use of these files.


This application allows you to view the packages that you have been working on. Just double click to start it.

This version of SceneViewer requires a webcam. It should work with any webcam that you have as long as it supports output at 640 x 480 - almost all do. Future versions of SceneViewer will allow you to preview scenes without the requirement for a camera.

Once the application has started, use the Open tool to select a package to view.

Note: this application is for previewing packages in the Packages folder only - it will not recognize Popcodes.

Viewing on Mobile Devices

[Note]Not available on iPhone / iPod touch

The current version of Popcode for iOS does not support "Load from storage card" functionality. A later release may address this issue.

You can use the Popcode mobile application to see how your package runs on a mobile device.

  1. Download the application onto your phone - details on how to do this are available at the Get Popcode page.

  2. Check that the application works. Perhaps try some of the Popcode demos.

  3. Connect your mobile to your computer. Select "USB Storage mode", or equivalent, so that you can copy files onto the storage card.

  4. Copy your package's folder onto the storage card.

  5. Rename the folder to popcodecontent.

  6. Safely remove your phone and disconnect it.

  7. The content can now be viewed by starting the Popcode application and pointing it to the "local content" Popcode - shown below.

Figure 2.1. Load from storage card Popcode

Load from storage card Popcode