Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Games Sprockets

Apple Game Sprockets is a set of technologies designed to make life easier for game developers. They are designed specifically to provide the functionality that games need on the Macintosh: drawing to the screen, handling input devices, setting up multiplayer games, and simulating 3D sound sources. Most of these technologies are slowly being rolled into the general Mac OS system software releases so that at some point, the Sprockets will exist solely to provide compatibility with older versions of Mac OS.
Game Developer Icon
Apple Game Sprockets Documentation
A guide to the Apple Game Sprockets, in PDF form. An HTML version can be found on Apple's Technical Publications page. In addition, each Sprocket SDK has release notes and other documentation on late-breaking additions and new features found in the Game Sprockets.

Download Game Sprockets
DrawSprocket blank image DrawSprocket allows developers to easily utilize multiple (double or triple) buffering on the Macintosh for smooth display of graphic images. Multiple buffering is achieved by DrawSprocket using the best option available on the user's system -- true double buffering in hardware, page-flipping, efficient memory copies or through the traditional CopyBits function call. The game does not need to be aware of the hardware specifics to use this benefit.

DrawSprocket also enables configuration of display resolution or color depth without leaving the game environment (no need to access the sound and displays control panel) and screen sizing/blanking. A sprite engine, available through QuickTime may also be used in tandem with DrawSprocket.
InputSprocket blank image InputSprocket provides a compact API through which games can communicate with drivers for analog or digital joysticks and other game-oriented input devices in a plug and play fashion. It also provides user interface elements that allow player override of the default control options through specified dialog boxes. Mouse and keyboard support are also enabled, as are multiple input device support.

InputSprocket provides a thin layer for games to communicate with drivers for joysticks and other game-oriented input devices. The device driver provides a description of its axes, which the game uses to automatically configure its control options. The device driver also provides user interface elements that allow user override of the default control options. During game play, the states and transitions of device axes and buttons can be accessed by polling or by a simple event queue (not GetNextEvent).

The InputSprocket driver interface is simple and light-weight. The drivers themselves are fairly easy to write since they just need to communicate axis states and descriptions. Drivers are implemented as Shared Libraries, so access is very fast and 68000 emulation mode switches are kept to a minimum.

NetSprocket blank image NetSprocket provides standard, customizable user interface dialogs for configuration, log-in, and hosting a game across the network. A simple set of calls allows messages to be singlecast, multicast or broadcast to other machines within the game. A theoretical maximum of 2 billion users can simultaneously use NetSprocket across a broadband connection.

NetSprocket also provides transparent access to Internet-oriented gameplay and multi-player gaming. This API uses Open Transport for TCP/IP, AppleTalk (with support for LocalTalk, EtherTalk or TokenTalk) and modem communication access. By utilizing a client/server topology, it is possible for gamers to use multiple protocols in a single session and with minimal overhead (a total of 28 bytes are used per player for the message header). NetSprocket also support the creation of groups for broadcast of data to specific users across the network.

SoundSprocket blank image SoundSprocket incorporates a standardized API for accessing both traditional sound functions as well as new 3D sound technologies developed by Apple. For 3D sound, the listener and each sound channel are given specific positions and velocity vectors in a virtual audio space. These positions are changed during game play, along with the sounds themselves, to give the impression of spatiality and movement.

The signal processing, taking advantage of the capabilities of the PowerPC microprocessor, simulates Doppler Effect, distance attenuation, environmental reverberation and spatial positioning. The 3D effect may be effectively presented over speakers or headphones -- it is also fully integrated with the camera position used in QuickDraw 3D, which enables sound to "follow" the player in 3D space.

SoundSprocket provides real-time 3D sound processing on Sound Manager channels. The listener and each sound channel are given specific positions and velocity vectors in virtual audio space. The positions are changed during gameplay, along with the sounds themselves, to give the impression of space and movement. The signal processing simulates Doppler effect, distance attenuation, environmental reverberation and position in space. The effect may be presented over speakers or headphones.

Sprocket is a registered trademark of MacTech Magazine, used by permission.Apple Game Sprockets have no association with MacTech Magazine.

MacTech Logo

Published since 1984, MacTech Magazine is the established industry resourceof news and information for 50,000 Macintosh programmers and developers in60+ countries. It features articles and columns written by some of the industry'stop professionals (including Apple engineers), and includessource code, industry news, product reviews, conference reports, and muchmore. Phone: 800-MACDEV-1, 805-494-9797, Fax: 805-494-9798,

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice