Magic Cap Programming


Course Description

This two-day course enables programmers to create Magic Cap packages. Students will work through hands-on programming exercises to learn the secrets of Magic Cap, its debugging tools, and the Magic Developer environment, and will construct a complete Magic Cap game package.

Target Audience

Programmers with prior and extensive programming experience. Students will complete hands-on exercises so all should be prepared for programming Magic Cap packages! . Class size is limited to 12 students; class may be canceled if fewer than 8 students register.

Course Outline

Prerequisites

At least 1 year of C and object-oriented programming experience are required in order to complete this programming course successfully. Experience with Macintosh and Macintosh MPW is highly recommended.

Price

Open-enrollment courses

$800 per student

On-site courses (USA)

$11,000 for 10 students or fewer (*), $900 for each additional student

On-site courses (International)

$13,00 for 10 students or fewer (*), $900 for each additional student

Dedicated courses

$8,000 for 10 students or fewer, $800 for each additional student

(*) Includes instructor travel expenses


Sections and Objectives

Using The Magic Cap Simulator

Magic Cap comes in many forms, in releases for handheld communicators, for desktop use, and for developers. This section discusses the developer version of Magic Cap and how it differs from the communicator version.

By the end of this section, you should be able to:

The Magic Cap Object Model

This section introduces the concepts behind Object-Oriented Programming as implemented in Magic Cap and introduces the terminology Magic Cap programmers use when talking about objects.

By the end of this section, you should be able to:

Creating objects at compile time

Since Magic Cap is an object-oriented system, a Magic Cap package is a collection of objects that interact with each other and with Magic Cap. Some of these objects are created when the package is compiled and others will be created as the package runs. Most packages contain a large number of objects which have been compiled in.

At the end of this section, you should be able to:

Magic Cap Viewables

The Magic Cap classes provide a broad range of features that handle user interaction with the device, objects that are drawn on the screen and manipulated by users, and high-level implementations of communication that are abstracted from details of the actual devices. The part of the Magic Cap software covered by these classes is roughly equivalent to the user-interface toolkit of a personal computer with a graphical user interface.

Class Viewable is the Magic Cap class that defines how objects will draw themselves on the screen and respond to interactions with the user.

At the end of this section, you should be able to:

Data input viewables

This section describes some viewable classes you will use when getting information from your package's user.

At the end of this section, you should be able to:

Magic Developer

Any significant Magic Cap package requires custom C code, changes to Objects.Def, and new classes. All of these changes are made using Magic Developer &endash;a Macintosh-hosted development environment.

By the end of this section, you should be able to:

Memory, Part 1

This section introduces how Magic Cap objects behave in RAM how objects are allocated, how the operating system locates an object to execute a particular method, and how Magic Cap packages can appear to change objects in ROM.

By the end of this section, you should be able to:

Creating custom objects

At this point of the course, you get to graduate from using the object classes built into Magic Cap to creating object classes of your own.

At the end of this section, you should be able to:

Defensive Programming

Now that we're beginning to write custom code for Magic Cap, the spectre of debugging raises its ugly head. The following short section explains how Magic Cap operations work at the machine level and shows a few simple debugging command and bug-prevention strategies

Since Magic Cap communicators are designed to hold information permanently (or until the user makes a conscious decision to delete something), programmers need to be extra careful when developing their packages. For these reasons, packages should incorporate code that enables them to report possible error conditions early in testing and to recover gracefully when errors occur.

At the end of this section you should be able to:

Memory, Part 2

We'll now proceed to discuss how Magic Cap objects behave in memory. You have to understand this before you can allocate or destroy objects at runtime. We'll also describe indexicals, which are objects shared between the system and packages or between packages.

At the end of this section you should be able to:

Using MagicScript

Magic Cap includes a simple interpreted language that can be used by developers (and one day may become available to end users.) This language can be a useful tool during the package development process, so we'll present it here.

By the end of this section, you should be able to:

Magic Cap Packages

The culmination of the package development process is constructing a package that knows how to install itself into Magic Cap.

By the end of this section you should be able to: