This post is a portion of Part 6 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.
- 6.0 – Bitmaps
- 6.1 – Creating Bitmaps
- 6.2 – Loading Premade Bitmaps
- 6.3 – Rotating, Scaling, Tinting Bitmaps
As a follow up to the previous video, we now look at how to load premade bitmaps into Allegro 5.
Full source can be found here.
Sir, thank you again. Very nicely explained, concise, precise, nice narration. Probably the best allegro tutorial series on the internet. Keep up the good work!
Glad you enjoy.
Dat spider…
U jelly?
Sir,
I want to say again thank for these videos. You’re the best.
Thanks man, you are my hero!
You could also do (screenWidth – imageWidth) / 2
and same for imageHeight.
i got a violation error on these lines wich trigger a breakpoint:
image_width = al_get_bitmap_width(image);
image_height = al_get_bitmap_height(image);
i’m not sure why since it isn’t really explained in the output it starts and after that it crashes immidiatly (according to my own set breakpoints in the lines mentioned above)tried it again and tried rebuilding it, also i tried to do it with a new project and even copypasted it from your dropbox still same results. any ideas?
i’ve found the problem: since i want always to be sure on the format i always type it behind the given name, and somehow this gave my picture the extension .jpg.jpg wich it couldn’t find
Ah yes. Always make sure you uncheck “hide file extensions for known file types”. This happens a lot
That’s a fine spider Mr. Geig! And my sincere thanks for the tutorial, which I’ve been following all this day.
I hope to finish it tomorrow, since, with the least of desires, I have to go and get some rest. What a bummer when I’m having so much fun!