Game Sprockets
Encyclopedia
Game Sprockets is a collection of application programming interfaces (APIs) supporting gaming on the classic Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

. It consisted of four main parts, DrawSprocket, InputSprocket, SoundSprocket and NetSprocket, each providing a library of pre-rolled routines for common gaming tasks. SpeechSprocket was a relabelled version of the Speech Recognition Manager that provided speech recognition
Speech recognition
Speech recognition converts spoken words to text. The term "voice recognition" is sometimes used to refer to recognition systems that must be trained to a particular speaker—as is the case for most desktop recognition software...

 support, and QuickDraw 3D RAVE
QuickDraw 3D
QuickDraw 3D, or QD3D for short, is a 3D graphics API developed by Apple Inc. starting in 1995, originally for their Macintosh computers, but delivered as a cross-platform system....

 provided 3D hardware acceleration.

Game Sprockets was first released in 1996, and saw only minor use before development was cancelled in 1997. OS X included many of the same features in the built-in libraries, while OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

 replaced RAVE as the 3D acceleration layer. NetSprocket lives on as OpenPlay
OpenPlay
OpenPlay is the name of an open source cross-platform networking library created by Apple Computer. OpenPlay compiles and runs on the Mac OS, Mac OS X, Windows and Linux operating systems. OpenPlay is a high-level networking solution for game applications...

, although adoption is limited.

Background

Early in its history, the Macintosh computer was a strong gaming platform due to its high-resolution screen, digital sound hardware and the fact that every Mac came equipped with a reasonable gaming controller, the mouse
Mouse (computing)
In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons...

. However, gaming was never supported in any strong way within Apple, and in some cases actively discouraged. By the 1990s the Mac platform had greatly increased in complexity through a profusion of models with different features. Supporting a game across the entire lineup required the programmer to learn the intricacies of different models at a time when even figuring out which machine the program was installed on had no standard solution.

By the mid-90s, PC gaming had evolved into a powerful market of its own, one of the drivers for new computer purchases. During the move from MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 to Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, several Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 staffers noticed that game developers were generally ignoring Windows due to the better performance available under DOS. They decided that Windows needed to support first-class gaming, and set about ensuring that Windows would become the preferred gaming platform in the future. The result was the introduction of the DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 libraries, which greatly reduced complexity and addressed many of the performance concerns. As 3D games became widespread, the library's Direct3D
Direct3D
Direct3D is part of Microsoft's DirectX application programming interface . Direct3D is available for Microsoft Windows operating systems , and for other platforms through the open source software Wine. It is the base for the graphics API on the Xbox and Xbox 360 console systems...

 became a decisive advantage, and DirectX grew to become almost universal for PC gaming.

By the mid-90s, gaming on the Mac was largely dead. The combination of high prices, stagnating sales, poor performance and a lack of a DirectX-like system all resulted in the game developers leaving the Mac field in droves. As it was in Microsoft, several Apple staffers took it upon themselves to redress this problem, led by Chris DeSalvo. The result was a two-pronged effort; on one side was the Game Sprockets libraries (along with RAVE), and on the other was a single target gaming platform, the Pippin.

Short life

Game Sprockets was released on 29 March 1996, just before that year's WWDC. This was the same show that saw the widespread introduction of Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

.

Game Sprockets was one of many Apple technologies that ended development after the return of Steve Jobs
Steve Jobs
Steven Paul Jobs was an American businessman and inventor widely recognized as a charismatic pioneer of the personal computer revolution. He was co-founder, chairman, and chief executive officer of Apple Inc...

 to the CEO position at Apple. Its death was announced in a March 1997 press release, as part of a wide series of layoffs and restructuring as the company moved to a Mac OS X based future. DeSalvo wrote a fairly lengthy open letter on the topic, noting that Sprockets might come to life again in the future.

Description

GameSprockets included four main libraries and two associated ones, discussed in turn below.

DrawSprocket

Unlike the pre-Windows PC system, displaying high-resolution color images had always been easy on the Mac. However, getting details about the resolution and color depth of the machine they were running on required a number of "tricks". Additionally, common gaming tasks, like switching resolutions or fading to black
Fade (lighting)
In stage lighting, a fade is a gradual increase or decrease of the intensity of light projected onto the stage. The term fade-in refers to gradually changing the lighting level from complete darkness to a predetermined lighting level. A fade-out refers to gradually decreasing the intensity of...

, had intricacies that required the programmer to adjust for differences in color depth that most ignored.

DrawSprocket was a library of utilities to help the programmer address these common problems. Among its many separate functions were calls to allow the user to select a "main monitor" for the game, cleanly finding and switching resolutions, various routines for fading from one image to another (instead of just "to black"), displaying background images and various similar utilities.

A major portion of DrawSprocket provided an abstraction layer for page flipping. Some Macs included the ability to page flip in hardware, while others did not. DrawSprocket provided a single API that worked on any machine, using the hardware if it was available, or falling back to custom-tuned software blitters if it did not. Related code allowed developers to easily create multiple framebuffer
Framebuffer
A framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data.The information in the memory buffer typically consists of color values for every pixel on the screen...

s to draw into, and then use the page flipping calls to quickly display them.

InputSprocket

The Mac had always shipped with an input device suitable for gaming, the mouse. Even in cases where other devices were better suited to gaming, like joysticks, it was relatively easy to make the devices emulate mouse or keyboard input. However, this model stopped working well as joysticks with increasing complexity were released in the 1990s. New models had several axes controlled by potentiometers with linear input, and in these cases mouse emulation simply didn't work.

The solution was InputSprocket. InputSprocket allowed the hardware vendor to provide a driver for any possible input device. The driver not only handled communications with the input device, but also presented a list of capabilities to the InputSprocket manager. InputSprocket displayed all installed drivers in a single, universal, control panel. Games linking to InputSprocket then provided a list of the operations they wanted the user to control. Through the control panel, the user could map any operation to any input. Apple supplied drivers for mice and keyboards.

InputSprocket was one of the most widely used of the Game Sprockets, and drivers were supplied for many devices that worked on the Mac. This was greatly expanded by mapping InputSprocket onto the similar Human Interface Device
Human interface device
A human interface device or HID is a type of computer device that interacts directly with, and most often takes input from, humans and may deliver output to humans. The term "HID" most commonly refers to the USB-HID specification. The term was coined by Mike Van Flandern of Microsoft when he...

 system that is part of the USB standard. This meant that almost any USB input device would work to at least some level with InputSprocket without any effort on the part of the developer or the user.

SoundSprocket

The Macintosh's Sound Manager
Sound Manager
The Sound Manager is a part of the classic Apple Macintosh operating system, in Mac OS. It is used to control the production and manipulation of sounds on Macintosh computers. The Sound Manager is also used by other parts of the Macintosh system software that produce sounds, such as the Speech...

 supported digital sound from the earliest versions, and stereo for much of its evolution. SoundSprocket added to this support by including systems to simulate 3D sound. Programmers could add SoundSprocket support to their programs and link in-game objects to sounds that would appear localized in space.

NetSprocket

NetSprocket provided an abstraction layer that made it easy for developers to add networking support to their games. NetSprocket supported either AppleTalk
AppleTalk
AppleTalk is a proprietary suite of protocols developed by Apple Inc. for networking computers. It was included in the original Macintosh released in 1984, but is now unsupported as of the release of Mac OS X v10.6 in 2009 in favor of TCP/IP networking...

 or TCP/IP, and supported naming of games, player and providing passwords. It used a client/server architecture, and included an option to allow a host to run just the networking code without the graphics. NetSprocket also included functionality to assign player ID's, teams, and player types (players, observers, etc.) NetSprocket also provided code for message passing, although the protocol of those messages was left to the programmer.

NetSprocket was the one portion of Game Sprockets that lived on after the project as a whole was downsized. The code was released into open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 by Apple and further developed with new functionality and multiple platform support. The latest versions support Mac OS,
Windows and Linux.

SpeechSprocket

SpeechSprocket was included in Game Sprockets, but consisted of nothing more than a re-badged version of the existing Speech Recognition Manager.

QuickDraw 3D RAVE

Like SpeechSprocket, QuickDraw 3D RAVE
QuickDraw 3D
QuickDraw 3D, or QD3D for short, is a 3D graphics API developed by Apple Inc. starting in 1995, originally for their Macintosh computers, but delivered as a cross-platform system....

 was considered to be part of the overall Game Sprockets technology, although it was developed and supported separately. RAVE was a thin hardware abstraction layer similar to DirectX's Direct3D
Direct3D
Direct3D is part of Microsoft's DirectX application programming interface . Direct3D is available for Microsoft Windows operating systems , and for other platforms through the open source software Wine. It is the base for the graphics API on the Xbox and Xbox 360 console systems...

.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK