I started playing with löve a few days ago and was surprised how easy and intuitive it is!
So I decided to learn more about it by programming an asteroids clone. Everything has gone smoothly until I tried creating the bullets - they don't move away from the ship, even when I turn the initial velocity on them way up. The bullets do start moving, however, when something bumps into them.
I'm sure I'm just making some obvious and stupid mistake, but I thought I'd post my code up here for help. The bullet code is in the /classes/ship.lua file, and I think the pertinent code is in the "Ship:shoot" function on line 58:
I know why it keeps moving after you've collided with it, it's because you continue to use the same body, while adding more and more shapes. The problem with that makes sense.. the body goes to sleep, either use setSleep when shooting, setAllowSleep when creating or create a body everytime you shoot.
@Robin - sorry 'bout that. I think OS X's built-in archive function keeps the .zip file format invisible until I upload it. I'll try avoiding that in the future.
@bartbes - thanks! That makes sense. I got the bullets working by just making a separate bullet class that creates a new body each time. I'm not sure I understand the setSleep or setAllowSleep concept though.