Allegro library

From Free net encyclopedia

{{Infobox_Software | name = Allegro | screenshot = Image:Allegro-logo.png | caption = Logo | developer = Allegro developers | latest_release_version = 4.2.0 | latest_release_date = November 7, 2005 | operating_system = Cross-platform | genre = Game SDK | license = Allegro license | website = alleg.sourceforge.net }}

The Allegro library is a free video game software library, with functions for basic 2D graphics, image manipulation, text output, audio output, midi music, input and timers, as well as additional routines for things like fixed-point and floating-point matrix arithmetic, unicode strings, file system access, file manipulation, data files, and (limited, software-only) 3D graphics. As of version 4.0, programs that use the library work on DOS, Microsoft Windows, BeOS, Mac OS X, and various UNIX systems with (or without) X Window System, abstracting their application programming interfaces into one portable interface.

Allegro is very simple and easy to use yet powerful. In that way it is different from many other graphics libraries such as DirectX or SDL that offer more advanced functionality.

The library is written in the C programming language and designed to be used with C or [[C++]]. Complete API documentation is available from the official website. The API reference manual can be automatically translated to many different formats with its makefile system and there are many mirrors of it. One of the mirrors is hosted on [1].

The library comes with full source code and is open source, using a simple permissive "giftware" license which allows copying, modification and distribution for any purpose. Along with the source code, it comes with countless examples, so that even someone with hardly any video game programming knowledge can study the examples and come up with a simple video game very quickly.

The community of Allegro users have contributed several library extensions to handle things like scrolling tile maps, import and export of various file formats (e.g. PNG, GIF, JPEG images, MPEG video, OGG, MP3, IT, S3M, XM music, TTF fonts, and more..).

Allegro can be used in conjunction with OpenGL by using the library AllegroGL which extends Allegro's functionality into OpenGL and therefore the hardware.

Contents

History of Allegro

Initially standing for "Atari Low-Level Game Routines" [2], Allegro was originally created by Shawn Hargreaves for the Atari ST in the early 1990s. However, Shawn abandoned the Atari version as he realized the platform was dying, and reimplemented his work for the Borland C++ and DJGPP compilers in 1995. Support for Borland C++ was dropped in version 2.0, and DJGPP was the only supported compiler. As DJGPP was a DOS compiler, all games which used Allegro therefore used DOS. Around 1998, Allegro branched out into several versions. A port to Microsoft Windows, WinAllegro, was created, and also during this time, a Unix port of Allegro, XwinAllegro, was created. These various ports were brought together during the Allegro 3.9 WIP versions, with Allegro 4.0 being the first stable version of Allegro to support multiple platforms. The current version of Allegro supports Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows (MSVC, MinGW, Cygwin, Borland C++), BeOS, QNX, Mac OS X, and DOS (DJGPP, Watcom). Shawn Hargreaves is no longer involved with Allegro.

The current version of Allegro is 4.2.0 stable. Following this release, the development will gradually shift focus to the so-called new API branch (also known as the 4.3.x series), which will feature a modern and revised API, as well as full hardware acceleration (The 4.2.0 version only can use HW acceleration for certain 2D drawing primitives, and usually only when using Windows/DirectX). Backwards compatibility will be maintained through an extra API layer emulating the old API. Work on the new API branch started in parallel with the 4.1.x series, meaning that a lot of the codebase has already been rewritten. The 4.2.x series will be the last utilising the old code base.

If you need HW accelerated 3D, or 2D acceleration working also for common Linux/OSX setups, it is best to use AllegroGL or OpenLayer, two add-on libraries, to harness OpenGL for accelerated graphics routines and use Allegro for all other gaming needs.

Comparison to other libraries

There are many other free libraries with overlapping functionality to Allegro around such as ClanLib. The most popular competitor is Simple DirectMedia Layer (SDL). Allegro is older than SDL, but SDL is in more widespread use. Both Allegro and SDL work under systems such as Linux, other UNIXes (FreeBSD, Solaris IRIX, etc.), Windows, QNX, BeOS and MacOS X. Additionally, Allegro works under DOS, while SDL works on older versions of Mac OS and Amiga. SDL also has been ported to console game systems/handheld game systems such as PS2, Xbox, Dreamcast, GP32, et al.

For both, numerous bindings to several other programming languages besides C exist.

Games using Allegro

See List of Games using Allegro for a complete list

See also

External links

fr:Allegro (bibliothèque) pl:Allegro (informatyka) pt:Allegro