name = "DVD" authors = {"AviiNL"} description = "Bouncing 'dvd' Logo" local width = g13.display_width local height = g13.display_height local x = 22.0 local y = 6.0 local x_direction = 1 local y_direction = 1 local speed = 20 local size = 3 function update(delta: number) x = x + speed * delta * x_direction y = y + speed * delta * y_direction if x <= size or x >= width - size then x_direction = -x_direction end if y <= size or y >= height - size then y_direction = -y_direction end color_x = (x / width) * 255 color_y = (y / height) * 255 color_z = 255 - (color_x + color_y) / 2 g13.set_color(color_x/2, color_y/2, color_z/2) g13.clear() for sy = -size,size do for sx = -size,size do g13.set_pixel(x + sx, y + sy, true) end end end