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
4
votes
0 answers

Including font assets in Allegro fails with "al_draw_ustr: Assertion `font' failed" when using a "absolute" path that resolves against a assets folder

I am trying to make a little game for practice in C++. I am using the Clion IDEA which uses CMake for it's build system. So I have this project set up which uses the Allegro game library and I can get it working fine for now with me…
Kaspar
  • 1,600
  • 4
  • 24
  • 46
4
votes
1 answer

allegro5 - How to run on Linux?

I set up Allegro 5, and could compile the following code with success: #include #include #include #include #include void error(char *msg) { fprintf(stderr,"%s : %s\n", msg,…
陳文炳
  • 41
  • 2
4
votes
1 answer

allegro 5 performing events at a certain interval

I'm making my first game in allegro 5, it's a snake game. In order to move the snake game I'd want to use a squared grid which I made, so the snake moves at regular intervals. How can I use timers to make an event happen at a certain amount of…
Bugster
  • 1,552
  • 8
  • 34
  • 56
4
votes
1 answer

Making standard console appear in allegro

When I run allegro program there isnt standard text console. How can I make it appear, so I can use cout and cin then? Im using Dev-Cpp and allegro 4.2.1.
noisy cat
  • 2,865
  • 5
  • 33
  • 51
3
votes
7 answers

Best way to detect collision between sprites?

Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++
Abhishek Mishra
  • 5,002
  • 8
  • 36
  • 38
3
votes
3 answers

Undefined reference to 'main'

You got to love linker errors *sarcasm*. Any way, I am developing a psp game using the psp port of allegro which came with pspsdk. And after I fixed all the other undefined references this one stumps me. The full error message and makefile and code…
Daniel Lopez
  • 1,728
  • 3
  • 24
  • 40
3
votes
0 answers

Allegro and Qt creator - how to set up this two?

I've looked for it for a long time and I couldn't find it, so could anybody tell me how to set up allegro (4.2.3) with qt creator (2.3.0), Qt 4.7.4 ? Thanks in advance, Martin. EDIT: OK, by accident, I finally managed to add some of the allegro…
user947536
3
votes
1 answer

How do I bundle the Allegro library with a Ubuntu Allegro application?

I got the Allegro dev libraries, wrote and compiled a simple application, and ran it on my computer, and it worked fine. I had a friend test it, but it did not do anything when double clicked. I think the problem is that he does not have the Allegro…
awesomeguy
  • 290
  • 3
  • 10
3
votes
3 answers

How come allegro automatically handles minimize button, but not close button?

Here is a sample from Allegro5 tutorial: (to see the original sample, follow the link, I've simplified it a bit for illustratory purposes. #include int main(int argc, char **argv) { ALLEGRO_DISPLAY *display = NULL; …
Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434
3
votes
2 answers

Compiling C++ code with allegro 5 and g++

What flags do I need to add to g++ in order to compile code using allegro 5? I tried g++ allegro5test.cpp -o allegro5test `allegro-config --libs` but that is not working. I'm using ubuntu 11.04. I installed allegro 5 using the instructions at…
John Stimac
  • 5,335
  • 8
  • 40
  • 60
3
votes
2 answers

What limitations will I run into making a game with Allegro / SDL vs. OpenGL / DirectX?

So I have a bunch of experience with C++ and Win32 programming and I am looking to create a 2D game with a couple of friends of mine. I have also dipped my toe into DirectX and OpenGL, but would prefer to use as simple of a library / API as possible…
Patrick Harl
  • 39
  • 1
  • 2
3
votes
3 answers

convert int to string for use in allegro function

I am trying to run the following code using allegro. textout_ex(screen, font, numbComments , 100, 100, GREEN, BLACK); numbComments is an integer, the function prototype of this function is void textout_ex(BITMAP *bmp, const FONT *f, const char…
ace
  • 189
  • 1
  • 1
  • 9
3
votes
2 answers

Running Allegro 5 on other computers

I have made an allegro simple game . But when I open the *.exe file on another computer it says that there are many missing .dll files . How can I make my game to run on other computers without Visual Studio and Allegro 5 library installed ?
samvel1024
  • 1,123
  • 4
  • 15
  • 39
3
votes
1 answer

loading a bitmap image to a certain size

Im trying to load a bitmap to a certain size using allegro. al_crate_bitmap(x,y) - creates a bitmap to a certain size al_load_bitmap(filename) - loads the image i need, but to its original size. I need to load a bitmap to a size I set. Any…
codingNightmares
  • 313
  • 2
  • 9
  • 19
3
votes
2 answers

Unable to load font in Allegro

I'm playing around with Allegro 5 in C++ and Visual Studio 2012, but for some reason I can't get a font to load using the sample code from the Allegro wiki: ALLEGRO_FONT *font = al_load_ttf_font("pirulen.ttf",72,0 ); if (!font){ …
PseudoPsyche
  • 4,332
  • 5
  • 37
  • 58
1
2
3
25 26