Re: [Video Tutorial] Love Tutorial ~45min
Posted: Thu Mar 15, 2012 5:12 pm
That is, after all, the official pronunciation. ("Love")
EDIT: Btw, you do know that setColor accepts tables too (they have to use numerical indices though, iirc).
EDIT2: The update function gets called once, and exactly once for every drawn frame. (Though this isn't necessary, it's the case now, and always has been.)
EDIT3: Isn't it cleaner if you use the state either as the state table itself (so state = splash instead of state = "splash"), or use state as a table index (so states[state] or even _G[state])?
EDIT4: Why imgs["background"] instead of imgs.background? Also, game.load isn't needed in love.load, and enemy_rate-0.01*enemy_rate = 0.99*enemy_rate. Last thing (for now) is your use of table.remove in an ipairs loop.
EDIT5: What about doing l.g.draw(stuff, x*scale, y*scale) instead of storing the x and y scaled?
EDIT6: What's with all the magic numbers? If 12 is half of the player size, why not use player_size/2?
EDIT7: One of the slides is titled "game.lua:splash.draw", that should be splash.lua, of course.
EDIT: Btw, you do know that setColor accepts tables too (they have to use numerical indices though, iirc).
EDIT2: The update function gets called once, and exactly once for every drawn frame. (Though this isn't necessary, it's the case now, and always has been.)
EDIT3: Isn't it cleaner if you use the state either as the state table itself (so state = splash instead of state = "splash"), or use state as a table index (so states[state] or even _G[state])?
EDIT4: Why imgs["background"] instead of imgs.background? Also, game.load isn't needed in love.load, and enemy_rate-0.01*enemy_rate = 0.99*enemy_rate. Last thing (for now) is your use of table.remove in an ipairs loop.
EDIT5: What about doing l.g.draw(stuff, x*scale, y*scale) instead of storing the x and y scaled?
EDIT6: What's with all the magic numbers? If 12 is half of the player size, why not use player_size/2?
EDIT7: One of the slides is titled "game.lua:splash.draw", that should be splash.lua, of course.