Skip to content

Commit

Permalink
Fixed fps dependant deceleration on apple
Browse files Browse the repository at this point in the history
  • Loading branch information
TRASEVOL-DOG committed May 2, 2019
1 parent 050ecb8 commit a364b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chill_snake.lua
Expand Up @@ -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
Expand Down

0 comments on commit a364b37

Please sign in to comment.