Skip to main content

Questions tagged [allegro]

Allegro is a cross-platform, open source, game programming library, primarily for C and C++ developers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
69 views

I am writing a software renderer with allegro5, but without using its own triangle drawing functions, I use the al_draw_prim function to draw the triangles but with all the z coordinates at zero, the ...
Ivan Rojas's user avatar
0 votes
1 answer
118 views

I am trying to do a palette swap in Allegro 5. I have not found any way to do this from my research. So what I've thought of doing is to do it myself by setting individual pixels. I also haven't found ...
Will's user avatar
  • 1
1 vote
1 answer
160 views

I'm in the very early stages of writing a 2d tile-based game using Allegro. I've hacked the Allegro source to allow me to specify tint values at each corner of a bitmap, however the resulting image ...
stusmith's user avatar
  • 111
1 vote
0 answers
128 views

I have an isometric diamond-shaped map. Currently my map origin is to the far left, instead of the top. The green circle at the top-center of the map is where I want the origin point to be, however ...
Matias Persson's user avatar
1 vote
0 answers
348 views

I've been trying to make my own implementation of Snake clone using Allegro 5 / C. Unfortunetaly I can't find a good method to align x & y position of snake to grid. I'm looking for some good ...
wixy0's user avatar
  • 77
3 votes
1 answer
1k views

while making my own Snake implementation I decided to use delta time for smoothing movement on screen. The problem is that before Snake was moving fixed amount of pixels every frame, but now when ...
wixy0's user avatar
  • 77
3 votes
2 answers
598 views

I'm developing my 1st board-game (go-game) in C with Allegro 5, for a course project. Part of my goal is to make a gamesave of the current gamestate. Let's say for 2 players if we exit the game, and ...
saraasadi78's user avatar
1 vote
1 answer
167 views

I have consistently segfaulted trying to load a TMX file into a *map. ...
dotJson's user avatar
  • 11
2 votes
0 answers
1k views

While looking for a cross platform library for game development, I came across both SDL and Allegro. After extensive research on fora, it seems SDL it way more widely used than Allegro is. I got the ...
Daan Rutten's user avatar
2 votes
1 answer
266 views

I'm using Allegro 5 to create a software-generated "motion blur" effect for my 2D sprites. I basically just have a boost::circular_buffer of some length which holds "snapshots" of the sprite going ...
MattyZ's user avatar
  • 155
-1 votes
1 answer
155 views

I ran brew install allegro on OSX while following this tutorial. My code looks like this: ...
user333866's user avatar
1 vote
1 answer
348 views

I'm trying to render a "skybox" using Allegro 5, that 3D objects can move around "in front" of. I'm having trouble figuring out how to set up the projection transform and where to put the vertices for ...
MattyZ's user avatar
  • 155
2 votes
1 answer
116 views

If I have a data structure for the Allegro threading API as shown in the example here: https://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Threads And I lock the mutex, is there a way to have ...
MattyZ's user avatar
  • 155
0 votes
1 answer
384 views

How can I draw a static bitmap for the background of an Allegro 5 graphics window, if I'm using camera transformations to apply perspective to bitmaps in front of the background so it appears that ...
MattyZ's user avatar
  • 155
0 votes
2 answers
240 views

I've been using allegro for some time, and the timer event worked in all my previous projects, but I don't know what happened this time, I want to move a piece as long as the game is going, but it isn'...
Luna's user avatar
  • 145
1 vote
1 answer
446 views

I've posted about another pong problem a while ago, but now I'm having another problem with the ball collision with the paddle , when the ball collides, it doesn't bounce back, why is that? Here is a ...
Luna's user avatar
  • 145
3 votes
2 answers
396 views

I've been trying to make a pong game with C++ and allegro5, I found moving the ball around easy with SFML, but in allegro5 I don't know what I can do to move it around, right now, it moves but only ...
Luna's user avatar
  • 145
0 votes
1 answer
676 views

I am creating a game in allegro5 and I have come across a problem. I have a character that fires a shotgun and there needs to be a delay before he can shoot again. The code for shooting his gun is in ...
mymulls's user avatar
2 votes
2 answers
1k views

I want to know if there is any better way to do this. But i want to make a game where its 2d and made of blocks. But a test that draws blocks to the screen and its going so slow that its not even ...
GameHog's user avatar
  • 31
1 vote
1 answer
815 views

I'm currently learning opengl but it seems quite complicated so i considered using some library like sdl or allegro. I noticed that allegro has some built in functions to create and attach shaders. ...
twkmz's user avatar
  • 183
3 votes
2 answers
835 views

I have a little 2D game made with Allegro, and I want to introduce strings during gameplay. For example, I've just made it so a key is needed to open a door, so I'd need some tutorial text to appear ...
Nicholas's user avatar
1 vote
1 answer
637 views

I'd like to use Matricies to transform primitive geometric shapes and draw them using the Allegro library using version 4.2 (I can not switch to 5.x just yet). This works fine for non-filled objects ...
Casey's user avatar
  • 2,095
3 votes
1 answer
2k views

I'm currently trying to do a black and white filter for my game in c++ with Allegro 5.01, I'm doing like this. ...
Yiurule's user avatar
  • 31
47 votes
6 answers
20k views

How do we solve big video memory requirements in a 2D game? We are developing a 2D game (Factorio) in allegro C/C++, and we are facing a problem with increasing video memory requirements as the game ...
Marwin's user avatar
  • 473
1 vote
1 answer
150 views

Sometimes when I am drawing objects that aren't 'linear' (e.g. rounded edges, circles, ellipses, diagonal lines, etc) I this weird effect of some pixels at certain points not getting drawn. It's ...
RenK's user avatar
  • 43
2 votes
2 answers
2k views

I know this is really something I should be able to figure out on my own, but a solution is evading me. Okay, here are a few relevant parts of my code. ...
user701329's user avatar
1 vote
2 answers
4k views

I'm working on a game in Allegro for C++. I'm stumped about how to scroll the screen. I'm trying to make the screen scroll with the player, as it does in classic side-scroller games such as Super ...
LightningChicken12's user avatar
2 votes
2 answers
472 views

Basically, I have been writing a game in C++ using Allegro. I mostly just use the library to draw bitmaps, draw text, and play audio. My main concern as the game continues to grow code-wise, is that ...
Zyaga's user avatar
  • 115
1 vote
3 answers
443 views

Background: I've currently implemented a world class where the dimensions are provided in meters and those dimensions are translated to pixel values for an allegro (4.x) memory bitmap to be created ...
Casey's user avatar
  • 2,095
2 votes
2 answers
1k views

I'm trying to implement the game loop where the physics is independent from rendering but my animation isn't as smooth as I would like it to be and it seems to periodically jump. Here is my code: <...
isiddiqi's user avatar
0 votes
1 answer
2k views

I'm working on a game with Allegro 5 that has a loop. I'd like to make the program write onto the screen, how much time the loop has ended. These are the rounds of a turn-based game, obviously. I use ...
Zoltán Schmidt's user avatar
0 votes
1 answer
701 views

I am currently learning about game development tools and decided to use Allegro and OpenGL for starters. I've run into some problems in getting examples to compile though. It seems the ...
learningLinux's user avatar
-1 votes
3 answers
2k views

How do I load Levels in my game, as in Layer 1 would be Objects, Layer 2 would be Characters and so on. I only need 3 layers, and they will all be put on top of each other. i.e having a flower with a ...
Manl400's user avatar
2 votes
1 answer
2k views

I'm using Allegro 5.0.8 al_draw_text to draw text on a bitmap (backbuffer). However, I've noticed that the first character of the string is always skipped. Moreover, whenever the same character ...
Alex's user avatar
  • 123
0 votes
1 answer
994 views

I have the following code from a tutorial and i am trying to compile it on a mac using g++/gcc however every time it complains about the native dialog but i am referencing the library correctly i ...
JOB's user avatar
  • 165
0 votes
3 answers
921 views

I'm having a serious problem with allegro. The program should display random pixels on the screen and when I build and run it I get the following error message: Below is the full code of my program: ...
user24152's user avatar
2 votes
2 answers
4k views

I am going through a Allegro 5 tutorial which has a game loop. There is also a variable "active" which determines if a key is being held down. Thus if the left key is being held down active is on and ...
going's user avatar
  • 123
1 vote
2 answers
904 views

I'm very interested in game programming and I'm taking my first steps alone. So I installed allegro. Although Dev-C++ didn't work, Code::Blocks compiled successfully. I started out with this basic ...
Armando Ortiz's user avatar
0 votes
1 answer
8k views

I get the following error(s) on my program that captures the mouse and then draws a line. Errors: ...
random's user avatar
  • 1
3 votes
1 answer
5k views

ISSUE I recently moved a project from my laptop to my desktop(machine info below). On my laptop the exact same code displays the fps(and ms/f) correctly. On my desktop it does not. What I mean by ...
dennmat's user avatar
  • 155
2 votes
1 answer
1k views

I'm trying to make a basic space invaders clone in allegro 5, I've got my game set up, basic events and such, here is the code: ...
Bugster's user avatar
  • 2,044
3 votes
1 answer
707 views

I basically want to have a shader run that can do something like toon shading, or grayscale the whole screen, or radial lighting. To do this, I create a new bitmap each time the display resizes that ...
jmasterx's user avatar
  • 2,099
1 vote
2 answers
4k views

In game design how should keyboard input be handled and why? Do i A: check the state of keys in the main loop each iteration? B: Read key down and key up events from the event queue. Im using ...
Ollosaurus rex's user avatar
5 votes
3 answers
1k views

Allright so I've been doing some searches, here what I got: SDL: It is a standard, very mature but very old. (I got posts of late 2009 where they were still waiting for the 1.3 to come up...we are ...
sh03's user avatar
  • 917
12 votes
1 answer
3k views

I am wishing to do what is described in this topic: http://www.allegro.cc/forums/print-thread/283220 I have attempted a variety of the methods mentioned here. First I tried to use the method ...
Adam Henderson's user avatar
-2 votes
2 answers
1k views

Having a fair bit of trouble. I'm used to Allegro and drawing sprites on a bitmap buffer at X Y coords. Now I've started a test project with OpenGL and its weird. Basically, as far as I know, theirs ...
Aaron's user avatar
  • 47
0 votes
1 answer
958 views

To begin with I am developing a PSP application so I have no clue how to debug a PSP application. That doesn't mean I do not know how debug period. Anyway, when I run the game everything runs fine but ...
Daniel Lopez's user avatar
2 votes
1 answer
1k views

I found good tutorial on how to do mouse look for 2D game here: http://www.atburrow.com/2010/03/08/objects-facing-the-cursor/ My code looks like this: ...
Marko's user avatar
  • 21
3 votes
1 answer
557 views

I'm trying to print the coordinates of a drawn square upon movement. The problem is that the x value doesn't get refreshed on screen. This is the code I have: ...
Raúl Roa's user avatar
  • 205