Allegro is a
software library for
video game development. The functionality of the library includes support for basic 2D graphics, image manipulation, text output, audio output,
MIDI music, input and timers, as well as additional routines for fixed-point and floating-point
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** '' The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
arithmetic,
Unicode strings, file system access, file manipulation, data files, and 3D graphics. The library is written in the
C programming language
''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
and designed to be used with C,
C++, or
Objective-C, with
bindings available for
Python,
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
,
Scheme,
D,
Go, and other languages. Allegro comes with extensive documentation and many examples.
Allegro supports
Windows,
macOS,
Unix-like systems,
Android
Android may refer to:
Science and technology
* Android (robot), a humanoid robot or synthetic organism designed to imitate a human
* Android (operating system), Google's mobile operating system
** Bugdroid, a Google mascot sometimes referred to ...
, and
iOS, abstracting their
application programming interface
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how t ...
s (APIs) into one portable interface. It can run also on top of
Simple DirectMedia Layer which is used to run Allegro programs in web browser using
Emscripten
Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly (or to a subset of JavaScript known as asm.js, its original compilation target before the advent of WebAssembly in 2017), primarily for execution in we ...
.
Released under the terms of the
zlib license, Allegro is
free and open source software.
History
Initially standing for ''Atari Low-Level Game Routines'', Allegro was originally created by for the
Atari ST
The Atari ST is a line of personal computers from Atari Corporation and the successor to the Atari 8-bit family. The initial model, the Atari 520ST, had limited release in April–June 1985 and was widely available in July. It was the first pers ...
in the early 1990s. However, Hargreaves abandoned the Atari version as he realized the platform was dying, and reimplemented his work for the
Borland
Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment product ...
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
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.
Allegro 5
Current development is focused on the Allegro 5 branch, a complete redesign of both the API and much of the library's internal operation. Effort was made to make the API more consistent and multi-thread safe. By default, the library is now hardware accelerated using OpenGL or DirectX rendering backends where appropriate. Many of the addons that existed as separate projects for Allegro 4 now interface seamlessly with Allegro proper and are bundled with the default installation. Allegro 5 is
event driven.
Features
Allegro 5 supports following features in its Core API:
* Configuration files – INI format file handling
* Displays - working with windows
* Events - event management
* File I/O - abstraction over both real files and files inside some data file (e.g. ZIP * archive)
* Filesystem - abstraction over both real file system and file system inside some data file (e.g. ZIP archive)
* Fixed point math - might useful for embedded processors without FPU
* Fullscreen modes
* Graphics routines - colors, pixel formats, bitmaps, clipping
* Haptic routines - force feedback and vibration on input devices
* Joystick routines
* Keyboard routines
* Memory management
* Monitors
* Mouse routines
* Path structures - file path manipulation
* Shader
* State - you can store and later restore the state of Allegro application
* System routines
* Threads
* Time
* Timer
* Touch input
* Transformations – transformation of coordinates for 2D and 3D
* UTF-8 string routines
* Direct3D integration
* OpenGL integration
Addons
The community of Allegro users have contributed several library extensions to handle things like scrolling tile maps and import and export of various file formats. Also some parts of what used to be part of Allegro, is now separated as an addon in Allegro 5. These addons are distributed with the core library:
* Audio addon
* Audio codecs - .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc
* Color addon - color space conversion
* Font addons
* Image I/O addon - BMP, DDS, PCX, TGA, JPEG, PNG
* Main addon
* Memfile addon - treat a fixed block of contiguous memory as a file
* Native dialogs addon
* PhysicsFS addon - using archive as a file system
* Primitives addon - drawing primitives (e.g. circle)
* Video streaming addon
See also
*
Borland Graphics Interface
The Borland Graphics Interface, also known as BGI, was a graphics library bundled with several Borland compilers for the DOS operating systems since 1987. BGI was also used to provide graphics for many other Borland products including the Quattro P ...
(BGI)
*
ClanLib
ClanLib is a video game SDK, supporting Microsoft Windows, macOS, and Linux, with partial support for mobile platforms. It has full hardware accelerated graphics support through OpenGL, and also a software renderer. ClanLib also helps in playing ...
*
DirectX
Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
*
List of game engines
*
Microsoft XNA
*
OpenAL
*
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
* OpenML
*
Raylib
*
SciTech SNAP
*
SDL
*
SFML
*
UniVBE
References
External links
*
Allegro WikiGames Using AllegroShawn Hargreaves's Homepage
{{Video game engines
AmigaOS 4 software
Application programming interfaces
C (programming language) libraries
Cross-platform software
Free game engines
Free software programmed in C
Graphics libraries
Linux APIs
MacOS APIs
MorphOS software
Software using the zlib license
Video game development software
Widget toolkits
Windows APIs