Moving Sprites

Return to S2




Currently, I only have two examples posted that involve moving 2-D sprites in a variety of ways. Once I start with DirectX, you will probably see more simple examples posted here. If you're interested in looking at the basics of character movement (and I mean the raw basics), these examples should help you out. You will need VDM Sound if you're running Windows XP.

I originally made these examples because I thought that I was going to be working on a 2D RPG in the near future. Unfortunately, some plans fell through. Not only that, but I found much better graphics libraries to work with. Allegro is pretty much dead to me.

RPG Movement (Source and Binary)
Press 'F' to make him do something funny. Press 'Q' to quit. Leave him for a little bit and he'll fall asleep. This demonstrates some basic animation and ways to handle top-down 2D movement. If your screen has poor refresh rate, the white background might hurt your eyes.




Sidescroller (Source and Binary)
Using Zero from Megaman X, I've got him only walking left and right. Now this is MUCH more advanced then the last. I've figured out transparencies, how to use datafiles, and a few other things that are readily apparent from the source code.


Examples provided require djgpp and Allegro graphics librarys to compile.
All examples are free to be copied, plagiarized, and distributed.
-Michael Raymond Vendittelli