info = { type = "image", title = "Meteors", category = "space", author = "BRRRO", version = "1.0", license = "MIT", desc = "A meteor shower over the night sky", api = 33, } local BG function render() local W, H = gfx.W, gfx.H local t = frame / gfx.FPS if BG then gfx.blit_rgb(BG, 0, 0, W, H) else for y = 0, H - 1 do local f = y / H gfx.rect(0, y, W, 1, 26 + 22 * f, 28 + 24 * f, 60 + 32 * f) end BG = gfx.snapshot(0, 0, W, H) end for i = 0, 35 do if math.sin(t * 6 + i) > 0.3 then gfx.px((i * 47 + 11) % W, (i * 31 + 5) % H, 210, 220, 245) end end for m = 0, 3 do local p = (t * 36 + m * 40) % 72 local hx, hy = math.floor(-10 + p + 0.5), math.floor(4 + p * 0.6 + 0.5) for s = 0, 7 do local x, y = hx - s, hy - math.floor(s * 0.6 + 0.5) if x >= 0 and x < W and y >= 0 and y < H then local a = (8 - s) / 8 gfx.px(x, y, 255 * a + 40, 240 * a + 30, 180 * a + 30) end end end end