Introduction
The libraries found here perform the fundamental tasks you need in a game. AXL_FRAMS is a complete framework for games creation. AXL_GRANI is a repository for graphics created from a XML file with easy retrieval, a comprehensive Animation system and collision detection. AXL_CONCUR reads/writes custom and allegro configuration values from a XML file and starts up Allegro using the values set.
- AXL_FRAMS:
The Framework is a system that performs many tasks and can be ran at various levels. The tasks it can perform for you are :
- Load and store graphics and animation. With a full animation playback system for displaying animations
- Load and store core Allegro and custom variables in an XML configuration file. Allowing easy access to them both and provide a means for determining what Allegro settings need to be applied
- Initialise Allegro using configuration settings supplied and leave the system is a graphical mode
- Run a game in a FPS based loop, requiring no coding other than functions for logic and drawing. There is also no need to create buffers for games as this is handled for you
- Create and manage transparently double buffering, system double buffering (double buffering but using System Bitmaps), Page Flipping, Triple Buffering
- Helper functions such as easy loading of DAT files, pausing, message boxes, etc.
- Complete sound control using the more advanced voice controls, but made even easier than the simple and limited wav playback routines
The Framework does not have to be used as a complete FPS based control system, you can use the Framework just to load up and Initialise Allegro providing the code with a graphical mode, access to animations, graphics and configuration settings, and exposure to the created buffers (e.g. video, system or memory bitmaps).
- AXL_GRANI:
This is an XML based graphics storage and retrieval repository and animation playback library.
You store your references to graphics and animations in an XML file and can reference
them in code by name and retrieve them as memory, system or video bitmaps. The goal was to
create a powerful but easy to use system. It has the following features:
- Can use a single file per bitmap or sheet/tiled graphic files (multiple graphics within a single file) of which the graphics can can be placed inside a 1 pixel grid if desired to make it easier to see
- different animation loops (once, repeating, reverse, ping-pong, etc) can be specified
- each animation graphic can have different timings between frames
- fade in/out animations in any time period
- supports up to 5 countdown timers (does not have any timer overhead) for each animation to program key triggers, etc.
- can automatically create a mask for pixel perfect collision (using PPCOL)
- can single step or automatically move between frames
- pause/resume animations
- graphics are only loaded once even if referenced multiple times
- Configurator:
This is an XML solution to store and configure Allegro and your own game variables.
There are two parts to the XML file. The first stores the core details you need to run any
Allegro program, such as graphics modes, resolutions, sound configurations, FPS, etc. the
second stores custom entries that can be of type integer, string or float.
All settings can be read and saved easily, and if required automatically saved on exiting the program.
The other purpose is after initialising the configurator (by simply instantiating an object) Allegro can be started up and be ready for the user using all the settings supplied.
You can supply a main and fallback window mode, bpp, render mode (triple/paged/double) and the system will try all permutations until a valid one is found.
Linkage
Each of the libraries are self-sufficient and can run without the others. However, they can be used together to complement and enhance their capabilities. Such as if the framework is included with the animations
library they can output debugging information to a file. These are explained further in each section.Dependencies
- The framework and animation libraries require the tinyXML library (supplied). This is an ANSI compatible (platform independent) library and is used for reading the XML files.
Where Next
No doubt it is the full framework that you plan on using, however because the Animation and Configuration modules can be used standalone, and because they are a large document in themselves, it will be best if you follow the documents in the order of the menu, i.e. firstly learn about Configurator which will let you see exactly what Allegro features the Framework incorporates and how to set up the XML for starting and using allegro. Secondly learn about the Animation library as this will teach you about the graphics and animation handling that are incorporated into the Framework and show you how to set them up.Once you know these two libraries you should be able to learn about the Framework and not be overwhelmed by the information provided (the Framework document does not contain information on setting up the XML f