DONKEY.BAS
Encyclopedia
Donkey, often known by its file name DONKEY.BAS, was a computer game written in 1981 and included with early versions of the PC-DOS
PC-DOS
IBM PC DOS is a DOS system for the IBM Personal Computer and compatibles, manufactured and sold by IBM from the 1980s to the 2000s....

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 distributed with the original IBM PC
IBM PC
The IBM Personal Computer, commonly known as the IBM PC, is the original version and progenitor of the IBM PC compatible hardware platform. It is IBM model number 5150, and was introduced on August 12, 1981...

. It is a driving
Driving
Driving is the controlled operation and movement of a land vehicle, such as a car, truck or bus.Although direct operation of a bicycle and a mounted animal are commonly referred to as riding, such operators are legally considered drivers and are required to obey the rules of the road...

 game in which the player must avoid hitting donkey
Donkey
The donkey or ass, Equus africanus asinus, is a domesticated member of the Equidae or horse family. The wild ancestor of the donkey is the African Wild Ass, E...

s. While extremely simple compared to later PC games, and to games available for other systems at the time of its release, DONKEY.BAS is arguably a predecessor of all IBM PC games. The game is also notable because it was co-written by 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...

 co-founder Bill Gates
Bill Gates
William Henry "Bill" Gates III is an American business magnate, investor, philanthropist, and author. Gates is the former CEO and current chairman of Microsoft, the software company he founded with Paul Allen...

.

History

When IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

 was developing the PC in the late 1970s and early 1980s it contracted Microsoft to develop an operating system and a version of the BASIC programming language to release with the new computer. The operating system was released as PC-DOS
PC-DOS
IBM PC DOS is a DOS system for the IBM Personal Computer and compatibles, manufactured and sold by IBM from the 1980s to the 2000s....

 when included with IBM PCs and 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...

 when sold separately by Microsoft. Both included versions of Microsoft BASIC
Microsoft BASIC
Microsoft BASIC was the foundation product of the Microsoft company. It first appeared in 1975 as Altair BASIC, which was the first BASIC, and the first high level programming language available for the MITS Altair 8800 hobbyist microcomputer....

.

DONKEY.BAS was written by Bill Gates
Bill Gates
William Henry "Bill" Gates III is an American business magnate, investor, philanthropist, and author. Gates is the former CEO and current chairman of Microsoft, the software company he founded with Paul Allen...

 and Neil Konzen
Neil Konzen
Neil Konzen was one of Microsoft's earliest employees. He was head of Microsoft's Macintosh programs projects, including MultiPlan and Word for the Mac in 1984...

 to demonstrate the IBM PC and the BASIC programming language's capability to produce interactive programs with color graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 and sound
Sound
Sound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing and of a level sufficiently strong to be heard, or the sensation stimulated in organs of hearing by such vibrations.-Propagation of...

.

The game continues to generate interest in part because of the involvement of Gates at a time when Microsoft was relatively small and only six years old. According to a speech delivered by Gates in 2001:
Apple's Andy Hertzfeld mentioned the game in a description of the Macintosh team's reaction to the 1981 IBM PC purchased for them by Steve Jobs "to dissect and evaluate," noting that the new computer shipped with "some games written in BASIC that were especially embarrassing:"
The first version of DONKEY.BAS was released in 1981, followed by version 1.10 in 1982. The operating systems with which the game was first distributed still work on modern computers with compatible BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

 and 5.25-inch floppy drives, however IBM BASICA which ran the program under PC-DOS 1.x requires ROM
Read-only memory
Read-only memory is a class of storage medium used in computers and other electronic devices. Data stored in ROM cannot be modified, or can be modified only slowly or with difficulty, so it is mainly used to distribute firmware .In its strictest sense, ROM refers only...

-based IBM Cassette BASIC
IBM Cassette BASIC
IBM Cassette BASIC was a version of the Microsoft BASIC programming language licensed by IBM for the IBM PC. It was included in the BIOS ROM of the original IBM PC. Cassette BASIC provided the default user interface if there was no floppy disk drive installed, or if the boot code did not find a...

, which modern computers do not have. The source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 is still available. The game may be played with the GW-BASIC
GW-BASIC
GW-BASIC was a dialect of the programming language BASIC developed by Microsoft from BASICA, originally for Compaq. It is compatible with Microsoft/IBM BASICA, but was disk based and did not need the ROM BASIC. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft...

 (original code) or QBasic
QBasic
QBasic is an IDE and interpreter for a variant of the BASIC programming language which is based on QuickBASIC. Code entered into the IDE is compiled to an intermediate form, and this intermediate form is immediately interpreted on demand within the IDE. It can run under nearly all versions of DOS...

 (adapted code) interpreters or in compiled
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 form (see "external links" below).

Game play

DONKEY.BAS is an extremely simple driving game in which the player controls a car
Automobile
An automobile, autocar, motor car or car is a wheeled motor vehicle used for transporting passengers, which also carries its own engine or motor...

 but cannot steer, accelerate or brake, only changing lanes to avoid a series of donkey
Donkey
The donkey or ass, Equus africanus asinus, is a domesticated member of the Equidae or horse family. The wild ancestor of the donkey is the African Wild Ass, E...

s on the road. There is no goal other than to avoid donkeys.

The game uses the CGA
Color Graphics Adapter
The Color Graphics Adapter , originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBM's first color graphics card, and the first color computer display standard for the IBM PC....

 display mode, the only colour graphics mode available on the original IBM PC. The mode allows four colours but in DONKEY.BAS there are usually only three on screen. The game's low-resolution graphics are very basic.

The center of the screen shows a vertical scrolling
Scrolling
In computer graphics, filmmaking, television production, and other kinetic displays, scrolling is sliding text, images or video across a monitor or display. "Scrolling", as such, does not change the layout of the text or pictures, or but incrementally moves the user's view across what is...

 road
Road
A road is a thoroughfare, route, or way on land between two places, which typically has been paved or otherwise improved to allow travel by some conveyance, including a horse, cart, or motor vehicle. Roads consist of one, or sometimes two, roadways each with one or more lanes and also any...

 with two lanes; the areas either side of the road are used for scores and instructions. The player's car is driving up the road and every few seconds a donkey will appear at random on one side of the road at the top of the screen. As the donkey moves down the screen the player can press the space bar
Space bar
thumb|250px|A [[computer keyboard]], Space Bar is on the bottom center of the keyboardThe space bar, spacebar, or space key, is a key on an alphanumeric keyboard in the form of a horizontal bar in the lowermost row, significantly wider than other keys. Its main purpose is to conveniently enter the...

 to switch between lanes to avoid the donkey. If the car hits the donkey, both car and donkey explode, and parts of the graphics are scattered to the four corners of the screen to the sound of a short monophonic
Monophony
In music, monophony is the simplest of textures, consisting of melody without accompanying harmony. This may be realized as just one note at a time, or with the same note duplicated at the octave . If the entire melody is sung by two voices or a choir with an interval between the notes or in...

 tune played through the PC speaker
PC speaker
A PC speaker is a loudspeaker, built into some IBM PC compatible computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven speaker. More recent computers use a piezoelectric speaker instead. The speaker allows software and firmware to provide...

. If the player avoids the donkey, it will scroll off the bottom of the screen, and after a few seconds another will appear. There is never more than one donkey on the screen at any one time.

The game keeps score between the player and the donkeys. If the car hits a donkey, the donkey gets a point and the player is returned to the start of the road. As the car avoids donkeys it moves slowly up the screen, giving the player less time to react when donkeys appear. If the car avoids enough donkeys the player receives a point and the car is moved back to the bottom of the road. The game displays the number of points earned by the player and donkey but does not end or change when a particular score is reached.

Apart from pressing the space bar, the only control available to the player is to press the Esc key
Esc key
On computer keyboards, the Esc key is a key labeled Esc or Escape that is used to generate the ASCII Escape character , the character code traditionally used to initiate an escape sequence...

 and quit the game.

The sprites rendered slightly differently between the QBasic interpreter and the original IBM BASICA/GW-BASIC interpreter.

Naming

Although on the game's title screen it is simply named Donkey, today it is often known by its file name as DONKEY.BAS or Donkey.bas. This was the name of the file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 containing the program and like all BASIC programs in DOS used the ".BAS" extension
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....

. All versions of DOS that came before Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

 displayed file names in upper case and this is often maintained when the game is referred to in writing.

Donkey .NET

As a programming example for the new .NET
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 platform and Visual Basic .NET
Visual Basic .NET
Visual Basic .NET , is an object-oriented computer programming language that can be viewed as an evolution of the classic Visual Basic , which is implemented on the .NET Framework...

 programming language, in 2001 Microsoft developed a game called Donkey .NET in homage
Homage
Homage is a show or demonstration of respect or dedication to someone or something, sometimes by simple declaration but often by some more oblique reference, artistic or poetic....

 to DONKEY.BAS. Donkey .NET is a three-dimensional driving game in which the aim is to hit donkeys. The game demonstrates to programmers how a Visual Basic .NET application can be structured and how to use various features of the .NET platform.

DONKEY.GB

DONKEY.GB is a free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 remake of the game in the modern Gambas
Gambas
Gambas is the name of an object-oriented dialect of the BASIC programming language as well as the integrated development environment that accompanies it. Designed to run on Linux and other Unix-like computer operating systems, its name is a recursive acronym for Gambas Almost Means Basic...

 variant of BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....

 for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 computers developed by Piga Software and hosted by icculus.org. The game requires a graphical layer unlike the original but features the same basic gameplay and artwork style. It is paced and scaled somewhat differently and allows players to win if they reach 10 points or to lose if the donkey gains 5 points. Piga released it on February 6, 2011 as part of their "Gambas Examples" collection.

External links

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