← Macintosh Game Animation 1985

Macintosh Game Animation 1985

From the originals

12 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

Image 1

Osborne McGraw-Hill Macintosh™ Game Animation RON PERSON

A book cover with a cream background, red and black serif title text, and a colorful geometric composition of fanned chevron shapes, diamond checkerboard patterns, circles, and bars in red, orange, yellow, green, blue, purple, and teal.

Reading notes: Trademark symbol after Macintosh is small and may be approximated as ™. Publisher name is printed as 'Osborne McGraw-Hill' with the two words in different weights on the top left.

Languages
English
PDF page 1

Osborne McGraw-Hill Macintosh™ Game Animation RON PERSON

A book cover with a cream background showing a large red serif title, a black italic subtitle, and a colorful geometric abstract pattern of fanned chevron shapes, circles, diamonds, and a checkerboard-like grid of pale diamonds.

Reading notes: Publisher name 'Osborne McGraw-Hill' appears in small type at top left; spacing between 'Osborne' and 'McGraw-Hill' is tight in the scan. The trademark symbol ™ after Macintosh is small and may be partially obscured.

Languages
English
PDF page 2 · PDF page 3

The image is a entirely blank white page with no visible artwork, layout, or printed content.

PDF page 4

Published by Osborne McGraw-Hill 2600 Tenth Street Berkeley, California 94710 U.S.A. For information on translations and book distributors outside of the U.S.A., please write to Osborne McGraw-Hill at the above address. Macintosh is a trademark of Apple Computer, Inc. Macintosh •M Game Animation Copyright© 1985 by McGraw-Hill, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. 1234567890 DODO 898765 ISBN 0-07-881127-9 Paul Hoffman, Technical Editor Cheryl Creager, Composition Judy Wohlfrom, Text Design Yashi Okita, Cover Design

Printed product names
Macintosh
Printed dates
1985 · 1976
Languages
English
PDF page 5

The image is a entirely blank white page with no visible artwork, layout, or printed content.

Reading notes: No visible text found; the page appears blank.

PDF page 6

Table of Contents

Table of Contents Introduction ix Chapter 1 An Animation Primer 1 Chapter 2 Programming Style 11 Chapter 3 Macintosh ROM Routines and Picture Animation 19 Chapter 4 Image Animation 39

Languages
English
PDF page 7

Chapter 5 MacPaint 55 Chapter 6 Background Animation 75 Chapter 7 Collision Detection and Identification 93 Chapter 8 Program Presentation and Control 111 Chapter 9 Special Effects 143 Chapter 10 Developing Your Program 169 Chapter 11 Demonstration Programs 177 Appendix A Animation Toolkit 197 Appendix B MacBASIC Animation 227 Appendix C MacPascal Animation 237 Appendix D Additional Sources 245 Index 247

Reading notes: Source is a table of contents; no primary heading is explicitly printed, so headline is null.

Languages
English
PDF page 8

Introduction M acintosh Game Animation shows you how to create, animate, and manipulate figures, draw and animate backgrounds, use MacPaint draw- ings in your programs, and program a variety of special effects. Using the material you learn in Macintosh Game Animation, you will be able to program training simulators, animated storyboards for advertising, and games. In addition to the extensive animation and graphics demonstrations included in Macintosh Game Animation, four software utilities are given: the Pattern Maker, the Cursor Maker, the MacPaint-to-BASIC Converter, and the Animation Maker. These software programs allow you to create and test your own pattern and cursor designs and to convert MacPaint drawings stored in the Clipboard or Scrapbook into BASIC PICTUREs. The Animation Maker lets you test, edit, and save sequen- ces of animated figures for use in your own programs. The programs provided in this book will work with either a 128KB or 512KB Macintosh with either one or two disk drives. The programs are written for MS-BASIC version 2.0 or later versions. Earlier versions of Microsoft BASIC can run many of these programs, but line numbers must be added, and GOTO and GOSUB label references must be changed to reference these line numbers. This book will being with a one-chapter primer on animation. This is followed, ix

Reading notes: Line 'This book will being with' appears to contain a typo for 'begin'; spelling preserved as printed. Hyphenated line breaks (e.g., 'draw-ings', 'sequen-ces') may affect exact word forms.

Printed product names
Macintosh Game Animation · MacPaint · Pattern Maker · Cursor Maker · MacPaint-to-BASIC Converter · Animation Maker · Microsoft BASIC · MS-BASIC
Languages
English
PDF page 9

x Macintosh Game Animation in Chapter 2, by an explanation of how programs should be constructed with structured programming. The use of the Macintosh ROM drawing functions is described at the beginning of Chapter 3. The latter half of the chapter explains PICTURE motion and anima- tion. Chapter 4 describes a second form of animation that uses image arrays. Image arrays produce faster animation of complex figures than is possible with BASIC PICTURE animation. Two different types of background animation are explained in Chapter 5. One type animates rectangular screen sections as though displaying a movie behind the animated figures. This method allows backgrounds to display complex, repetitive motion. The second background animation method scrolls background scenes past the display. Scrolling the background allows figures to cover a much larger back- ground area than that enclosed by a single display screen. Chapter 6 demonstrates how to draw sequences of figures and backgrounds with MacPaint so that the figures and backgrounds can be used in your BASIC programs. MacPaint drawings can be very complex and detailed, but they will animate at the same speed as simple drawings. Computer animation has the advantage of making the figure react to player input and events onscreen. Figures must be able to detect and identify other figures and backgrounds they collide with. Chapter 7 demonstrates how to detect colli- sions, identify the object collided with, and give a reaction that is unique to the object struck. In MS-BASIC version 2.0 and later, your programs can control Macintosh windows, dialog boxes, menus, buttons, and edit fields. The discussion and pro- gram in Chapter 8 demonstrate how to use these Macintosh features and simul- taneously animate figures in multiple windows. You can even move, resize, and change the display order of the windows. Chapter 9 shows how special visual effects add pizazz to your programs. The effects range from those as simple as a ball bouncing under gravity to more complex effects, such as transforming an image array as the image figure moves. You are also introduced to the Macintosh multi-voice capability. Many of the book's techniques and special effects are brought together in the two demonstration programs of Chapter 11. The first program, "Satellite Intercep- tor," demonstrates how to detect collisions, animate a rotating satellite, control motion with the mouse, and animate a background. The second program, "The Four-Stroke Engine," simulates the internal operation of an engine. It demon- strates, on a simple level, how you can use animation in training and education. Users control engine operation by sliding gas flow and mixture control bars to new levels. The program reacts to these new levels by changing animation speed or presenting performance notes. Appendix A of this book includes four tools that will help you greatly when you

Reading notes: The opening fragment begins mid-sentence, so the reading order of the supplied excerpt may be incomplete.

Languages
English
PDF page 10

Introduction xi are programming animation and drawing. These four utilities are the Pattern Maker, the Cursor Maker, the MacPaint-to-BASIC converter, and the Animation Maker. Creating new Fill and Draw patterns with the Pattern Maker is easy. You turn pixels in the pattern on and off by pointing to them with the mouse cursor and pressing the mouse button. The number code for each pattern you create displays onscreen. Creating a cursor shape by hand is long, tedious, and liable to error. The Cursor Maker allows you to create both a Cursor Data pattern and Mask Cursor pattern by pointing the mouse cursor and clicking the button. You can create and test new cursors rapidly and easily. The resulting cursor array data can be printed to an Imagewriter or saved to disk and merged with your BASIC programs. MacPaint produces superior sequences of complex and detailed figures and backgrounds. The Converter program changes MacPaint drawings stored in the Clipboard or Scrapbook into BASIC PICTUREs. These PICTUREs can be stored on disk and used in your BASIC programs and the Animation Maker. Creating sequences of realistically animated figures would be difficult without the Animation Maker. The Animation Maker lets you convert BASIC PICTUREs into animation sequences of up to nine eels per sequence. You select the size of the animation eel. Sequences can be tested animating at different speeds, directions, and timing delays. When your figures animate the way you want, you can save them to disk as PICTUREs or images. Storing figures on disk gives your programs access to more and higher quality figures. The four tools listed in Appendix A and the two demonstration programs from Chapter 11 are available on a Macintosh formatted disk. They require binary MS-BASIC version 2.0 or a later version. To purchase your disk, send $19.95 (check or money order) to: Animation Magic Macintosh Box 552 Suisun City, CA 94585 Please indicate that you wish to purchase the ANIMATION MAGIC Toolkit Disk for the Macintosh. California residents, please add state sales tax.

Reading notes: Introduction heading and page number 'xi' at top are partial fragments; the text begins mid-sentence Some words are split across line breaks with inconsistent spacing; reading order is continuous

Printed product names
Pattern Maker · Cursor Maker · MacPaint · Converter · Animation Maker · Macintosh · BASIC · MS-BASIC · ANIMATION MAGIC Toolkit Disk for the Macintosh · Imagewriter
Printed prices
$19.95
Printed dates
CA 94585
Languages
English
PDF page 11

Chapter 1 An Animation Primer

Chapter 1 An Animation Primer 0 ur eyes can be tricked into seeing lifelike movement by viewing rapidly changing sequences of still images. This is how animation works. In this chapter you will be introduced to the concepts of animation as a foundation for creating the figures used in computer games. Once you learn the basics, you will be ready to create animation sequences with MacPaint or the Image Maker utility described in Appendix A. A History of Animation Animation had its beginnings in flip books, which are composed of a series of drawings illustrating each step in the action of a motion sequence. By quickly flipping through the pages, the viewer could animate the drawings in the book. During the 1880s, Eadweard Muybridge made photographic studies of human and animal motion. Each sequence was photographed frame by frame and then projected with the zoetrope, an instrument that rapidly moved the sequence to produce animation. Muybridge's work established the basis for modern film ani- mation and continued to serve as a source of information for animators. With the advent of motion pictures, cartoonists like Walt Disney were able to 1

Reading notes: Drop cap 'O' in 'Our eyes' appears as a separate character and may be a layout artifact

Printed dates
1880s
Languages
English
PDF page 12

2 Macintosh Game Animation produce realistic animation. In traditional film animation, each single image of a sequence is called a eel. Rapidly displaying these individual units produces eel-by-eel animation. Cels are drawn with pen, paint, or other media and then photographed. The images can then be projected in rapid sequence. A computer can be used to animate images in a manner similar to film anima- tion. A series of eels is stored in memory and then rapidly displayed on the screen, rather than projected as in film animation. Most computer graphics images are created with pixels, the"dots" that make up the display screen. An image created with pixels has jagged edges because it is composed of dots rather than smooth, hand-drawn lines. Because a line of pixels looks very different from a pen or pencil line, the fine detail and realism of film animation is not available with computer graphics animation. However, the high degree of resolution in the Macintosh produces images that appear much smoother than those of other personal computers. When designing your animation, remember that you will be drawing with pixels, not pencil or paint. In this chapter, figures are drawn with both lines and pixel shapes. By comparing the two types of drawings, you will more easily see how to generate animation figures on the Macintosh. In some instances it is easier to think of "sculpting" figures made of pixels than to think of drawing with pixels. Macintosh Animation Methods The Macintosh computer can utilize two different methods for creating and animating images: • Picture Animation • Image Animation The first method, Picture Animation, rapidly draws sequences with the Macintosh drawing routines stored in Read-Only Memory (ROM). They are drawn so fast that they appear to the eye as one image that is changing or moving. The second method used with the Macintosh is Image Animation. In Image Animation, a rectangular image of any size or pixel pattern is stored as numeric information in an array. The stored image can then be redisplayed anywhere on the screen with the PUT statement. Rapidly displaying sequences of different images with PUT can create animation. Image Animation has the advantage of being able to manipulate images and the backgrounds they cover to produce special effects. Depending upon the type of program, the Macintosh can animate figures by displaying sequences of eels generated with Picture or Image Animation. But there is more to creating good animation than simply drawing a sequence of eels and displaying it on the screen. You must first understand how movements are broken up into sequences and how figures are designed to move realistically.

Reading notes: The word 'eel' appears repeatedly where 'cel' is likely intended, possibly an OCR error

Languages
English