Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Lua is a powerful, fast, lightweight, embeddable scripting language. Lua is widely used as a scripting language by game programmers, perhaps owing to how easy it is to embed, its fast execution, and its short learning curve.
0
votes
3
answers
146
views
Implementing framerate independent friction with linear deceleration
Here's my first solution, in Lua style pseudo-code:
local pos = 0
local vel = 100
local deceleration = 80
function Game:update(dt)
vel = move_toward(vel, 0.0, deceleration * dt)
pos = pos + vel …