I'm still at the very first steps of learning coding and lua and Love and all.
From this : http://www.youtube.com/watch?v=iT2hmjvgj-E
I'm making several changes, step by steps, to have a "horizontal" Invaders, instead of "vertical" one. My enemies are coming from the right, and i'm on the left, moving up and down. I didn't use images, but i have sounds and music, and i made the code so the player can move everywhere inside the left green rectangle without going out with a 3px margin. I didn't do the collision yet.
My bullets are laser beam, so they are small rectangles instead of small dots. My enemies are red, 30x30 px.
My troubles are with the part to spawn enemies. I don't understand what does this, step by step. I got now the program spawn several enemies instead of one, but how ?
Code: Select all
-- for i=0, 10 do
-- enemiesController:spawnEnemy(i * 15, 0)
-- end
Code: Select all
for i=0, 10 do
enemiesController:spawnEnemy(i * 50, 0)
end