New answers tagged allegro
0
After dealing with similar project over the last 2 years (as an amateur game developper) I had to face the fact that this method was totally outdated, and somehow more complicated in time than others.
I would advice you reviewing totally the format of your map and the way you handle layers. A good example is the Tile Map Format .TMX(Tmx Map Format ...
0
A solution to your problem would be that within your map class you create 3 std::vector> each the same size representing each a layer of the map. Then within your loadmap function every time yiu encounter the appropriate layer you push back the integers that represent tiles. Esentially, you have the basis for the system you want, you just need a cotainer for ...
0
I didn't watch the code, but if I understood it well, you'd like to use layers on a similar way as they are used in platformers, isn't it?
In that case, I'd suggest you to make an array for every layer and make some cross-effect between them. Here's an example (just parts):
#define x 30
#define y 30
int arr1[x][y];
int arr2[x][y];
int arr3[x][y];
Player ...
2
g++ allegroTemplate.cpp -o allegroTemplate
You aren't linking with Allegro. With Allegro 4, it's recommended to use the allegro-config command, like
g++ souce.cpp -o game $(allegro-config --libs)
If you are just getting started, you really should take a look at Allegro 5 instead. It has integrated OpenGL support and is actively being developed, ...
Top 50 recent answers are included