dead={}

function dead.start()
    dead.count=0
    dead.pos={}
    dead.vel={}
    for i=1,128 do
        dead.pos[i]=0
        dead.vel[i]=(200+rnd(400))/400
    end
    _update=dead.update
end

function dead.update()
    dead.count=dead.count+1
    for i=1,128 do
        if dead.pos[i]<96 then
            dead.pos[i]=dead.pos[i]+dead.vel[i]
            vline(i-1,0,dead.pos[i],16)
        end
    end
    if dead.count>50 then
        if dead.count>130 then
            prnt("GAME OVER",44,40,2)
        elseif dead.count>120 then
            prnt("GAME OVE",44,40,2)
        elseif dead.count>110 then
            prnt("GAME OV",44,40,2)
        elseif dead.count>100 then
            prnt("GAME O",44,40,2)
        elseif dead.count>90 then
            prnt("GAME",44,40,2)
        elseif dead.count>80 then
            prnt("GAM",44,40,2)
        elseif dead.count>70 then
            prnt("GA",44,40,2)
        elseif dead.count>60 then
            prnt("G",44,40,2)
        end
    end

    if (dead.count>250 and btnp(KEY_SPACE)) or dead.count>500 then
        game_exit()
        game_init(true)
        --_init()
        --_update=update_game
    end
end