Questions tagged [allegro5]

Allegro 5 is the fifth version of the Allegro game programming library for C/C++ developers. It is not backwards compatible with Allegro 4. It is distributed freely, and it supports the following platforms: Unix (Linux, FreeBSD, etc.), Windows, OS X, and iOS.

323 questions
0
votes
2 answers

How to install Allegro 5 on Mac oSX Lion with XCode

I am new to mac development and was wondering how I can install Allegro 5 on my Mac. I want to use allegro with Xcode, and I am running Lion. How do I install allegro?
user1446343
0
votes
1 answer

Adding run-time dependencies for Allegro addons?

I'm trying to use some of the Allegro addon libraries. For instance: #include But MSVS10 is telling me the things I'm referencing are undefined. I got the standard #include to work just fine,…
-1
votes
2 answers

Improper updation in C++, Allegro

LeftCollision in CheckCollision() goes true, when ever Object1 collides with Object2(square which is scrolling from right to left of screen) left side. But in the GameObject::Update() Leftcollision never updates to True, though it changes to true in…
Varun Parakh
  • 221
  • 1
  • 4
  • 10
-1
votes
1 answer

Drawing Text Using OpenGL and Allegro 5

How can I draw 2d text using openGL and Allegro 5 in C++? I want to be able to specify a font file to load, and not have to put all the characters into an image file by hand.
John Stimac
  • 5,335
  • 8
  • 40
  • 60
-1
votes
1 answer

Why does al_draw_textf() prints numbers instead of alphabets stored in a string variable?

I want to print a user's name on the allegro screen, for this I'm declaring a string variable and asking the user to input his name, after that, I'm converting the string to const char* so that I can pass on the variable to al_draw_textf(). But even…
-1
votes
1 answer

How to draw a binary matrix to the display

I'm recreating tetris in c++ for a starter project. I'm using allegro for user input and drawing to the display. Every action, move, rotation is inserted into a 2x2 matrix. Now I got stuck at drawing the actual matrix to the screen. Here's my…
Vid Osep
  • 35
  • 1
  • 1
  • 6
-1
votes
2 answers

How to convert pixels into indices

The problem it's I need to change a matrix and I just have acess to these positions in pixels x and y, how can I convert x and y into an indice ? E.g : char *map[20][17] = { "WWWWWWWWWWWWWWWW", "WFFFFFFFFFFFFFFW", "WFWWWWWFFWWWWWFW", …
user7075574
-1
votes
1 answer

I can't log out the output C program

I am developping a game with allegro library. I wrote a starter C code then I compile the program on Ubuntu Terminal.After that When I open the output program,the program open but not closed.Cancel Button(X) is not working. Here is my starter…
-1
votes
1 answer

Allegro Throws errors when trying to draw lines

For some reason allegro (C++ Game Engine), throws errors when i try to run... So first this code works fine ! : #include #include int main(void) { int width = 640, height = 480; …
amanuel2
  • 4,508
  • 4
  • 36
  • 67
-1
votes
1 answer

Checking for collision

I'm coding a game for our final project in our major using Allegro but I get some issues with collision. My game is basically Battleships and what I did is after a loading screen, a screen will appear wherein you can select the coordinates of your…
-1
votes
1 answer

Allegro 5 Audio Assertion Fail

I'm wondering if anyone can point me in the right direction for this error. I am learning 2D game programming using Allegro 5 installed in Visual Studio 2010. I have been following a tutorial series and everything has been fine until the last…
Nortski
  • 1
  • 1
-1
votes
1 answer

Reference pointer in class

Well, I need an attribute in my class is a pointer reference & and start to null, because it pointed to the address of an image that has not yet been charged. It is possible to do this? If not possible, is as follows: I'm creating a game with…
vaati
  • 162
  • 2
  • 13
-1
votes
2 answers

Allegro 5 assertion fail

I am trying to load a bitmap with allegro 5.0.10 ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_RESOURCES_PATH); al_set_path_filename(path, "Bitmap.bmp"); al_init_image_addon(); ALLEGRO_BITMAP *bmp = al_load_bitmap(al_path_cstr(path, '/')); if…
junyi00
  • 792
  • 3
  • 8
  • 28
-1
votes
2 answers

C++ Allegro stopping the sample

I want to stop my sample at certain point , but it sends me some weird error. This is my code: ALLEGRO_SAMPLE_ID id; ALLEGRO_SAMPLE* spl = al_load_sample("sound.ogg"); al_play_sample(spl, 1.0, 0, 1.0, 0,…
-1
votes
1 answer

allegro 5 linker error

Can someone help me with Allegro 5.0.8 static linking in MSVC2010? allegro-5.0.8-monolith-static-mt.lib; -> this doesn't work for me. I can run the game from IDE but i can't release the solution. I have this at the top of my program: #include…
nix_kc
  • 11
  • 3
1 2 3
21
22