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

Allegro5 with C - making program

I'm making program using Allegro5, but I'm not familiar with the library yet. I just want to know what is possible with this library. I have to do 'color correction of image' (contrast, brightness, etc.) and I thought about: -making buttons (like in…
sobol6803
  • 420
  • 1
  • 5
  • 21
0
votes
1 answer

Allegro DrawSprite() wont function correctly C++

Simple x's and O's game. If 1-9 keys are pressed, draw an X or an O at the right place on the board: 7|8|9 4|5|6 1|2|3 The code is below, the changePlayer() function just changes the player (not included) and i use board[0] to hold which player it…
JamesB123
  • 103
  • 15
0
votes
1 answer

Allegro 5 + MinGW: Audio Addon Not Working

I've been working on this platforming Allegro 5 test that I'm later going to turn into a game. Every one of Allegro's add-ons has worked great up until now, when I tried to use the audio to play an .ogg file I made in Audacity. I'm using the MinGW…
Neil Flodin
  • 578
  • 7
  • 22
0
votes
1 answer

Timing problems in Allegro while implementing Pong

I'm trying to implement a very basic version of Pong using Allegro 4 and C++. I'm running into a problem however when I use the timing mechanism in conjunction with a rest() call. My game is set up for 2 players and a player wins a set once the…
0
votes
1 answer

Output program in C++ is all white for no apparent reason

The above is a problem I am having. I am using Visual Studio 2010, in C++, with the Allegro library for game development. I'm having an issue where my test program is always all-white, until I hit a button, in some cases. I don't really understand…
user1426572
0
votes
3 answers

c Allegro ISO error Using & and integers yet not working

I am making an allegro game using my own logic and primitive engine. Im a trying to make gravity and contact with tiles from an array. To be able to change values of a class from another class, i had to use the reference symbol '&'. After compiling…
0
votes
1 answer

C++, Allegro, Ubuntu, and libpng/LoadPNG

I've been looking around for quite a while, but I haven't quite been able to hit on a source answering my question. I want to use PNGs with Allegro. I know about libpng and loadpng for Allegro, but I don't know what to do with these. Obviously, I'm…
Ben Dixon
  • 195
  • 1
  • 1
  • 5
0
votes
1 answer

issue with screen resolution after running an allegro program in full screen

My allegro program runs fine in full screen mode, but after I exit the program, my desktop screen resolution is messed up. I was under the impression that running allegro_exit(); would revert the screen resolution back to what it originally was. I…
user1477782
0
votes
1 answer

Can Allegro update the number of joysticks at runtime?

Is there a way to update the number of joysticks plugged in at run-time other than constantly calling remove_joystick() then install_joystick? This proves to be extremely slow (goes from 60 FPS to around 5). Allegro 4.2 answers only please... void…
Casey
  • 10,297
  • 11
  • 59
  • 88
0
votes
1 answer

Allegro, sprites leaving trail

I'm getting the problem my sprites leave a trail behind when i move them. Tried drawning a BG with every refresh but then it start flickering. This is what i do // ... int main(int argc, char *argv[]) { BITMAP *buffer = NULL; BITMAP…
Crasher
  • 2,211
  • 2
  • 18
  • 17
0
votes
1 answer

How to load a bmp without background

So, I was trying to make game in allegro but I'm currently stuck with this damn blank background which is making me very mad, as I know PNG images have transparency in the background already, but I can't load pngs, i have already download devpaks,…
0
votes
1 answer

How do Allegro timers count time?

const float FPS = 60; timer = al_create_timer(1.0 / FPS); Apparently, those two lines start a timer that goes off 60 times per second. I don't understand that. 1/FPS gives 1/60, and docs say the parameter of al_create_timer is the number of seconds…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
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,…
0
votes
1 answer

Allegro library installation

I was using Dev C++ Compiler and due to some problems this compiler is not running properly on my PC,and for that i am unable to install Allegro 4.9 Library with my Dev C++ compiler. I am now using netbeans compiler for my c++ programming but unable…
Youmair
  • 47
  • 2
  • 2
  • 5
0
votes
4 answers

Possible to declare elements of a function array individually?

So, a quick summary of why I'm trying to do this: I'm making a space flight program, wherein (once I code in more than one ship) I will be able to store different ships, e.g. craft[HAB], craft[AYSE], craft[ISS], and so forth. At the moment, I have…
pmelanson
  • 330
  • 4
  • 16