Book Image

Developing Mobile Games with Moai SDK

By : Francisco Tufró
Book Image

Developing Mobile Games with Moai SDK

By: Francisco Tufró

Overview of this book

<p>Moai SDK is a fast, minimalist, open-source Lua mobile framework for pro game developers. Moai is built around Lua, a common programming language for games, and offers a single open-source platform for both the front-end elements seen by consumers and the back-end infrastructure.<br /><br />Developing Mobile Games with Moai SDK will guide you through the creation of two game prototypes in a step-by-step way, giving you the basic tools you need in order to create your own games.<br /><br />Developing Mobile Games with Moai SDK introduces the basic concepts behind game development, and takes you through the development of a tile-based memotest, and a platform game prototype as well. You'll end up with a good codebase to start writing your own games.</p> <p>You will learn some tricks that come from real life experience while creating a small framework that will allow you to display images, play sounds, grab input, and so on. You'll also learn how to implement physics using Box2D bindings, and everything in Lua, without having to use any compilations. After doing this, we'll take a look at how to deploy your game to iOS and run it on an iPhone.</p> <p><br />With this book, you should be ready to go and create your own game, release it to the Apple Store, and have enough tools to dig deeper into Moai SDK.</p>
Table of Contents (20 chapters)
Developing Mobile Games with Moai SDK
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Concentration Gameplay
Index

Multi-platform development


So you want to make games. You probably have this great game idea and you're planning to release it for the Web, iOS, and Android platforms, and probably if you get traction, publish it on Steam. I bet you already have some concept art, or your Game Design Document (GDD) in place. But, have you planned on how are you going to make your game in order to be able to support all those platforms?

Nowadays you have three options to handle this problem:

  • Build the game n times, where n is equal to the number of platforms

  • Forget about multi-platforms and focus on one or two

  • Use a library/framework designed to support multiple platforms

The first option has an advantage in that you can optimize your game for each platform, ensuring it runs smoothly. Also, you can take care of platform limitations and change how your game looks according to them. But have you thought about the implications of having, say, four different code bases? Each one with their own bugs and ways of implementing logic. Additionally, you may need to hire multiple programmers if you can't find one with in-depth knowledge of all platforms. It's a nightmare.

Forgetting about multi-platforms could be a good choice for you, but in the end, if you make a really successful game (and a probable way of making a game successful is to have it available on as many platforms as possible, since this increases awareness), you'll want to port it to different platforms at low cost, and porting is expensive if the code is extremely tied to a specific platform.

This leads us to the last option, embrace a library or framework that supports multi-platform development. The basic idea is that you detach your code from specific platforms, using a widely-spread language (such as C, C++, JavaScript, or Lua) and build your game for different platforms using a single code base.

Note

A real-life example on the benefits of multi-platform development is Zipline Games' Wolf Toss. It had a 3-month development cycle and was released simultaneously on iOS and Android. If it were to be built for each platform, it'd have taken about three months for each platform, or a team twice as big. So, by developing Wolf Toss with Moai SDK, the studio spent half of the money that it would take with a platform-specific approach.

This approach has been gaining popularity lately because of its simplicity and powerful consequences. Many game development environments and frameworks that take this approach have seen the light of day in the last few years. One of them is Moai SDK.