I'm implementing a custom runtime for MOAI SDK. Generic lua runtime performs all the math in lua, which is obviously a bit heavy, so I've decided to make a specialized MOAI version - it is also written in lua.
Another option could be integrating generic C runtime into Moai core as is, but it won't fit into Moai architecture nicely.
MOAI itself have pretty good feature set for animating things: there are already animation curves with different easing types (but no bezier, so I've just create 10 more keys with linear interpolation between them), action tree and dependency graph.
So, my runtime just creates a skeleton, where Bones are MOAITransform objects that are properly parented. Slots are MOAIProps (sprites), they are bound to corresponding bones. Texture info and rect is stored in Attachment which is just a lua table. Animation object is subclassed from MOAIAnim, all curves and keys gets created at load time.
Currently it is implemented as flower-extension (single file): https://github.com/Vavius/Hanappe/blob/ ... /spine.lua
It's a rough prototype, a lot of work to be done - skins, animation blending, some samples.
Performance increased dramatically. On my iPhone5 generic lua runtime can show 8 dragons at 60 fps and 12 dragons cause drops to 30-50 fps. Custom runtime renders 40 dragons at 60 fps.
Страница 1 из 1
New update is ready:
- Atlas support. Multipage, rotation, whitespace stripping and texture filters are all impemented. Currently there is no support for WrapX/Y (I may add this if somebody needs it)
- Skins support
- Many small bug fixes and some API change
- Animation blending system. This one requires some Moai SDK core modification.
- Animation management, maybe something like AnimState in official runtime. Or something more complex like behavior trees or blend trees from UDK. I'm not currently making a game with this runtime, so it's hard to say what approach would fit the best.
- Physics (box2d) integration. This will come with bounding boxes in editor
- Сообщения: 8
Mark topic unread • Страница 1 из 1
Вернуться в Runtimes