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

Allegro bitmap commands return black screen

I am a beginner at allegro and c++. I am trying to use the bitmap commands. I used this simple program to test it: #include BITMAP *red; int main(){ allegro_init(); install_keyboard(); set_color_depth(32); set_gfx_mode(…
Gabe
  • 85
  • 1
  • 8
0
votes
1 answer

I am trying to do collation in ALLEGRO c++ with many walls

So I am trying to make a game that has collation in it and I have been trying and looking for what works for me. This is the class.cpp file #include "Player.h" #include #include #include #include…
Main menu
  • 33
  • 4
0
votes
0 answers

Nfs mount cause the server to stuck

In my project, I am trying to mount 2 directories that I configured on the server. I don't know in advance that both of the directories exist on the server side, The server also does not know, It is a question of current deployment. What I see is…
Nir Azkiel
  • 41
  • 1
  • 4
0
votes
1 answer

Flickering when a bitmap follows another in Allegro

I'm developing a 2D game using C with Allegro 5. Right now, I'm coding the movement of an in-game enemy, a bitmap that follows the player (coordinates X and Y). While it works perfectly for the X axis, it often fails to go towards the player at the…
Caio B
  • 25
  • 1
  • 3
0
votes
1 answer

Creating a projectile trajectory in Allegro

I'm developing a 2D game in C using Allegro 5, where an enemy from a fixed position shoots a projectile at the player's current position. I know I will have to calculate the tangent of an imaginary triangle based on the player's position and the…
Caio B
  • 25
  • 1
  • 3
0
votes
1 answer

Unable to build Allegro C++ program in Visual Studio 2010

I am a complete beginner in allegro and i just installed allegro correctly and this is my code(my first…
Arjun Ashok
  • 53
  • 1
  • 8
0
votes
1 answer

Storing text lines in an array, C

I am new to C and I am confused how I can read through a file and store each line to an index of an array. Example file: What color is the sky? Red Orange Yellow Blue Desired result of code: input[0] = What color is the sky? input[1] = Red …
Alex Shaw
  • 11
  • 1
  • 3
0
votes
1 answer

Installing Allegro

I have been following this procedure to install Allegro.Everything was ok until I reached point 3, where I have to run these commands cd C:\devel\a5_sourcepack\zlib mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=C:\MinGW -G "MinGW…
Tom
  • 23
  • 4
0
votes
1 answer

Destroying a vector of ALLEGRO_BITMAP*

I use library Allegro5. In my class named Animation I have vector sprites. In constructor, I populate it with some bitmaps and in destructor I would like to delete it properly. However, my solutions still lead to memory leaking: for…
0
votes
2 answers

How to use GIFs in Allegro 5 with the Algif5 addon?

I try to use this: https://github.com/allefant/algif5 but this doesn't work. #include "algif.h" char const* pathBoss1 = "boss1.gif"; ALGIF_ANIMATION *boss1Gif = NULL; boss1Gif = algif_load_animation(pathBoss1); // in a function:…
John
  • 105
  • 10
0
votes
1 answer

Sprites; changing frames is not fluid in C++ Allegro 5

Watch the video: https://youtu.be/i2EXKY3EQPo The dragon movement is not fluid. It's like if all the frames were changing at the same time. What am I doing wrong? shipImage = al_load_bitmap("dragon_stationary.png"); ship.maxFrame = 5; ship.curFrame…
John
  • 105
  • 10
0
votes
1 answer

How to create a bitmap from assembly, using allegro?

My task is to generate fractal in C. The problem is that all computing must be done in x86 assembly, in a function defined by me. I chose allegro5 library to do it. My question is: Is there any possibility to get an address of allocated memory for…
0
votes
0 answers

Abort() error loading bitmap Allegro 5

Have this textbox.png been using while working on game. It always used to load with al_load_bitmap() but now the code breaks after running 10 seconds before even reaching the part that draws the bitmap. Clicking break and retry after the error…
0
votes
0 answers

Passing an array from one to another class

problem that I've got is that, so I'm creating blocks in my game in block class: void Block::CreateBlocks() { int count = 0; coordinateX[0] = START_FLOOR_X; coordinateY[0] = START_FLOOR_Y; width[0] = al_get_bitmap_width(floorbmp); for (int i = 1; i…
0
votes
0 answers

Implementing a collision in 2D platform game ( Icy Tower )

I'm fighting with this for like few days, and I have no idea, how to do that, so I'd like to ask you for help. I've got no idea how collision should look like right here, so player could jump through 'down zone' of the block, and stay right on the…