Today I had a chance to play with Gideros SDK. In order to get a better understanding about the SDK and Lua in general, I decided to port some AS3 code. Here are some code from Keith Peter’s book, Advanced AS3 animations, in Lua.

I haven’t fully understood Lua so these code might look bad in the eyes of Lua experts 🙂 but at least it works.

First, the Vector2D. I don’t know if Lua has a built-in Vector class, maybe it does but as part of the learning process, I wrote one myself. Porting Vector2D.as to Vector2D.lua was almost as easy as copy-pasting.