Skip to main content
GameDev.net gamedev.net
🔒 Locked

2D Sprite FileFormat

Started by LonelyStar May 20, 2003 at 8:15 AM 10 replies 1.9k views
Original Post
LonelyStar
LonelyStar
Hi everybody, I want to write an File Format for 2D Sprites. It should include Animations, Transparency, Scaling and other stuff I do not think of now. Of course I also want to write an SpriteMaker, with wich Sprites can be created. The SpriteMaker should not be an Paint-Programm, it should import Picture-Files. My problem is, that I do not know how to designe the SpriteMaker (and also the File-Format), so that it is not a pain in the ass the make a simple sprite. I searched the Internet, I did not find anything like it. Is it a good Idea at all to do something like that? Does anybody know an example for such a programm wich I could have a look at? Or does anybody have any other advise fpr me? Thanks a lot! Nathan
Rian
Rian
why reinvent the wheel?
I can imagine a world without hate, a world without fear, a world without war. And I can imagine us attacking that world, because they would never expect it. -Jack Handy
LonelyStar
LonelyStar
quote:
Original post by Rian
why reinvent the wheel?


Because I did not find this wheel inventet jet anywhere.
So, do I understand correct? I should just Load every singel Frame of the Sprites from a bmp-File it put the Animations together Hard-Coded in my Source code? That sounds like very much work for every single Sprite, or not?
I do not really see, that that's the best solution...
Thanks for your answers!!!

[edited by - LonelyStar on May 20, 2003 11:36:39 AM]
hdo
hdo
- decide what data you need to store
- define sprite file header, use plain ASCII file for easy editing
- store cells in standard gfx files, like bmp
sliderag
sliderag
I suppose you are trying to make a way of simplifying the image-loading process and making the average end-user unable to modify your graphics. Assuming that you are creating the original images using some graphics program, you could very easily create some sort of algorithm to scramble the graphics data and file header information so that only you know how to open it. To reload it, you would just perform the reverse of any operations.

In order to implement loading actual animation sequence data, you could put an array of ints or something in the file header to indicate what frame comes next, et cetera.

For more information on various file formats, I recommend www.wotsit.org

"Skepticism.... that great rot of the intellect." - V.H.Bah, what does HE know?Albekerky Software
master_ball
master_ball
You don''t need to hardcode it, just write a sprite class to handle all of your animations, transperancies, etc. The you can script your game so you don''t have to do any hardcoding.




-- master_ball --

------------------------------
We R 138

-- master_ball --------------------------------student seeking future game dev career, advice welcome
LonelyStar
LonelyStar
Thanks a lot for your help Everybody.
I think I will use hdos Idea becuse it sounds most appealing to me.
jonbell
jonbell
I wrote my own animated sprite format / editor and it is a very good idea. SInce writing it a couple of years ago i now use it to create animated textures and use them with OpenGL. It is a good idea and you will learn a lot about 2D graphics and you will have your own format that people cannot easily tamper with. If you want check out my editor it can import other formats via the clipboard, if you want to use it mail me and i will send =you everything you need :

http://www.gamedev.net/community/gds/projects/default.asp?projectID=168

Topic Locked

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

Sign in to reply to this topic.