Questions tagged [allegro]

Allegro is a low-level game programming library distributed freely, supporting desktop and mobile platforms. It is coded in C and offers several language bindings.

The latest stable version is 5.0. It is completely rewritten with a new API and full hardware accelerated graphics via OpenGL or D3D. There is official support for Windows, OS X, Linux, and iOS. There is also an unstable branch 5.1.

Links

383 questions
2
votes
2 answers

Allegro 5 - creating a custom bitmap with alpha channel

Afternoon everyone, I was wondering if there's any way I could create a custom bitmap with alpha channel bitmap = al_create_bitmap(30,…
Wracker
  • 589
  • 10
  • 32
2
votes
9 answers

How to check if memory has aready been released in Destructor?

I have a simple tank wars style game using the allegro open source library. In my tank class, I initialize arrays of pointers to bitmap objects to 0. Then I create new objects with an allegro function create_bitmap which allocates the memory and…
CodeFusionMobile
  • 14,812
  • 25
  • 102
  • 140
2
votes
2 answers

Which is better? Starting to Allegro or OpenGL

I want you to help me for a decision problem. I am a newbie video game programmer. I can develop Flash, Unity, Android games, and I know a little CryEngine. Also, I want to develop 3D video games in the future. So, I decided to learn a video game…
ciyo
  • 725
  • 4
  • 16
  • 36
2
votes
2 answers

failure of al_draw_line() in ALLEGRO

When I want to draw a line by using al_draw_line(100,100,400,400,al_map_rgb(255,255,0),5);, my ALLEGRO_DISPLAY gets closed automatically and statements after this line does not execute. My program just…
Vishal Gaur
  • 658
  • 6
  • 18
2
votes
1 answer

Archiving allegro program in xcode

I have been trying to get my game working as an archived application in xcode, but I cannot get it to run at all. The game runs in the normal run and profile mode, just not after it is archived. I am getting the following error message, which…
user722303
2
votes
0 answers

Compile Allegro 5.0.8 - static link (Code::Blocks 12.11, MinGW 4.7.1, Windows 7)

After installing Code::Blocks 12.11 (with MinGW 4.7.1 in distributive) on Windows 7 I try to compile simple Allegro 5 example. The only (official?) tutorial (a bit old) about…
topright gamedev
  • 2,617
  • 7
  • 35
  • 53
2
votes
1 answer

allegro 5.1.3 and microsoft visual studio 2010 for android?

Ive set up allegro and msv2010 on my laptop and ive set up android dev with msvc2010. However I cant figure out how to set up a project for the new allegro android dev. i have set up the and android sdk, java jdk, ndk and all the…
AlanF
  • 1,591
  • 3
  • 14
  • 20
2
votes
1 answer

Is this too specific to refactor with loops?

Is the code in this function too specific to refactor with loops? There's no algorithm that I can think of that would accurately reproduce the required result. bool Mouse::CreateDefaultImage() { if(_defaultImage != nullptr) return false; …
Casey
  • 10,297
  • 11
  • 59
  • 88
2
votes
2 answers

How do I call a C-function with a Functor that expects a pointer to a void function in C++?

I'd like to wrap (Facade Pattern) Allegro's use of threads i.e. install_int_ex(void (__cdecl*)(void), int tick); and remove_int(void (__cdecl*)(void)) with a class I wrote that uses templates and user-defined Functor Objects to install interrupts…
Casey
  • 10,297
  • 11
  • 59
  • 88
2
votes
2 answers

Loading .png Image file with Allegro 5

I am writing a game in allegro and would like to load some image files. However, whenever I call al_load_bitmap, I am getting a null pointer. I am using XCode 4.1 as my IDE. I would try compiling using g++ (in case it is a path issue) however I…
user1413793
  • 9,057
  • 7
  • 30
  • 42
2
votes
1 answer

An Array of ALLEGRO_BITMAP type objects

So I'm making a game using Allegro and I was trying to create an array of ALLEGRO_BITMAP type objects which would represent the board, so that I could load my images files all at once in the beginning of the game and not have to load them every time…
user1413793
  • 9,057
  • 7
  • 30
  • 42
2
votes
3 answers

Animating an array of child class objects

I am trying to create a parent class "Shape" with child classes "Circle", "Triangle", "Rectangle". The parent class holds the x pos, y pos, and fill color or all the "shapes" and then each child class holds info specific to that shape. Would anyone…
AGSperry
  • 21
  • 3
2
votes
2 answers

Creating a cursor in Allegro?

I'm writing a basic game. I want a cursor image with an actual proper outline for collision detection. This is NOT for the mouse-- I want little cursors flying around in my game, and I don't want their bounding box to be a rectangle. But I'm new to…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
1
vote
1 answer

Allegro Webactions not serving on SBCL. Methods to debug or possible solutions?

I am trying to get Portable Allegro Serve and Webactions up and running on SBCL. I have so far managed to make paserve properly serve pages. But webactions chunks out with the following warning in the console: 1-aserve-worker: 05/27/09 - 21:28:43 -…
memet
  • 73
  • 1
  • 5
1
vote
0 answers

libfov problems in C++ game

I've been making a game in which I want to use some FOV lighting. I'm trying out libfov and it seems perfect, I had some trouble getting it to compile which I figured out on my own, but when I try to run the compiled executable I get this in the…