Skip to main content
gamedev.net
🔒 Locked

Loading Sprites

Started by Rockuman Dec 19, 2004 at 12:24 PM 0 replies 550+ views
Original Post
Rockuman
Rockuman
Alright, I *finally* got to the point where I'm actually dealing with sprites. At this point, I'm using Allegro, and it's all working out great, but I'm in a bit of a problem. I'm trying to get started with a fighting game, but I'm clueless as to how I should save the sprites, and what the sprite engine should be like, as in, how do I load each sprite with their different widths and heights preserved? I'm not sure if I should use a sprite sheet, load them individually, or somehow, make my own sprite-filetype... But any feedback whatsoever would be greatly appreciated.
Alex Baker
Alex Baker

usually,
the sprites are created (and saved) within a graphics program/application in a - preferably - widely accepted file format; you are then loading this sprites into your application by using proper functions of your API (which is Allegro in your case); then, everything you have to do is, showing your sprites with a distinct delay on the screen.

regarding the topic, how to deal with it, it's also easy:
write a text/configuration file (which could use XML, of course) which saves which single sprite frame file belongs to which animation, and with which speed this animation should be played.


Alex Baker Computer science is dealing with computers as much as astronomy is dealing with telescopes.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.