[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Animation class suggestion

From: Kai Sterker
Subject: [Adonthell-devel] Animation class suggestion
Date: Sun, 20 May 2007 22:49:59 -0700

Tyler (and anyone else interested),

when integrating the map code with the new animation class, I've
noticed that the delay between frames isn't handled yet. And that
brought me to an idea.

In v0.3 the delay was handled by calling update() of all the
animations and incrementing counters until it matched the delay value.
That added quite some overhead. With v0.4, where apparently all map
objects are animations, it'll be even less efficient.

However, it should be possible to use the time_event class and a C++
callback to actually get all animations to update based on an event.
That means, a lot of method calls simply fall away, since the call to
update will only be made when the frame actually changes. The time
event handler itself should be quite efficient too, as all registered
timers are sorted by the time they need to be triggered. So even when
we have to make frequent calls to time_event_manager::raise_event(),
we find out very quickly if something needs to be triggered or not.

I'll go ahead and implement this to get the map stuff working. If you
have comments or suggestions, please let me know. Again, help with
that is also appreciated.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]