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
1 answer

C++ Executable not working from folder, but working from console on Mac

I have this strange problem with a game I'm making in c++ with Allegro. There is a part of the game that uses some images from the source folder. I compile it through gcc and create the executable file main, it works fine when I call ./main from…
elkiwy
  • 59
  • 5
0
votes
1 answer

How to put an moving image at Allegro

I am making a 2d star wars game with allegro4 and I want to add a space ship image which is able to move(with keyboard up,down,right,left). I can't find the fuction about that.Can you help me?
0
votes
2 answers

Compiling Allegro source code

I am trying to build a C# project (downloaded code) in Visual Studio Express 2008. I get the error (my translation): The type or namespace name "Allegro" couldn't be found. for the line using Allegro; I know the 2D graphics library Allegro, of…
7331
  • 1
0
votes
0 answers

Sound is not running at Allegro Game Library

I want to making a game with allegro4 on ubuntu.So I improving myself whit tutorials. Today I want to add a sound in my game. However I can't run the sound. When I compile my code and run the "output" program the terminal give that message: ALSA lib…
0
votes
2 answers

Allegro get current window size

In Allegro, I can set the Window to be resizeable by running al_set_new_display_flags(ALLEGRO_RESIZABLE); before display = al_create_display(800, 600); however, if I resize the window, how will I know how big the window is that I resize?
user7621473
0
votes
1 answer

Allegro 5: trouble storing bitmaps in a std map

I started creating a game in Visual Studio 2017 in C++ using Allegro 5. In order to make it easier to manage images, I created an ImageLoader class which would load and store all active images, and destroy them as necessary. It does so using a map…
user3726962
  • 333
  • 1
  • 4
  • 17
0
votes
1 answer

Error compiling allegro5 program using gcc on osx

I am trying to compile a simple allegro5 program on Mac OSX 10.12 but am getting an undefined symbols error. Here is the command I ran in the terminal gcc main.c -o hello -I/usr/local/include/ -L/usr/local/lib -lallegro_main And here is my…
Guilty Spark
  • 77
  • 10
0
votes
1 answer

changing background colour with allegro in code::blocks

I'm currently doing a little university project in C, using allegro5. Part of it is just drawing a person on additional window that comes up and I'm trying to change the background colour of the window. I use GFX_SetBackgroundColour(LIGHTBLUE) as…
0
votes
2 answers

Allegro 5 game won't compile with GCC

I'm trying to port over a game that I made using Allegro 5.0 (from Windows to a Raspberry Pi running Raspian). I installed Allegro and moved over all my source files, but when I try to compile using: *g++ -std=c++0x .cpp -o SpaceFighter $(pkg-config…
Ryan Appel
  • 78
  • 8
0
votes
1 answer

Error running Allegro on OSX

I ran brew install allegro on OSX following this tutorial: https://wiki.allegro.cc/index.php?title=Example_ExHello my code include int main(void) { if (allegro_init() != 0) return 1; /* set up the keyboard handler */ …
quantumpotato
  • 9,637
  • 14
  • 70
  • 146
0
votes
0 answers

compiling allegro on code blocks/vs15 errors

I have a coding assignment and I have been plagued by this issue, when I finally configure my compiler and libraries linked I get these 100+ errors although the code is correct ( copied from teacher's webpage ) here's the code…
zutch
  • 11
0
votes
2 answers

Allegro sound not working (playing wav file)

I'm making a game for a school project and I have a sound effect that is supposed to play whenever a laser is fired. There was a brief period of time when it worked fine, but it has since stopped. After it stopped I changed the code a bit as I…
Gapope
  • 11
  • 3
0
votes
2 answers

Multiple definition errors; C++ working with Allegro

So I'm working on a game for my computer science class using Dev-C++ 5.11 and Allegro 4.2, I'm reaching the end of the project and I want to finally fix a problem I've been having for a while now. My code is rather long to use a single .cpp file,…
Gapope
  • 11
  • 3
0
votes
2 answers

allegro/c++ cannot convert argument 3 from 'const char *' to 'char *'

I'm a noob trying to learn c++ and allegro and was following a tutorial which is how I came up with this code. My issue is at line: "textout_centre_ex(screen, font1, Draw.c_str(), scrW / 2, scrH / 2, eBlue, -1);" When it comes to 'Draw.c_str()' I…
billybrian
  • 11
  • 3
0
votes
2 answers

How to make a program run on other computers?

I made a game using c++ and Allegro 5, it runs fine on my pc with Linux. I would like to know how to create a package that I could export to another Linux computer, and make it run without installing Allegro. Thanks
Marco
  • 1
  • 1