pkulev / xoinvader

Python space game in terminal
http://mmap.me
MIT License
12 stars 1 forks source link

Add animation interpolation #53

Closed pkulev closed 7 years ago

pkulev commented 7 years ago

Abstract

We have animations, we need to interpolate values. There are two common methods: linear equation and curve-based interpolation. As simpler and more appropriate for ASCII GAME ENGINE we used to implement linear interpolation.

Design

Empirical formula is: interpolated = value1 + (value2 - value1) / (time2 - time1) * (current_time - time1) Where:

Implementation details

pkulev commented 7 years ago

PR: #54