PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Animations: Frame based or time based?

Hi all!

When I started designing the animation system for my tile-based game, I used time to define the duration that a frame would stay on screen.

For example, an 8 frame animation would show each frame for 125 ms, resulting in 8 FPS.

However, I had to tweak the walking animation of my main character as it needed to be sync'ed to the FPS, and not to time.

What I'm wandering is, have I made a mistake by using a time-based system for the tiles animation?

Are there any PROs and CONs to each system, or is one to be dismissed right off the bat?

I think this is important, as new devices are emerging that have faster CPU, but our games still need to be able to work on older devices.

Thanks!

--Eric
I've gone with the frame based model under GapiDraw for the simple reason that GapiDraw is timebased. The GapiDraw application can be locked to a particular framerate setting GDAPPCONFIG.dwTargetFPS so I saw no need to further complicate matters by basing animation sequences on time.

-- GR
It really depends on the game. If you're deving a generic engine I would implement general routines for both, but if you're implementing a game centric engine then it's directly dependent on what looks and plays best for that specific element.

For instance, a player animation may be better time based, while a fade animation may be better frame based purely for cosmetics. No general rule about this, but neither is difficult to implement.
InexorableTash · 15 Oct 2002, 00:46 UTC
Having worked on animation authoring tools and animation players (but not games), I can agree with the previous conclusions on this thread: it depends!

If you're writing a generic animation core, I would suggest making it time based for the simple reason that you can later slave the "clock" to the frame ticks if you want to make things appear frame-based (i.e. never dropping frames). Going the other direction is harder.