Click here to Skip to main content
15,299,443 members
Articles / Multimedia / GDI
Posted 8 Sep 2006


39 bookmarked

A Small GDI+ Sprite Animation Library

Rate me:
Please Sign up or sign in to vote.
4.10/5 (16 votes)
8 Sep 2006CPOL2 min read
Animate and control sprites using GDI+.

Sample Image - winSpriteLib.jpg


This is a small library for animating sprites using GDI+. It also contains a game engine that manages hooking the keyboard and updating the sprites in the game for you. It is limited, and not the best approach for a full fledged game in most cases, but for a small game, GDI+ is not a bad option, and hopefully this will make the game creation a bit easier.

You may modify and re-use this as you wish, and you can use it in any game you want to sell, but please don't sell it as a product in itself... Besides it being unethical, it's probably not an engine that is going to sell for much ;).

This is meant only to show the use of GDI+ and get you started in game programming. I haven't been programming for Windows long, and I like to learn by doing... and I also like to share so that other people can learn. If you have any questions, please let me know. I hope you enjoy the code and maybe even learn something... just keep in mind that I am also learning, and would appreciate any feedback you have on how this could be done better... but still using GDI+ as that was the point of doing it this way. I am now starting to create a better engine using DirectX, and would like any feedback on how you think I could better implement a game engine using it.

Thank you for any votes or feedback! ;) Enjoy!

Please note that the ability to scroll would not have been possible without the help of Anthony Queen. You can see his articles and view his profile by following this link:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
United States United States
PC Programmer/Analyst

Comments and Discussions

GeneralMy vote of 4 Pin
Samuel Pearce14-Jun-11 8:10
MemberSamuel Pearce14-Jun-11 8:10 
GeneralMy vote of 5 Pin
arquero_r20-Jan-11 16:45
Memberarquero_r20-Jan-11 16:45 
GeneralMy vote of 5 Pin
Member 366671418-Aug-10 20:49
MemberMember 366671418-Aug-10 20:49 
GeneralMy vote of 1 Pin
JamminJimE31-Jul-09 6:32
MemberJamminJimE31-Jul-09 6:32 
GeneralScrollable image Pin
Anthony Queen29-Sep-06 3:54
MemberAnthony Queen29-Sep-06 3:54 
Questionnice background image Pin
count08-Sep-06 21:08
Membercount08-Sep-06 21:08 
AnswerRe: nice background image Pin
Polymorpher9-Sep-06 9:13
MemberPolymorpher9-Sep-06 9:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.