Well most class "systems" in lua are like the SECS you talk about.
The basics of using classes in lua is just setting the metatable to it's parent, everything else is just a style of coding.
Before lua I used to use gamemaker and it was very object orientated in that you would create pages and objects, each page would have 'instances' of the objects in them.
In the example above theres a file called page.lua which mimics this functionality. I.e
pages = {}
pages.__index = pages
function pages:create()
local page = {}
setmetatable( page, self )
return page
end
function pages:draw()
--draw self
end
game = {}
function load()
game.page1 = pages:create()
game.thispage = game.page1
end
function draw()
game.thispage:draw()
end
I've been working and understanding the anim.lua but in the 0009 example, each time i reset the anim the program gets more and more slowly and, when creating the anim, she isn't instantly.
The callback is superb to charge next anim from the array.... my tanks will move alone on the screeeeeeeeeeeeeeeeeeeeen jaaaaaaaaaajajajajajajaj
The response is in your code I think, the version of anim.lua isn't the most recent argggggggggg!!!
here is the code with the right version.
Next step is to make 2d moves (one enemy that walks from one cornet to another on the screen)
and next change the angle of the enemy when he arrives to a 'point' where point is each position of the array 'positions' and a transition is the walk from one point to another point.
I got a problem with your moves demo(moves4.love), the animation run to quickly !
I think found the reason, it seems because you update the animation step each call of update().
But the update's call frequency are not fixed.
ok, I will add more examples to my demos program, actually I`m studyng how to add a callback when the count reaches the end aaaaaaaaaaaaaaaaand trying to get velocity and acceleration instead of space...... for usage with box2d basdlfjowasdlfoe all of this makes me crazy. I've get my old physics books.... angles, components, formulas........
And the best is that one month ago, i was a happy systems enginneer ..... that has seeing his son gaming with the wiimote and the wiitanks........... arghhh!!! this is the best!!!