Page 1 of 1

Add support for MNG (animated PNGs)

Posted: Sat May 10, 2008 2:12 am
by Gambit37
Would it be hard to add support for MNG?

http://www.libmng.com/

I've been experimenting with it and it can do some really cool stuff.

Would I be right in thinking that using this format would allow the MNG animations to run at a speed independent from RTCs clock? If so, this would be super cool to allow really smoothly animated effects which currently aren't possible using RTCs format.
It would be awesome if support for this could be added! :D

Posted: Sat May 10, 2008 2:57 am
by ShaggyDowns
I totally agree,

I use animations currently, but not for monster attacks or deaths. It just doesn't sync up correctly, but would be awesome if it could! Animations seem to work fine for their front, back, & side movements however. Could this be implemented? It would be really cool to have proper death animations for my monsters!

~SD~

Posted: Sat May 10, 2008 10:34 am
by George Gilbert
Gambit37 wrote:Would I be right in thinking that using this format would allow the MNG animations to run at a speed independent from RTCs clock?
ShaggyDowns wrote:I use animations currently, but not for monster attacks or deaths. It just doesn't sync up correctly, but would be awesome if it could!
Note that these are 2 totally separate issues.

- Gambit's request is for animations to display their frames faster than 1/6th second per frame. It's all to do with the size of the time gaps between each frame.

- Shaggy's request is for animations to start their frames in a well defined place. It's all to do with synchronizing the first frame of an animation with something else (e.g. a monster attack).

The latter is considerably easier than the former...

Posted: Sat May 10, 2008 2:30 pm
by Gambit37
Ah, yeah, but you like a challenge... ;)

I'm probably showing my ignorance, but is the RTC clock the limiting factor in all this, regardless of what format animations you throw at it?

Posted: Mon May 26, 2008 11:40 am
by George Gilbert
Gambit37 wrote:I'm probably showing my ignorance, but is the RTC clock the limiting factor in all this, regardless of what format animations you throw at it?
Yes - fundamentally, RTC (and DM / CSB) are not a real time games, they are turn based games (albeit with very fast turns).

To implement completely arbitary gaps between animations it means that the frames have to be drawn at completely arbitary times (specifically, not once per turn).

That's not to say that it can't be done, it's just that it will require quite a lot of work...!

Posted: Mon May 26, 2008 11:41 am
by George Gilbert
ShaggyDowns wrote:I totally agree,

I use animations currently, but not for monster attacks or deaths. It just doesn't sync up correctly, but would be awesome if it could! Animations seem to work fine for their front, back, & side movements however. Could this be implemented? It would be really cool to have proper death animations for my monsters!

~SD~
This is now done for V0.50

Posted: Mon May 26, 2008 2:59 pm
by Gambit37
George Gilbert wrote:
ShaggyDowns wrote:I totally agree,
I use animations currently, but not for monster attacks or deaths. It just doesn't sync up correctly...~SD~
This is now done for V0.50
Whoo, cool -- does this mean that animations for *anything* will now always start at their first frame? For example, THOM had a problem that he couldn't use an animated image for an alternate switch as it would start at arbitrary frames. Would this now work?

Posted: Mon May 26, 2008 9:18 pm
by George Gilbert
Gambit37 wrote:Whoo, cool -- does this mean that animations for *anything* will now always start at their first frame? For example, THOM had a problem that he couldn't use an animated image for an alternate switch as it would start at arbitrary frames. Would this now work?
The animation start point for any given item is reset whenever something "interesting" happens to that item. For example, when the item is created, triggered, activated, thrown etc.

So to answer your question, in principle, yes. In practice, have I found all the places in the code where "interesting" things happen...dunno!

If I havn't, they're bugs and I'll fix them though...

Re: Add support for MNG (animated PNGs)

Posted: Thu Feb 25, 2010 2:47 am
by Chaos-Shaman
i am so glad that this is being fixed, ahhh, where is GG these days?

Re: Add support for MNG (animated PNGs)

Posted: Thu Feb 25, 2010 3:46 am
by Lord_BoNes
He lurks about from time to time... he's got himself a tiny mouth to feed now :P

Re: Add support for MNG (animated PNGs)

Posted: Thu Feb 25, 2010 3:18 pm
by Chaos-Shaman
yes yes, the family, and family comes first, and if this is the case, RTC may be on hold for some time :( when DM came out on the amiga, i had two children in diapers, and i remember how my partner would be pissed at me for playing the game for 18 hours a day leaving no time for the family until i beat it. i am not one to give up a good game easily.
Congrats GG, where ever you may be. just one thing to say, we are a part of your family too ;)

Re:

Posted: Thu Mar 18, 2010 2:18 pm
by Gambit37
George Gilbert wrote:The animation start point for any given item is reset whenever something "interesting" happens to that item. For example, when the item is created, triggered, activated, thrown etc.
So to answer your question, in principle, yes. In practice, have I found all the places in the code where "interesting" things happen...dunno!
If I havn't, they're bugs and I'll fix them though...
I can confirm that you didn't find them all George. ;)

I was testing out trying to synch an animation on the entrance screen with some music. Obviously this won't work at all in 0.49, but in the beta of 0.50, the entrance screen is improved, but still out of sync. It seems as if the animations start in memory during the loading sequence, so when you finally see the entrance, they have already started playing. It's out by a few seconds.