review pt 1

This commit is contained in:
RadsammyT 2026-06-15 18:01:44 -04:00
commit cc14fff5c6
No known key found for this signature in database
5 changed files with 160 additions and 161 deletions

View file

@ -23,6 +23,9 @@ local SQUARE_WIDTH = 10
local SQUARE_HEIGHT = 5
local SQUARE_COUNT = 25
local FPS = 120
local squares = {}
for i = 0, SQUARE_COUNT-1 do
@ -44,7 +47,7 @@ local timer = os.clock()
function draw()
-- Rather than progressing the animation by frame, do it based on
-- seconds, like from os.clock().
if timer + 0.025 < os.clock() then
if timer + (1/FPS) < os.clock() then
ly.clear()
for i, v in ipairs(squares) do
v.x = v.x + v.vx