I took a day off to go back and write up all I had learned while working with matrices in Gideros to apply transformations such as position, rotation, scale, reflection and skew to sprites.
@bowerandy,
@ar2rsawseen and I had a discussion about it in another thread, but I thought I'd throw up a full explanation of how to use Matrices in this way with Gideros.
http://blog.lotech.org/2013/05/the-beauty-of-using-matricies-to-apply.htmlThe code is available in my github at
https://github.com/nshafer/Matrix@ar2rsawseen integrated my changes into GiderosCodingEasy already, so there are a couple places you can get it from.
This was the foundation of the AnchorSprite class I wrote, and I'll be writing about how that works soon, too.
Thanks,
Nathan Shafer
Comments
A second tutorial/implementation about 4x4 matrices would be great though.
https://deluxepixel.com
I was having an idea of writing something similar about vectors, because there are lots of questions poping up on forum, especially for box2d usage, like how to rotate to specific direction/vector, how to get distance between points, etc.
It seems these are kind of the topics, that some developers missed.
Likes: SinisterSoft
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: SinisterSoft, OZApps
* JSON
* Tween
* Vectors
rather than have them as external libraries. I have a C++ library for vectors that can be used as plugins which make it faster than Lua code but again it should be native then it would be worth.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
I've also been experimenting on native tween lib, but did not notice massive improvements for now (probably due to my poor implementation, not a C coder yet ).
Likes: SinisterSoft
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
It already have all the lua binding. All that is left to do is add gideros headers and wrap in Gideros plugin init methods:
I will test it later, when I'll have more time
Likes: Scouser
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive