SFML community forums
General => Feature requests => Topic started by: Xorlium on July 19, 2010, 02:46:13 am
-
Hi!
Maybe it's a long shot, but mng support would be nice, to have animated sprites.
http://sourceforge.net/projects/libmng/
Thanks!
Xorlium
-
I don't see much point myself. Its useful in stuff like browsers when you don't have easy access to a render loop, but in games you should be controlling the animations yourself instead of embedding all this information into the graphic file. Otherwise, its a lot of work to support something that is only severely limiting.
-
There are some animated sprite tools on the wiki. :wink:
-
Hello!
Okay, I understand. What I really want is some way to play compressed video. I have a lot of frames (about 5000) and pictures of size 200x200 or more. Uncompressed, this is way too much to have in memory (2.8 G). The other is to load it frame by frame, but this means I have to have 5000 png's or jpg's, which isn't good either. So I was looking at mng as a quick and easy way to do this, since it's almost like png, so I figured it would be pretty easy to add support for it.
I've already animated it 'by hand', and it does look nice, but it's way too big to do without compression.
-
Ohh yeah, definitely do NOT create videos by just cycling through PNGs. We're much more technologically advanced than that. ;) Only time you'd do that is for scripted scenes using your game sprites, not actual videos.
I don't think SFML has any support for video, but there are cross-platform video libraries out there, and finding one that works with SFML shouldn't be hard to find.
Someone else would probably have to help you from this point as I don't have much experience adding videos to programs - just nothing I really do. Though ffmpeg may be a good place to start looking. Very powerful, stable, and robust cross-platform library.
-
There's a tutorial for how to integrate ffmpeg with SFML on the wiki.
-
Oh yeah, thanks! It's in the french part only, so I hadn't seen it.
Thanks!