SFML community forums

General => SFML projects => Topic started by: gsaurus on July 17, 2011, 01:47:39 pm

Title: Open Spriter
Post by: gsaurus on July 17, 2011, 01:47:39 pm
Aims:
So basically the idea is that people make sprites on a GUI, mainly by importing images and defining animations, and developers just load and use the resulting files. People can share sprites to be used on games, etc.

Planned for first version
The last two features are from Codex (http://data-codex.sourceforge.net/).
The layered frames are optional, can be used for things like this (http://www.youtube.com/watch?v=dHQqyc6CjX0).

Sometime I'd like to support frames based on text, shapes/SVG, not just images, maybe one day..


Currently I'm working on a core abstract lib, and a binding for SFML. I should be releasing a first build soon so I can have your feedback and help.
Bindings for SDL etc should be easy to create but I don't plan to do it myself.

Currently using an existing sprite looks like this:
Code: [Select]
osf::SpriteResource resource;
resource.loadFromFile("MySprite.osf");
osf::Sprite sprite(resource); // inherits from sf::Sprite, so you can move, rotate, etc
...
// set sprite to static frame number 10
sprite.setFrame(10);
...
// set animation with the key 31.
sprite.setAnimation(31);
...
// update animation (time passed in milliseconds
sprite.update( window.GetFrameTime() );
...
// set animation progress to 30%
sprite.setProgress(0.3f);



The GUI will probably have to wait, or if someone want to volunteer for it it would be cool too. I did a prototype some months ago (it's not compatible with the new format)
(http://pessoa.fct.unl.pt/gdc18989/EvE/open-spriter-screenshot.jpg)

Please let me know what you think of the idea and if you think people would use it  :wink:
Title: Open Spriter
Post by: Mikey on July 17, 2011, 06:40:04 pm
This looks great, and definitely a useful little tool for those who will be using animated sprites.

 A few little queries;

 Will the OSF file format be processor architecture friendly? I.e. Will a file generated on a 32bit machine work on a 64bit machine?

 Can the programmer specify an animation range using it's name, or a short name defined within the GUI?
Title: Open Spriter
Post by: gsaurus on July 17, 2011, 08:00:46 pm
Quote from: "Mikey"
Will the OSF file format be processor architecture friendly? I.e. Will a file generated on a 32bit machine work on a 64bit machine?
I don't have experience with 64bit yet but I hope so. Codex lib is responsible for streaming the information, but now with this (http://www.sfml-dev.org/forum/viewtopic.php?t=5007) I'll have to think more about it..


Quote from: "Mikey"
Can the programmer specify an animation range using it's name, or a short name defined within the GUI?
Hm, I'm not sure what you mean, but I guess it's about the integer keys on animations, and the problem of consistency between sprites using the same animation key for completely different things. For the gui I though on using files describing animations presets, only useful for the editor. Something like
Code: [Select]
1 standing
2 walking
3 running
etc
So all sprite files created based on the same preset would be compatible. But from a programmer side there's only integers anyway.