From Allegro Wiki
If you want to use Allegro, you should be able to work comfortably with a computer and know the basics of programming in C or C++ either using an IDE or though the command line of your operating system. If you do not know how to program yet then please refer to the section Learn C or C++.
Choosing Which Branch of Allegro to Use
Allegro has three primary branches that you may choose to use:
- Stable branch, 5.0. This is the stable version of Allegro, with new features added only in a backwards compatible manner. Code using this branch of Allegro is guaranteed to compile release to release. This branch is generally more tested than the unstable branch. Also, pre-compiled binaries are more widely available for this branch. We do not recommend using this branch for iOS and Android development.
- Unstable branch, 5.1, also known as the "work-in-progress" (WIP) branch. This is the unstable version of Allegro, with new features added regularly without guarantee of backwards compatibility between minor releases. Code written using the stable API (i.e. the API from the 5.0 branch) will always compile under the unstable branch. In addition, the unstable branch has new and exciting features such as shader support, sound recording, video playback, and haptic output support. This branch also has better support for iOS and Android platforms. Don't let the unstable nature of this branch dissuade you. Many Allegro users use this branch successfully without much burden of keeping up with the API, although precompiled binaries for this branch are more rare than for the stable branch which means you will have to compile Allegro from source.
- Development branch, bleeding-edge build of the forthcoming unstable branch release. Use the development branch to contribute to Allegro. Instructions for installation can be found on the official Allegro web site.
Allegro can be installed either from pre-built binaries or from sources. If you are on Windows, the recommended way to install Allegro is to install from pre-built binaries. On Windows, it is time-consuming and error prone to compile and install the required supporting libraries of Allegro. On Linux it's recommended to install Allegro from sources. It's much easier on Linux to compile and install the supporting libraries than it is on Windows. On OSX it's recommended that you install MacPorts and then use this environment to build Allegro from sources.
Installing From Binaries
The tutorials below show you how to install Allegro with the pre-built binaries using different IDEs and compilers. If you don't see your system listed here, see the manual building instructions in the next section.
The latest binaries may be found here.
There is an additional repository hosted by Michal Cichon at http://targonski.nazwa.pl/thedmd/allegro/ which includes builds for 5.1.X.
- Installing with MSYS2
- Install Allegro from binaries for Microsoft Visual Studio 2008.
- Install Allegro from binaries for Microsoft Visual Studio 2010.
- Install Allegro from binaries for MinGW and Code::Blocks.
- Hiding the console window with Code::Blocks has additional information on using Code::Blocks.
Installing From Sources
These tutorials show how to build Allegro from it's sources, which is necessary if there are no pre-built binaries available for your system, or you want to try out the unstable version of Allegro outside of its snapshot releases.
Note that Allegro requires an up-to-date DirectX SDK.
- Building with msys2
- Building from git for XP/Vista/Win7/8 with MinGW
- Building Allegro 5.1 (rev 15032) Windows 7
- Notes on building with MSVC
- Install Allegro from sources for XCode 4 on OSX.
- OSX, Xcode 5, dylib
- OSX, Xcode 5, static libraries
- Install Allegro5 From Git. These instructions will also work on Linux if you skip the OSX specific parts.
- Install Allegro from sources on Debian + Ubuntu.
- Install Allegro from sources on CentOS/RHEL.
- Some Ubuntu-specific notes for installing Allegro.
For now, follow the directions in the README_android.txt found in the source distribution of Allegro.
Official Getting Started Guide
The official getting started guide is part of Allegro's official manual and will introduce you to the parts of the Allegro API that you will most likely need for developing a game of an audiovisual application.
These tutorials teach you how to use Allegro 5. Starting with the absolute bare necessities of display creation, and extending into all the various add-ons for music, and fonts and primitives.
These tutorials assume you are fairly competent in C or C++.
- Allegro 5 API Tutorials
- Allegro Vivace
- Tilemap Example
- Achieving Resolution Independence
- CodingMadeEasy Allegro 5 youtube video series
- Porting from A4 to A5
Problems Using Allegro
If you have problems using Allegro, this section provides help with what to do next.
At some point (usually sooner than later) you'll need help. There are two places where you can get help:
- allegro.cc - This is best place to get help, with many knowlegeable and helpful users ready to be of assistance. Just sign up for an account, and ask your question on the forums.
- #allegro at irc.freenode.net - The IRC often has people online that can provide live assistance. We sometimes get a little bit off-topic, but usually you'll find somebody to help you. You can access the IRC using your favorite desktop IRC client, or the webchat (type in #allegro in the list of channels you want to join).
This section contains various online resources that may be of interest if you use or want to learn how to use Allegro.
The manual will list every function and type that may be useful in your Allegro program:
The following three websites are the main Allegro websites with the most general purpose content. Of course there are many other sites related to Allegro, but for the most part you can find links to them from these listed below.
- Allegro Wiki You are here. This is the official wiki (maintained by Thomas Fjellstrom) for all things Allegro and includes helpful articles of all sorts.
- Allegro.cc A community website (maintained by Matthew Leverton) used mainly for the Depot (categorizes and hosts games) and the Forums. This is the best place to ask questions and keep in touch with the Allegro community.
- Official Allegro Website Hosted by SourceForge, the official website has the Allegro source, API reference, news, FAQs, etc.
External Recommended Websites
The following external web sites related to Allegro may be of interest to you.
- 2D Game Development Course using Allegro 5 - A set of video tutorials covering a wide variety of concepts needed to create simple games with Allegro 5
- C++ Allegro 5 Made Easy - A set of video tutorials covering a slightly different set of concepts than the above series
- Allegro 5 Book - A set of tutorials that cover some basic usage of Allegro 5
Learn C or C++
-  - An online C programming class.
-  - An online book that will teach you the basics of C programming. Recommended if you already know a different programming language than C.
Allegro In Depth
- Allegro 4 - Allegro 4 is an older, deprecated version of Allegro. Don't use it for new projects unless you have very good reason to.