Monday, 21 January 2013

Smooth Animations

Yep, I wasted few hours making actors in Surrounded slide from one tile to the next. Doesn't feel like a waste, though - the effect's quite pretty.

The moving animation is independent of the engine, so the user can interrupt it at any point with their next command. The actor sprite then jumps to the next position and resumes movement. In order to make this smoother, the game remembers the length of time the user gave the last few animations. It averages these to predict the most appropriate speed for the next animation. Thus, if the user types input at a more-or-less constant rate, the sliding will mostly be continuous, without pauses or jumps. Artefacts may be noticeable at the first of a sequence of fast moves, or after a series of fast moves.

Also, actors fade in when they first get put on the map.

No comments:

Post a Comment