Where to Go From Here?
Here is the final example project that you made in the above tutorial.
Now that you’ve built a simple cross-platform game and know the basics about the Moai SDK, there’s a lot you can do. You’re now familiar with creating simple factory functions that allow you to abstract some commonly used operations, like creating a sprite, playing an audio effect or setting a repeating timer. That will help you with component reuse future projects.
All your code can be compiled to run as an Android, iOS, Windows or Mac application, and with a bit of change to the sound system used, as a Chrome client game. Pretty amazing!
From here you can try the following changes to your game to expand your knowledge and familiarity with Moai:
- Modify newSprite so it optionally accepts the position and layer where the sprite should be placed.
- Modify the resolution-independent solution presented here so there’s no stretching of graphics on devices that don’t have an aspect ratio of 3:2.
- Visit official Moai Forums here.
- Check their official documentation wiki, especially the Moai SDK Basics articles.
- Or you can check out the new book, Developing Mobile Games with Moai SDK.
I hope you enjoyed this tutorial on Moai. If you have any questions or comments, please join the forum discussion below!