I'm a little confused. Or I might be retarded, so bear with me. I come from Corona so my Lua way of thinking is a little different. In corona you dont have to draw your image to the screen, which makes me wonder. Do all languages have to 'draw' the images to the screen after you've added it, except most engines just do it behind the scenes so you don't have to worry about it? Or is this a LOVE specific thing?
My main question being, how are you guys loading up images AFTER your initial load? Since if you call function love.draw after the initial load it will remove everything else drawn and only draw what you last requested. Let's say a tower defense that has 10 different towers shooting multiple projectiles every second. Are you supposed to keep 3-10 projectiles hidden for each tower and call them when the tower attacks? And instead of removing them you hide them again and just change position for them like that non-stop?
The wiki says it draws every frame? That sounds a little scary, which makes me wonder again, are all engines like this where they just do it behind the scenes so you dont know/have to think about it? Quite interesting. So are you guys creating your own groups of images like:
Code: Select all
stuff = {}
stuff[1] = love.graphics.newImage( "what.png" )
stuff[2] = 100
stuff[3] = 100
what = {}
what[1] = love.graphics.newImage( "what.png" )
what[2] = 200
what[3] = 200
images = { stuff, what }
function love.draw()
for i = 1, #images do
love.graphics.draw( images[i][1], images[i][2], images[i][3])
end
end