This post is a portion of Part 7 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.
- 7.0 – Sprites
- 7.1 – Bitmap Transparency in Allegro 5
- 7.2 – Basic Animation in Allegro 5
- 7.3 – Using Allegro 5 to Create a Sprite Sheet
- 7.4 – Sprite Sheet Animation in Allegro 5
Before we can look at animation using sprite sheets, we first need to actually have sprite sheets. I made this video to show how to use Allegro’s ability to save bitmaps to create our own sheets.
Full source can be found here
I know I’m wrong, but why isn’t it i * imageWidth +1 ?
disregard, forgot first position is 0, 0 as opposed to 1, 1
You’re a genious man , this course it’s the best that I’ve ever seen. You’re better than my java’s teacher at the university. Go on we’re still waiting for the 3d game development 😉
Great tutorials =)!
One way to improve this code would be accepting your images as arguments and then concatenate them, you could then run it using pipes on command line wich would allow you to make sheets without changing your code.
What i mean is something like:
ls flieght*|./my_program -o name.bmp
Or on windows
dir flieght*|my_program.exe -o name.bmp
great tutorials, you could load the images in dynamically as well as long as the images were named appropriately
wooow i love this tutorial…
and ????
ich liebe dich
i love you
je t’aime
shin wan yon tan
okay the last one not real lol 😛
reel*
OMG…mine wasn’t working and I was trying everything to fix it…and I just forgot to put .png
Hello, I can’t understand the purpose of putting the line al_set_target_bitmap(al_get_backbuffer(display)); in the code. Can you explain the purpose of this line for me? Thank you