2D Game Dev – Part 7.3: Using Allegro 5 to Create a Sprite Sheet

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.

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

Posted in 2D Game Dev, Allegro, C++, Code, Game Dev, Part 7, Tutorial
4 Comments » for 2D Game Dev – Part 7.3: Using Allegro 5 to Create a Sprite Sheet
  1. Matthew says:

    I know I’m wrong, but why isn’t it i * imageWidth +1 ?

  2. Matthew says:

    disregard, forgot first position is 0, 0 as opposed to 1, 1

  3. Juan says:

    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 ;)

  4. psam says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>