Add support for MNG (animated PNGs)

Suggestions for new features for inclusion in RTC. Note that all the suggestions that have already been implemented have been moved to the RTC Archive forum.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Add support for MNG (animated PNGs)

Post 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
User avatar
ShaggyDowns
Apprentice
Posts: 39
Joined: Tue Apr 08, 2008 10:59 pm
Location: Here, There, Everywhere!
Contact:

Post 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~
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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...
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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...!
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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...
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Add support for MNG (animated PNGs)

Post by Chaos-Shaman »

i am so glad that this is being fixed, ahhh, where is GG these days?
keep your gor coin handy
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Add support for MNG (animated PNGs)

Post by Lord_BoNes »

He lurks about from time to time... he's got himself a tiny mouth to feed now :P
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Add support for MNG (animated PNGs)

Post 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 ;)
keep your gor coin handy
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re:

Post 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.
Post Reply