Is it possible? I am using .pngs for most things, but if I want to make a large animated object that I shrink down, how would I do it? Any support besides breaking it down into .dmi tiles and making it a multi-tiler?


Ive never attempted this before, but Ive come up with a solution that may work, condition is that it will probably be rather laggy.
Start off by making up 6 variables, state1, state2, state3, ect... Now make up a bunch of .png's, up too six depending on how animated you want it.
Assign each of the .png's too one of those variables, starting at state1 and working your way to state6 (In the order you want them to play). Dont worry if you dont have enough to fill all the state vars, just leave the last one blank.
Now we create a proc called AnimteObj(). The proc should look something like this.
set background = 1
icon = state1
return //Just check to prevent the proc from doing anything if its not needed.
icon = state2
icon = state3
icon = state4
icon = state5
icon = state6

Now all thats left is to call this loop when new objects are created.
Im guessing this could really lag something down. Im not even sure if it will work, but it should in theory. It depends on if the icon_state var is used when displaying png's.
In response to Dog Man (#1)
As a matter of fact it works pretty well! I tried something like that in a non-standard process(I made it for one mob only). I did it with a 96X96 TWENTY EIGHT frame .png animations heh heh. I didn't really notice too much of a lag problemy believe it or not, but I only 2 instances of these mobs onscreen at once. The one problem I did notice, but could also be a neat effect if used in a certain situation, is that Dream Maker treats each tile of a .png as a seperate mob of that type. My 96X96 animation became 9 mobs. Then, as I randomly had it perform the animation sequence, each of those mob/tiles performed it at different times. At first I thought it was just too much for it to handle, but no! It actually just was performing the animation sequence with each tile being it's own man heh heh. I really hate the thought of having to break down each animation into 1 main .dmi and 8 overlays, but it looks so darn cool I will if I must! Any ideas?

In response to Hepitank (#2)
Maybe the entire .PNG senquence could be a giant overlay for a hidden mob? Hmmmmm... I'ma try that.
In response to Dog Man (#1)
I'd do that like this:

<code>mob/var/frame=1 mob/var/maxframes=5 //Number of frames mob/var/framedelay=20 //Ticks between frames mob/var/pngname="rat" //The filename of a frame will be this, plus the frame number, plus ".png" mob/proc/Animate() icon="[pngname][frame].png" frame++ if (frame>maxframes) frame=1 spawn(framedelay) .() //Call self</code>

That's a lot shorter and a little more flexible.
In response to Hepitank (#3)
Actually I was wrong about the lag - WAY wrong lol. There has to be a way to do it with less lag. An interesting side effect - When I tried to make the bigger files overlays of the smaller mob, it shrunk my larger .png files into a one tile size! I didn't think DM had the ability to manipulate file size like that.
In response to Crispy (#4)
Will that work? The ' instead of " I mean. If it does then it would be a much better solution.
In response to Hepitank (#5)
Yeah, thats the problem with .png's. Its the reason I was worried that this technique wouldnt work.
In response to Dog Man (#7)
So if I sit down and really take the time to split up a 28 frame animation into 9 tiles .dmi files each, does that make me an inefficient coder or a darn good guy who cares about quality! lol here's what I want:

src.overlays += 'swingsword.mpg'

Then all of our problems would be fixed, right? lol maybe not.

Anyone got any ideas for us? Thanks!