Ah, it's the way the function is modifying the x with a local variant.Change the broken lines in create_bird to:
local x=x*8local y=y*8