Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: MNG support?  (Read 4223 times)

0 Members and 1 Guest are viewing this topic.

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
MNG support?
« 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

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
MNG support?
« Reply #1 on: July 19, 2010, 05:03:51 am »
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.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
MNG support?
« Reply #2 on: July 19, 2010, 09:40:19 am »
There are some animated sprite tools on the wiki. :wink:
SFML / OS X developer

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
MNG support?
« Reply #3 on: July 24, 2010, 06:14:43 pm »
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.

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
MNG support?
« Reply #4 on: July 24, 2010, 09:52:33 pm »
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
MNG support?
« Reply #5 on: July 24, 2010, 11:46:07 pm »
There's a tutorial for how to integrate ffmpeg with SFML on the wiki.
Laurent Gomila - SFML developer

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
MNG support?
« Reply #6 on: July 25, 2010, 08:22:26 pm »
Oh yeah, thanks! It's in the french part only, so I hadn't seen it.

Thanks!