From a364b37c4a960e1b1719afa96837b8d97d547cfc Mon Sep 17 00:00:00 2001 From: Remy Date: Thu, 2 May 2019 20:13:16 +0200 Subject: [PATCH] Fixed fps dependant deceleration on apple --- chill_snake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chill_snake.lua b/chill_snake.lua index 6667ba1..19f3e8d 100644 --- a/chill_snake.lua +++ b/chill_snake.lua @@ -136,8 +136,8 @@ function update_apple() apple.x = apple.x + apple.vx * dt() apple.y = apple.y + apple.vy * dt() - apple.vx = apple.vx * 0.5 - apple.vy = apple.vy * 0.5 + apple.vx = lerp(apple.vx, 0, dt() * 15) + apple.vy = lerp(apple.vy, 0, dt() * 15) -- controlling game space borders local hw, hh = 4, 1