I recently obtained a copy of a new book called Marmalade SDK Mobile Game Development Essentials by Sean Scaplehorn, which is currently the first and only book available that covers the Marmalade SDK. The Marmalade SDK is a cross platform game and app development system for a number of mobile devices including Android and iOS, which I have been using now for a few years. With this book being the first and only book and considering that I had spent so much time writing tutorials to help bring would-be Marmalade developers get up to speed that I felt inspired to review this book. In addition, I was approached by Packt publishing some time ago to write this book, but unfortunately due to my busy schedule I had to forego the opportunity. So once I heard that the book was out you can bet I’m gonna read and scrutinise it 🙂
Ok, the first thing I do with all new books is take a scan through the chapter list to see how much content is there, I can usually judge a books value from the contents pages. I’m happy to say that this book passed my initial contents inspection. There’s quite a lot of content squashed into a relatively short book.
The book begins with a short introduction to the Marmalade SDK, including step by step instructions on how to install and setup Marmalade on your computer. It then moves on to building a fairly simple Hello World application complete with a step by step explanation of each of the parts of the program. The book then progresses on to explain many of the Marmalade API’s, below I will cover each section of the book:
* Resource management – This section covers Marmalade resource management. You should pay particular attention to this section as resource management is one of the most important things to get right when developing cross platforms apps.
* 2D Graphics – This section compares IwGL, IwGx and Iw2D then goes into in-depth details of IwGx (my favourite Marmalade graphics API), including materials, streams, textures and polygons
* User Input – This section covers detecting key presses, touch screen (including multi-touch) and accelerometer (would have liked to have seen compass covered also). Gestures sample project is good as it shows how to detect swipe and pinch gestures, something many developers have trouble with
* 3D Graphics – This section has a short introduction to 3D graphics, followed by an explanation on how to render 3D shapes with IwGx (polygon by polygon),, description of view / model matrices. The chapter then moves on to show you how to get data from popular packages such as Blender / 3DS Max into a format that Marmalade can use using the Marmalade supplied exporters. Finally the chapter covers rendering exported 3D data using Marmalades IwGraphics API.
* 3D Animation – This section covers basic PAS animation using matrices, morph target and bone animations, although morph target animations are not covered as in depth as I would like to have seen. I did however have a fair bit to learn from this chapter.
* Fonts, User Interfaces and Localisations – This chapter starts out by covering IwGxFont and bitmapped fonts, including building bitmapped fonts from Marmalade Studio Font Builder. I will admit that I personally prefer and would recommend looking at true type fonts instead (see IwGxFontCreateTTFontFromBuffer for reference) as you do not have to deal with intermediate tools such as the font builder. The author briefly touches on IwUI and IwNUI for user interfaces but opts to roll his own solution which I completely agree with because IwUI is difficult to get to grips with and IwNUI is only supported by Android and iOS, although I would have liked to have seen IwUI / IwNUI covered in a separate section for completeness.
* Sound and Video – This chapter covers playback of compressed audio (for in-game music), playback of sound effects and video playback.
* Support a wide range of devices – This chapter has to be by far my favourite. It not only covers handling different device capabilities and screen resolutions (things that will plague you unless you get the right at the start), it also covers other topics such as dealing with application configuration files, multiple resource sets and compression. This is a must read section, even for advanced Marmalade developers
* Social media and other online services – This chapter covers logging in and out of Facebook as well as posting information to the users wall using the Facebook Graph API. It briefly explains other services that are available but doesn’t venture into any of them with much depth. Hopefully a 2nd edition will delve deeper into these services.
* Extensions Development Kit – If you are coming to Marmalade from iOS or Android and have libraries of code that you would like to use in your Marmalade project, or maybe you want to simply integrate a 3rd party iOS or Android specific API into your app then the EDK is essential for you. The EDK enables you to call those libraries from Marmalade without too much hassle. The Marmalade EDK is impressive and this section is definitely worth absorbing. The author covers the creation, building and usage of an EDK extension for Windows, iOS and Android, providing an excellent step by step introduction to the EDK.
* The skiing app – I must say that I am impressed with Seans example skiing game, he not only provides a 2D version, but also a full 3D version. The code contained in these apps is invaluable for beginners.
In summary, I think that Sean Scaplehorn has done a great job and I would recommend this book to any would-be Marmalade developer, even seasoned Marmalade developers may have a few things to learn from it. I thought I knew just about everything about the Marmalade SDK, but this book proved that there are still a few corners that I need to investigate. I can say that I wish that this book was available when I first started my Marmalade journey. Marmalade is not the easiest of SDK’s to learn to use, but it is the best in my opinion, so its worth the time and effort to learn it properly and go on to create wonderful things. This book will help you along this journey much quicker than stumbling around in the dark the way I did when I first started using Marmalade. The accompanying sample code is also well written and well commented providing a good starting point for your own projects.
Overall I give the book a 9 out of 10. I would liked to have seen more coverage of the likes of True Type Fonts, In-app Purchasing, IwHttp and IwNUI. If a 2nd edition is forthcoming and these sections are covered then I could quite easily give an extra point.