red = Color.new(255,0,0)
blue = Color.new(0,0,255)
cover = {score = 0, x = math.random(0,150), y =math.random(0,200), xspeed = -1, yspeed = 1, img = Image.createEmpty(32, 32) }
cover.img:clear(Color.new(0,0,0))
ratio = 14
Resolution = { width = 480, height = 272 }
times = 0

background = Image.load("bg.jpg")

while true do --main game loop

screen:clear() --clear screen

pad = Controls.read()

screen:blit(0,0,background)

if ratio >-1 then
ratio = ratio - 1 
end

for a = 0, ratio do
for b = 0,8 do
screen:blit(32 * a, 32 * b, cover.img)
end
end

if ratio == -1 then
times = times + 1
end

if times == 8 then 
screen:clear()
background = nil
gameloop = nil
dofile("./menu.lua") 
end

screen.waitVblankStart(3)
screen.flip() -- flip onto screen from buffer
end
