ashish2199 / Aidos

A beginner friendly project with aim of creating our own version of Bomberman.
GNU General Public License v3.0
41 stars 27 forks source link

added deltaTime. Refactored tickDuration #40

Closed ItsStolas closed 6 years ago

ItsStolas commented 6 years ago

Added deltaTime in. This is the time in between frame updates.

I made the movement multiply by this deltaTime, which makes the movement framerate independent. (So the game doesn't appear to run in fast-forward if the user has a powerful machine).

We should do this for any values that we add every frame.

I also changed the name of 'tickDuration', as it doesn't represent the tickDuraction, but the current gametime in nanoseconds.