Click here to Skip to main content
15,879,095 members
Articles / Multimedia / GDI

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 64.3K   3.1K   39   7
Animate and control sprites using GDI+.

Sample Image - winSpriteLib.jpg

Introduction

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: http://www.codeproject.com/KB/vb/PanExample.aspx.

License

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


Written By
Software Developer (Senior) www.ruskin.com
United States United States
PC Programmer/Analyst

Comments and Discussions

 
GeneralScrollable image Pin
Anthony Queen29-Sep-06 3:54
Anthony Queen29-Sep-06 3:54 

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.