How To Make a Simple Game with Moai

This is a tutorial for beginner Moak SDK developers, you’ll learn how to create a new animal-feeding game for iOS from scratch. With Moai, you don’t need to fear being locked in to one platform — you can let everyone enjoy the fruits of your labors! By .

Leave a rating/review
Save for later
Share
You are currently viewing page 7 of 7 of this article. Click here to view the first page.

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!