Longer post here.
The short version: Lua & Corona and hardcore game development are new to me. I’ve dabbled and had a few projects, both professional and personal, over the past decade, but nothing like the full-time opportunities/gigs I’m getting now that mobile hasÂ legitimizedÂ an alreadyÂ legitimizedÂ industry. Utilizing Robotlegs has made the GUI/HUD development for games super simple in a foreign and strange land. It’s also helped me learn more about Lua & Corona by breaking out of my comfort zone from within a comfort zone. Motivation is a fragile thing that must be cared for & nurtured. This helps me not get frustrated when I hit brick walls with the limited time I have in researching new technologies.
Keep in mind this is one the design goals, and thus helpful features of PureMVC being ported to other platforms.
…also, I figured it’d help others.
You can get it on Github; it has an example in there too to show you one way to use it.
You just require the classes in, and extend the rest. Some gotchas if you’re an ActionScript 3 Developer:
- I haven’t figured out Lua’s annotations and metadata strategies. As such, you have to manually inject dependencies.
- This includes manually mediating your Views via context:createMediator/removeMediator(viewInstance).
- Another gotcha is put a classType property on your Views till I figure out how to do reflection in Lua.
Keep in mind this isn’t an official port, nor is it finished. I’m still learning and it’s a proof of concept. I’m finding I’m only using it for game GUI and HUD stuff; and that’s like only 5% to 20% of the game code… so while it’s helpful for both learning & development, I’m sure there are strategies/ideas I’m not thinking about that you’re welcome to add/modify, etc.
Hope this helps you!
Download/Modify – Robotlegs for Corona on Github.