Questions tagged [allegro]
Allegro is a cross-platform, open source, game programming library, primarily for C and C++ developers.
49 questions
0
votes
0
answers
69
views
texture in perspective by vertices not interpolation
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 ...
0
votes
1
answer
118
views
Palette Swapping in Allegro 5
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 ...
1
vote
1
answer
160
views
How to avoid obvious triangle pattern when shading 2d quads?
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 ...
1
vote
0
answers
128
views
How to place the origin of an isometric map at the top, not the left
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 ...
1
vote
0
answers
348
views
Implementation of continous, grid aligned, smooth movement (C / C++)
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 ...
3
votes
1
answer
1k
views
Tile based smooth snake movement
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 ...
3
votes
2
answers
598
views
How to save game state in C in Allegro?
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 ...
1
vote
1
answer
167
views
Segmentation Fault using Allegro_Tiled, function al_open_map();
I have consistently segfaulted trying to load a TMX file into a *map.
...
2
votes
0
answers
1k
views
Using SDL instead of Allegro? [closed]
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 ...
2
votes
1
answer
266
views
Numerical differentiation to calculate size of circular buffer
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 ...
-1
votes
1
answer
155
views
Why do I get this compiler error when trying to include Allegro headers on a Mac?
I ran brew install allegro on OSX while following this tutorial.
My code looks like this:
...
1
vote
1
answer
348
views
Creating a skybox in Allegro 5
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 ...
2
votes
1
answer
116
views
Locking object access with Allegro's threading API
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 ...
0
votes
1
answer
384
views
Creating a static background when using camera transforms in Allegro 5
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 ...
0
votes
2
answers
240
views
Timer event isn't working
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'...