Further to LennyLen, there is secure logical problem:
16 if(bullet[i].x > 200)
17 bullet[i].live = false;
19 else if(keys[LEFT])
22 if(bullet[i].x > 200)
23 bullet[i].live = false;
As I do not know the directions of your coords, line 16 or
line 22 hast the wrong comparison.
Same goes to y.
I saw this only now, it seems, as if in the frist routine y and x is messed up:
Probably should be:
if (bullet[i].y < 200)
The original bug can be, you spawn bullets, which vanish, the bullet seen later is the bullet after...maybe.