Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Bazaar » Allegro5 - Allegro game programming library v5.x
Allegro5 - Allegro game programming library v5.x [message #36963] Wed, 01 August 2012 03:24 Go to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 299
Registered: November 2008
Experienced Member
Homepage:
http://alleg.sourceforge.net

License:
zlib

Version:
5.1.9 (Jan 3, 2015)

Description:
Allegro 5 is cross-platform library mainly aimed at video game and multimedia programming. It handle common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.

According to the Oxford Companion to Music, Allegro is the Italian for "quick, lively, bright". It is also a recursive acronym which stands for "Allegro Low LEvel Game ROutines". Allegro was started by Shawn Hargreaves in the mid-90's but has since received contributions from hundreds of people over the net.

Allegro 5 is the latest major revision of the library, designed to take advantage of modern hardware (e.g. hardware acceleration using 3D cards) and operating systems. Although it is not backwards compatible with earlier versions, it still occupies the same niche and retains a familiar style.

Allegro v5.1 supports the following platforms:
- Unix/Linux
- Windows (MSVC, MinGW)
- MacOS X
- iPhone
- Android

Allegro only supports 2D graphics primitives natively, but it is perfectly reasonable to use Allegro alongside a 3D API (e.g. OpenGL, Direct3D, and higher level libraries), while Allegro handles the other tasks. Allegro is also designed to be modular; e.g. if you prefer, you can substitute another audio library.

Documentation:
http://alleg.sourceforge.net/a5docs/refman/index.html

In the attachments you could find Allegro5 source code and addons converted to U++ packages and documentation (in pdf format).

To note:
Originally, Allegro5 uses CMake build system, which generates special configuration header files for supported platforms and available dependencies/features. The packages in the attachments are configured to support Windows and Unix/Linux operating systems only with specific dependencies, but other (e.g. *.m for MacOS X and IPhone, etc.) files still there, if you want to include them to build and configure.
Also this is slightly modified version of Allegro5 to support U++ package structure and features.

Requirements:
1. Third party dependency libraries (as U++ packages) from below message with following configured assembly package nests:
Allegro;Libraries;upp\uppsrc
where Allegro - the path of extracted Allegro5 libraries; Libraries - the path with third party dependency libraries; upp\uppsrc - the path to U++ uppsrc directory with *.upt templates to create packages.

2. a) On Windows you need to install DirectX SDK headers and libraries and configure them for appropriate TheIDE builder(s), e.g.
for MSC compiler: download and install June 2010 SDK and add following paths to TheIDE builder:
Include directories:
C:\Program Files\Microsoft DirectX SDK\Include
LIB directories (for 32 bit operating system):
C:\Program Files\Microsoft DirectX SDK\Lib\x86
LIB directories (for 64 bit operating system):
C:\Program Files\Microsoft DirectX SDK\Lib\x64
for MinGW GCC compiler: Download and extract dx9mgw.zip to preferred directory. Then add include and lib directories to TheIDE builder respectively.

2. b) On (Ubuntu based distributive of) Linux you need to install:
- Development libraries for X11: xorg-dev
- Development libraries for OpenGL: libgl1-mesa-dev, libglu-dev
- Development libraries for GTK (native dialog support): libgtk2.0-dev

Edit: Updated to 5.1.9 (WIP) version.

[Updated on: Mon, 02 February 2015 16:12]

Report message to a moderator

Allegro5 - Examples and demos [message #36964 is a reply to message #36963] Wed, 01 August 2012 03:26 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 299
Registered: November 2008
Experienced Member
In the attachments you could find U++ packages for Allegro5 with examples and demos.
They require data files to run, which you could download from here (about 4.86 Mb) or by extracting following directories from release archive (about 5.95 Mb) to data directory:
allegro/examples/data -> data
allegro/demos/cosmic_protector/data -> data
allegro/demos/skater/data -> data
Place them to the same directory, where you extracted Allegro5 library or add additional assembly.
After building of applications, move them near data directory to run. The place of data directory might be different on Unix/Linux operating systems.

To note:
This is modified version of Allegro5 examples and demos to support U++ package structure and features.
Also I fixed possible memory leaks on application(s) exit and changed some data paths.
Checksums for data zip archive

Edit: Updated to 5.1.9 (WIP) version.

[Updated on: Mon, 02 February 2015 16:20]

Report message to a moderator

Allegro5 - Third party libraries [message #36965 is a reply to message #36963] Wed, 01 August 2012 03:33 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 299
Registered: November 2008
Experienced Member
In the attachments you may find U++ packages with following Allegro5 third party libraries:

AL - OpenAL cross platform audio library (v1.13)
bzlib - bzip2/libbzip2 - a program and library for lossless, block-sorting data compression (v1.0.6)
freetype - FreeType 2 font engine (v2.4.11)
jpeg - JPEG image file format (v9a)
ogg - Ogg - Media container (v1.3.2)
physfs - PhysicsFS - a portable, flexible file i/o abstraction (v2.0.3)
png - PNG image file format (v1.6.16)
theora - Theora - Video codec (v1.2.0alpha)
vorbis - Vorbis - Audio codec (v1.3.4)
zlib - zlib compression library (v1.2.8)

Edit: Removed png/CHANGES file to reduce file size of attached archive, because of file size requirements.

[Updated on: Sun, 22 January 2017 14:25]

Report message to a moderator

Re: Allegro5 - Third party libraries [message #36966 is a reply to message #36965] Wed, 01 August 2012 09:12 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3120
Registered: August 2008
Ultimate Member
Shocked

A huge job!


Best regards
IƱaki
Re: Allegro5 - Third party libraries [message #36974 is a reply to message #36965] Fri, 03 August 2012 03:38 Go to previous messageGo to next message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
I had a hard time compiling the 'skater' and 'a5steroids' exemples in Windows because MSC compiler was complaining about multiple copy of _main function in 'barkmel.obj', previously defined in skater.c and a5teroids.cpp, respectively. Just commented out main definition in vorbis/lib/barkmel.c and it solved the problem. I'm just thinking that others might have the same issue, so here is the solution.

tks.
Re: Allegro5 - Third party libraries [message #36975 is a reply to message #36974] Fri, 03 August 2012 04:17 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 299
Registered: November 2008
Experienced Member
Hello, Edson.
kropniczki wrote on Fri, 03 August 2012 03:38

I had a hard time compiling the 'skater' and 'a5steroids' examples in Windows because MSC compiler was complaining about multiple copy of _main function in 'barkmel.obj', previously defined in skater.c and a5teroids.cpp, respectively. Just commented out main definition in vorbis/lib/barkmel.c and it solved the problem. I'm just thinking that others might have the same issue, so here is the solution.

Thank you, for pointing this out. Also, just enough to remove such "vorbis/lib/barkmel.c" application from vorbis U++ package. I uploaded fixed archive to the "third party libraries" message.
(Un)fortunately, I didn't have such problems with my versions of compilers, therefore I didn't see such kind of error.
Allegro5 - Scope addon [message #37102 is a reply to message #36963] Wed, 22 August 2012 21:11 Go to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 299
Registered: November 2008
Experienced Member
There are some ALLEGRO_* types, which require resource management, such as ALLEGRO_BITMAP, ALLEGRO_DISPLAY, ALLEGRO_EVENT_QUEUE with al_destroy_bitmap, al_destroy_display, al_destroy_event_queue function respectively, etc.

For such cases I created allegro5/scope C++ addon. It consist of:
- al_destroy template function, which invokes appropriate al_destroy_* function, based on argument type:
Toggle example

- Scope template class, which uses al_destroy template function on scope completion:
Toggle example

- ScopeList class, which has container to store ALLEGRO_* types (actually, as void *) and invoke approriate al_destroy_* function (in some predefined order, e.g. al_destroy_display function used last) on scope completion:
Toggle example

Some notes:
The allegro5/allegro_scope.h header file is context sensitive, which means, that you need to include it after other allegro* header files (including addons). This is because of preprocessor, which checks used header files (by already defined header guards, e.g. __al_included_allegro5_allegro_h) to associate their ALLEGRO_* types and al_destroy_* functions (where associations created manually).

How to install:
The allegro5/scope is header-only addon, at the moment, with some defined directory structure for Allegro5 addons. I created allegro5/scope/scope.cpp file as a stub for compatibility with TheIDE, but not required to compile. Therefore, either:
- include the path to base folder with allegro5/scope addon
or
- in terms of TheIDE, create new assembly with following package nests:
AllegroDev;Allegro;Libraries;upp\uppsrc
where AllegroDev is path to base folder with allegro/scope addon; other paths explained above.
And add allegro5/scope package to your applcation package.

In the attachments archive you could find allegro5/scope addon and some example.

[Updated on: Mon, 02 February 2015 16:28]

Report message to a moderator

Previous Topic: Added DXF class to write cad DXF files
Next Topic: Something wrong with Dispatcher?
Goto Forum:
  


Current Time: Wed May 27 23:58:32 CEST 2020

Total time taken to generate the page: 0.01228 seconds