Just to thicken the plot a bit; what happens if you do several
setTimeout's after each other in Win9x?
setTimeout(<function>, 55)
setTimeout(<function>, 55)
setTimeout(<function>, 55)
setTimeout(<function>, 55)
What would the interval be between the timeouts? Would they execute
close to each other, or would there be 55 ms between them? I can't test
this right now, since I don't have access to Win9x at the moment.
Also, I'd be keen to have a more in-depth explanation of how your
multithread code works. You mentioned that it allows you to have smaller
timeslices on Win9x - how? If you have any way of making the timeslices
on Win9x systems shorter than 55 ms, I would very much love to find out
about it.
Finally, yes, my timing correction of animations will create jumpy
animations on Win9x systems, simply because it's impossible /not/ to
create jumpy animations when the timeslice between steps is 55 ms. The
pattern was made with two points in mind: 1) Make animations perform as
they normally would on "slow" systems without downgrading performance on
faster systems, and 2) Make the motion of animations always be constant,
regardless of how fast the system is which is playing the animation and
whether there are inconstant timeslices between steps.
In other words, it shouldn't make animations /more/ "jumpy" on slow
systems than they would be otherwise - it would even improve the visual
impression on slow systems if the timeslices are irregular. Do correct
me if I'm wrong. The drawback of the approach is of course that you
loose some CPU-time in calculating the time between animation steps,
although in more complex animations I personally think that's negligible
compared to the visual improvement.
I think I'll finish an example of a more complex animation where you can
turn on and off use of this technique and submit it for testing by you
people to find out if theory is as sweet as reality.
Cheers,
Daniel Aborg
David Cushman wrote:
>
> Daniel,
> You are absolutely correct, winNT and Win2K both
> have a minimum timeslice of 10 ms and under IE will
> default to multiples of that amount. Under NS, any
> number above that minimum will closely execute.
> According to the results we are getting back, Opera
> also defaults to multiples of the minimum timeslice
> under mac platforms but appears to closely reflect the
> setting under win (this needs verifying).
>
> Results so far (please verify these if you have these
> systems)
> Minimum timeslices:
> win9x 55 ms
> winME 55 ms
> winNT 10 ms
> win2K 10 ms
> Linux 1 ms (need verification)
> mac 2.75 ms (based on test multiples, need more
> data here, I suspect differences in different mac
> platforms and I am "Mac" ignorant, if someone could
> teach me I would be greatful)
>
> Your timing correction code for animations looks good.
> But on our slower win9x systems, I suspect it will
> create very "jumpy" animation. I will add this code
> as an option under the animation timing example
> tonight and we can all compare and report back.
> However, it is "fantastic" for those developers who
> want to use the setTimeout to do timeline scripts. I
> prefer using the events method at this time as I am
> more interested in how smooth it plays back (yes, I do
> program in Flash, but it is not compatible with other
> elements on the screen. It makes fantastic animated
> insets - ducking rocks before they are thrown).
>
> Cheers,
> Dave C. "You Changed What?!?"
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
--
Daniel Aborg <[EMAIL PROTECTED]>
T: 0207 445 447 M: 07720 29 44 40
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev