Under The Bridge Under The Bridge

Category: Reviews
Review: Continuous Delivery for Mobile with fastlane

 We’ve been idly following fastlane since it was just deliver, and it has had a lively lifespan indeed from obscurity to Twitter to Google and all; so it’s reasonably sure it’s approaching industry standard status at this point, which would make a canonical introduction to it handy indeed. And, why, look what we have to review today, a shiny new copy of

Continuous Delivery for Mobile with fastlane

Fastlane Book Cover

 

Competitive mobile apps depend strongly on the development team’s ability to deliver successful releases, consistently and often. Although continuous integration took a more mainstream priority among the development industry, companies are starting to realize the importance of continuity beyond integration and testing…

What You Will Learn

  • Harness the fastlane tools for the Continuous Deployment strategy
  • Integrate Continuous Deployment with existing Continuous Integration.
  • Automate upload of screenshots across all device screen-sizes
  • Manage push notifications, provisioning profiles, and code-signing certificates
  • Orchestrate automated build and deployments of new versions of your app
  • Regulate your TestFlight users and on-board new testers

It’s actually not 100% accurate, that title; a more accurate one would be “The Complete Beginner’s Guide To How To Ship An iOS App With fastlane Making It Suck Less.” That wasn’t quite as buzzword-compliant, we suppose.

If you do happen to be an iOS-focused complete beginner at dealing with iTunes Connect and all, and you intend to follow the common path of Crashlytics and/or TestFlight for beta distribution … then yes, we believe we can recommend this unqualifiedly as the most coherent introduction out there, go buy it and you can stop reading now!

If you’ve already got this distribution thing sussed, and you’re just curious about whether this fastlane thing that all the cool kids are into these days is worth adopting … hmmm, we’ll give it a three out of five. It’s worthy at explaining what it does explain, but to make it five-star for the more accomplished developer, we’d need two star-worthy things:

1. Documentation on the Android setup and shipping process as thorough as there is for iOS. There’s about six pages worth here, which is pretty thin compared to the iOS coverage. 

If you couldn’t care less about shipping for Android, of course, then this is not a valid criticism.

2. More thorough examples of how to integrate with CI and testing services other than the selected ones, to actually deserve the Continuous Delivery label. As a specific omission we were looking for, the book promises

The next step in this beta lane is to distribute our app via two popular testing platforms: TestFlight and HockeyApp.

… and then goes on to not deliver on this promise for HockeyApp. Since that was, in fact, the main thing we were looking for in this book, how to set it up with a HockeyApp-centric workflow, we were disappointed. So we figure that we’ll take another point off for not being an encyclopedic reference. Yes, we’re brutal. Again, if you are a complete beginner and/or you do use the standard tools that the book does cover, this is not a valid criticism either.

Should you be teetering, here is the publisher’s page and you can check out the TOC and all; plus the code repo for the examples — adding fastlane to Firefox — is here on Github.

But definitely, if you know anyone who’s just getting into iOS development, we’d rate this the best introduction there is out there without question!

On the other hand, as long as we’re talking about fastlane and all, there is the odd pocket of resistance to it you might read for balance:

Five Options for iOS Continuous Delivery Without Fastlane

If you’re looking to escape Fastlane’s frequent build-breaking changes, these five options for iOS continuous delivery are worth examining…

… but that’s definitely a minority opinion, most people find it adds at least some value.

As an example, up there where I docked it a point for not including less popular CI/deployment options? Here is an example of one such:

How to set up GitLab Continuous Integration for iOS projects without a hassle

Why GitLab-CI?

We had GitLab and we couldn’t find any reason for using something else. So, we decided to use it, why not 😎? As for me, the GitLab-CI/CD is more developer-oriented than Jenkins. At least because it is aimed at the pipelines, tags, and branches, unlike Jenkins with jobs. And we have to use those things to get the necessary job instead of configuration without code. GitLab-CI/CD seems like a tool for running scripts on a remote machine; no more, but enough.

Some time later, we realized what it doesn’t matter what to use if we use Fastlane. Because it was able to do all what we needed. As the result, we got freedom from other tools. So I can strongly recommend using Fastlane instead of manual scripts or other approaches…

And, of course, we do find several mentions of “Hockey” over at 

fastlane/examples: “A collection of example fastlane setups”

so it’s not as if their omission is a crippling lack in any way. We just figure a book like this should aim for canonical completeness!

UPDATES:

Build it, Test it, Deliver it! Complete iOS Guide on Continuous Delivery with fastlane and Jenkins

Effortless iOS Code Signing With Match

MyLivePhoto

Way back in the day our first reaction to Live Photos was er, Apple reinvented the GIF, yay? But obvious though you’d think a simple conversion app would be, far as we’ve noticed no one got off their butts and actually did anything about it … until now!

Our magnificently esteemed (even if he is French) coworker JB Stevenard’s latest is called — just to make it totally clear —

MyLivePhoto – Convert Live Photo – GIF Frame Movie

and, y’know, you want those Live Photos as a movie or a GIF or a picked frame, this really does look like the easiest way there is to go about it. So we recommend you grab that while it’s free!

And just as a demonstration of how to use its power for EVIL … here’s your FULL SIZE LiveGIF of the morning rush hour traffic over in Ha Long Bay:

So yep, yep it works. Might want to apply a little more common sense than we did here to how you actually use its output, but if you want to have a 5 meg pageload … now it’s easy!

Review: Learning iPhone Game Development with Cocos2D 3.0

Quite the twisted trail it’s been since we first noticed cocos2d-iphone way back in 2008 and watched it grow, split, recombine, be acquhired, and eventually have the founder jump ship for the C++ version cocos2d-x. It was looking bleak there for us peoples tasteful enough to revile the thought of sullying ourselves with other, lesser, platforms for a while there until Apportable stepped up to support what’s been a surprisingly frantic divergence from the cross-platform strains, not least the currently misnomed rechristening as “Cocos2D-Swift”.

And today, we’re going to take a look at the first and only so far book out there on learning modern Cocos2D-Swift,

Learning iPhone Game Development with Cocos2D 3.0

0144OS_Cocos2D 3.0.jpg.png

The book follows the style of introducing concepts over the course of developing a single game called ‘CocoHunt’ which can be downloaded from the App Store and has its source available on Github. It assumes basic familiarity with Xcode and Objective-C, focusing solely on Cocos2D coding. And, unfortunately, that means no discussion of SpriteBuilder, which our first reaction is a significant flaw in an introductory book to modern Cocos2D. But let’s take a walkthrough of the book, as described by itself in the Preface:

Chapter 1, All About Cocos2D, provides basic information about game engines, additional information about Cocos2D, as well as examples of great games created with Cocos2D.

In which our above concern is addressed:

However, using SpriteBuilder doesn’t eliminate the need to write the code and understand how Cocos2D works. This is why, I strongly believe that first you need to learn pure Cocos2D and after that it will be very easy to start using SpriteBuilder and make your life even easier.

Well, that’s a valid perspective. Ours is to put off learning anything that there’s easier ways to accomplish, since after 20+ years in this industry we figure that knowledge becomes obsolete so fast that investing more than the minimum you can get away with is generally a misallocation of resources.

Chapter 2, Hello Cocos2D, guides you through the installation process and reviews the contents of the Cocos2D distribution package and demo projects that come with it.

And runs you through a hello world project with a sprite and label. Straightforwardly done.

Chapter 3, Cocos2D – Under the Hood, describes the architecture of the framework and its main classes. In the second part of this chapter, we will review several Cocos2D configuration options.

This would have been a good chapter to use as an introduction to SpriteBuilder, relating the architecture to SpriteBuilder’s layout. As it is, it’s a bit awkwardly placed to break rhythm. As the author acknowledges:

I know that you want to start writing the code and creating games as soon as possible. If you just can’t fight this feeling, then skip to Chapter 4…

That we’d say is a solid clue that our suggestion is a good one. (OK, we swear we’ll stop harping on SpriteBuilder now. Really.)

Chapter 4, Rendering Sprites, begins to unveil the process of game creation. In this chapter, we will add a game scene, background image, player, and enemy characters. We will review some of the main properties of Cocos2D nodes and will make them move, rotate, flip, and so on.

Remarkably well done chapter! As well as all the display basics you’ll need, smoothly works in anchor points, character composition, and use of TexturePacker even.

Chapter 5, Starting the Action, covers the process of controlling the game using states, handling touches, or using a gyroscope to get player input. At the end of this chapter, we will have a skeleton of a playable game.

Another excellent chapter, thoroughly covers interactivity as described and works in some good coordinate spaces and vector math discussion too.

Chapter 6, Rendering Text, shows you how to display score, lives, earned points, and winning and losing labels. In this chapter, we will use both True Type and Bitmap font-based labels of Cocos2D and will discuss benefits and performance considerations.

Straightforward and competent; covers Glyph Designer too.

Chapter 7, Animations and Particle Systems, demonstrates the use of different animation types and shows how to use particle systems to get really cool effects such as explosion and fire.

Competent enough for a beginner book, although we would’ve liked a little more on skeletal animation; covers Particle Designer too.

Chapter 8, Adding Sound Effects and Music, shows how to easily add sound effects and music, switch between music tracks, and adjust audio properties.

Again straightforward and competent, nice that it mentioned sourcing and attributing from Freesound, Nature Sounds For Me, and NoSoapRadio. Cool stuff, check them out!

Chapter 9, User Interface and Navigation, concentrates on creating a convenient user interface using Cocos2D controls such as buttons, the scroll view, table view, and so on. In this chapter, we will see how to create scenes that exist in most games, such as the menu scene, about scene, and so on, and how to navigate between them.

That sound like a lot to cover? Yes it is, and the “and so on” covers a good many asides. There’s a bit too much crammed in here we think, probably would have been a bit easier to follow if focused into UI and navigation chapters; but it’s certainly very good as is.

Chapter 10, Physics, shows how to use the physics engine in your game. In this chapter, we will create a playable level using the physics engine; we will review how to create physics objects, adjust their properties, detect and filter collisions, use joints, and so on.

Yet another exceptionally well done chapter. Can’t think of an introduction to using physics engines we’ve ever read that was better than this, actually; balances features and explanation just about perfectly to get you started.

Chapter 11, Working with Tile Maps, explains tile maps and shows the complete process of creating and using a tile map in the game.

Including parallax animation as well, which is a nice feature to have explained in a learning book.

Chapter 12, Standing Out – Integrating Game Center and In-App Purchases, covers integrating Game Center and adding In-App purchases to the game.

For some reason, you have to download this chapter separately and the Preface link doesn’t work. But once you get past that gratuitous annoyance, again a straightforward and competent explanation of the described tasks. And bonus points for a nice collection of various asset-finding links for the penniless indie to finish off the book with!

So overall, we’re pretty darn impressed here, quality ranges from nicely done to downright outstanding all the way through the book; the best introductory Cocos2D book written yet, we’d say. Our only serious problem with it is that there isn’t any introduction to SpriteBuilder. And there’s a book devoted to that in progress by Steffen Itterheim, so if you’re more of a visual tool type person you might want to wait for that one. But if you want to get started NOW!, or you’re not a visual type person, then hey this is your best and most current choice for learning Cocos2D-Swift!

Review: Unity 3D Game Development by Example

So, as we mentioned last time, we’d decided that it’s just about time to get to know the Unity game engine development environment a bit, and Packt Publishing was gracious enough to provide a review copy of their Unity 3D Game Development by Example video course to help us out with that!

5305EXP_Video_0.jpg.png

The fast, easy way to start developing Unity games

There’s no better way to begin building impressive video games than Unity. The free software gives you the tools you need to create stunning 3D games and publish them for computers, phones, tablets, and the web.

This friendly video course will teach you the Unity from scratch and develop fun example games, deploying them to your favourite platforms…

TL;DR: Most Excellent orientation walkthrough — just exactly the level of getting our feet wet enough to be comfortable if we absolutely had to dive in that we were looking for. Unqualifiedly recommended as your introduction to Unity if you’re Windows and Android centric, minor qualification if you’re OS X and iOS centric that it’s a just a bit of an ill-fitting suit, not perfect but not too hard to match up with either.

Walkthrough Notes: What you download is a folder of HTML-wrapped browser-presented video — reputed to work on any modern desktop browser, but not iOS devices — split up into eight sections:

Section 1. Learning How Unity Thinks [22:01 mins]: Understanding Unity UI; Unity 3D Project Structure; Game Objects and Components; MonoDevelop Explained; Creating your first Component; Pro-Tips: Understanding A MonoBehavior

This section jumps right in to describing the main window, so it assumes that you’ve already figured out how to get Unity installed on your system. Which is a simple and free download, we got version 4.3.2. The video is taken on a Windows machine and the screen is arranged moderately differently than how the sample project shows up in said 4.3.2 OS X download, but nothing that makes any real difference, we thought … until it said “use the middle mouse button to pan”. Yeah, that’s a tough one for us. OK, so it’s not perfect for the OS X user. Still, it’s pretty darn close. We’re also informed that if we don’t know C# we should go learn it first as that’s what all the scripting examples will be in. Yeah, that’ll happen. But any C-ish syntax knowledge is fine to follow along with this course.

Section 2. Building a Scene [16:13 mins]: Creating and Loading a Scene; Building and Manipulating GameObjects; Adding Components to GameObjects; Building and Using Prefabs; Pro-Tips: Understanding Unity Cameras

All pretty straightforward, and workable if not precisely elegant. Yep, we’re starting to see why Unity is widely considered the premier design environment.

Section 3. Scripting Interactivity [20:26 mins]: Component Basics; Useful pre-built components; Trapping Player Input; Communicating Between Game Objects; Pro-tips: Building a Messaging System

On the other hand, nothing to confirm your low opinion of the development environment like finding out that building a messaging system is considered a “pro tip” instead of something taken for granted, that’s for sure. And this MonoDevelop thing you use to write your C# scripts in … well, it’s no Xcode, that’s for sure. Prejudice about this kind of environment being suited well only to projects that don’t involve any serious programming: Confirmed.

Section 4. Sound and Music [17:49 mins]: Unity Audio Basics; Building and Playing Game Music; Adding 3D Audio to the world – Controlling Audio Sources; Pump Up the Volume – Setting Volume and controlling Music Playback; Pro-Tips: Saving Player Preferences

Another straightforward section to breeze right through. Saving preferences counts as a “pro tip” as it points out the existence of System.Xml.Serialization. Yep, if you’re used to iOS SDK programming adopting this is going to be quite the shock.

Section 5. Building UI [30:51 mins]: Unity GUI Basics; Skinning your GUI; Game Experience as GUI; Game Experience as GUIScore and Time Displays; Pro-Tips: Pausing and Ending a Game Round

By “UI” here they mean HUD-type displays.Throws in some side tips like internal glows to add a little style to the experience too.

Section 6. Finishing the Game – Title Screens and Menus [11:38 mins]: Building a Title Screen; Building the Main Menu; Pro-Tips: Create a Pause Menu by Reusing your Work

Which is tying together the screen creation and GUI layout stuff that we’ve been introduced to already.

Section 7. High Score (Saving and Loading) [19:28 mins]: Tracking Player Score in Your Game; Building the High Scores List; Displaying High Scores from the Main Menu: Pro-Tips: Building your Finished Game

Some more UI/navigation tweaks, and how to output a Windows executable. Which differs by only one popup selection from outputting an OS X executable.

Section 8. Where to Go from here [27:00 mins]: Extending Your Work – Expand Score into Combo Scoring; Where to Go From Here – The Unity Community; Where to Go From Here – Unity 3D Pro; Where to Go From Here – Porting to Android; Pro-Tips: Publishing Your Finished Game

And of course being a person of taste and style Dear Reader, you have no use for the bits on how to publish on Android, but no doubt the pitiable intern you fost that nonsense off on will find that bit of interest. No mention of iOS in the porting bits, but presumably touch handling would be similar and looks like controls are about the only necessary difference.

So overall, we’re quite completely satisfied with how that went for the time investment. Nice efficient introductory walkthrough touching on enough to get off to a flying start yourself without getting bogged down or distracted much of anywhere; and if you’re doing simple games, that’s all you need! Would have been nice to something that was OS X aware, but there’s only a couple of places where things like referring to the middle mouse button show up, no particularly big deal. On the other hand, we were just a touch disappointed to not find any discussion of porting and native code integration across various platforms, a little more discussion of that as opposed to “here, add a touch handler and you’ve ported to Android” would be rather welcome. But that’s mainly because being a real — that is, iOS — developer, our skin was crawling with revulsion watching that C# coding in action and our thoughts immediately jumped to how can we write as little code as possible in MonoDevelop should it actually ever become necessary to work with a Unity project.

So yeah, the end result of this exercise is a switch from “intense skepticism” to “downright loathing” of the prospect of ever having to code ourselves in this environment. But for those who don’t have a project with heavy coding needs, or are Windows people who are happy programming C#, first off we’re sorry for you, and second off yep Unity most likely actually is a good choice for you and this is a definitely worthwhile fast start on getting orientated with it. Thoroughly recommended!

Review: Escape Plan

[UPDATE: No longer for sale. My, how did you get here?]

Bit of a diversion today; we’re cutting away briefly from our accustomed iOS programming captivation to give you Dear Readers a recommendation for some lifestyle reading material. So if you’re just here for the geek and not interested in discovering the wide world out there, see you next time; on the other hand, keep reading if “Escape Plan: Discover the World, Live Better for Less” sounds intriguing:

escape-plan-2-pbook008.png

Ah, still here. Excellent. As you may have picked up on if you’ve been hanging around here a while, trolls do like to traipse about; seen about a third of the world, depending how you go about counting. (TravelersCenturyClub.org is the grandaddy of the place-counting cliques, and comes up with 321 places; MostTraveledPeople.com aggregates a bunch of minor sources like the DXCC List plus splits larger countries into their provinces and adds a bunch of oddball specks and border quirks to come up with 873 places; and of course the true connoisseur logs their visits to the 981 and counting UNESCO World Heritage Sites as well.)

And we tend to get a reaction whenever this comes up of how ohmigod you must be so rich to do that. And we’re like, well, no actually, if you have some clue about figuring stuff out on your own instead of supporting travel agent chains by booking package tours, it’s actually not a terribly expensive solo hobby — cheaper than it would cost to stay at home (living in the most expensive city in North America makes that comparison easier, of course…) quite often.

And then they’re like ohmigod you go by yourself to strange places how could anyone ever do that scary scary eek! And we sigh. Same planet, different worlds.

So for all those of you who have that instinctive reaction to the idea of going wayfaring, this is the single best book we’ve ever encountered to change your view of the rest of the world. And for those of you who think long term travel is a great idea but impractical, this is the single best book we recommend for you to read too. Hey, we’re iOS programmers, get a data sim from Keepgo.com (née iPhoneTrip) and all we need to be productive fits in a carryon and can set up anywhere with a cell signal, amirite?

Even if you’re one of the jaded Bindere Dundats of the peripatetic lifestyle, yeah you know 99+% of this already no big surprise secrets in wait, but even so there’s probably a couple of practical tips you’ll pick up flipping through this to make it worth the read. For instance, we had not previously been aware of EarthClassMail.com which looks like a significant upgrade to our usual mail arrangements.

So yeah; we recommend to pretty much everyone that this should be put somewhere near the top of your personal development reading list.

Review: Cocos2d-x by Example Beginner’s Guide

If you’ve been luxuriating in the joy of developing games iOS-centrically the last few years, it’s a pretty good bet you’ve been using cocos2d-iphone. And it’s also a pretty good bet that the pressures are mounting to acknowledge the existence of other, lesser, platforms, if you get our drift. The path of least resistance to that is to go with the cocos2d-x fork adopted as part of the cocos2d coordinated releases. But up until now there’s been a substantial dearth of documentation for that option, which the good folk at Packt have now remedied:

7341OS_cov.jpg

The first chapter runs through getting you set up and doing the Hello World thing on a Mac with Xcode with the 2.0.4 version, which is the last stable release before the book’s publication date, just in time to be superseded by the 2.1.3 release, although the differences are pretty trivial; and recommends for your tool suite that you pick up Texture Packer, Particle Designer, Glyph Designer, and cfxr. Which we’d agree with across the board.

Chapter 2 goes over the basic structure of the cocos2d framework, introduces C++ to the native iPhone developer and discusses how to live without ARC, or conversely for the C++ programmer how to live with the root class paradigm. Not sure you’d ever manage to square that circle to anyone’s complete satisfaction, but what’s here is a good attempt.

Chapters 3 through 9 go through a series of mini-game examples, introducing

  • images (including retina), sounds, sprites, multitouch, bounding collisions
  • sprite sheets, bitmap fonts, background music, actions, universal apps
  • particles, drawing primitives, vector math
  • placeholder prototyping, terrain generation, platformed collisions
  • texturing terrain, parallax, sprite nesting, menu and tutorial modes
  • Box2D physics worlds, bodies, controls, and collisions
  • scenes, transitions, data loading and saving, notifications, accelerometer

That’s one solid amount of stuff to cover in a beginner’s guide! Plus there’s a very nice appendix on introductory vector math applications, nice touch there. And these games are rather polished for tutorial examples. Indeed, our first criticism of the book is that they’re not up on the App Store for you to check out yourself what you’d be learning, which you may recall we thought was a pretty compelling feature of the Creating Games with cocos2d book. But hey, you can see screenshots on the author’s blog here.

Chapter 10 — “Code Once. Retire.” — yep, that’s what we’re probably here for … and it’s a bit of a disappointment. It covers how to set up an Android “Hello World” project skeleton with Eclipse, and some arrangements for hybrid Android/Mac compilation … and that’s pretty much it. For the intended audience, that strikes us as rather a flaw. What would make this a five-star book is if all the samples were available on the iOS App Store, as grumbled about last paragraph, but also on the stores for at least three or four of the platforms cocos2d-x targets, and discussion in the book of just what was involved in customizing the code, assets, and deployment tactics for each.

So, depends what kind of “beginner” you are how valuable you’ll find this.

“Beginner” to cocos2d from scratch? Easy five stars, buy it now.

“Beginner” to cocos2d-x with an oeuvre of cocos2d-iphone code you want to get shipped on other platforms? Useful, but just barely gets you started on anything but porting your Objective-C to C++ code, which chances are you could do on your own if you’ve ever programmed anywhere but the iPhone. If you do have a solid C++ history and at least nodding familiarity with Android project setup, three stars; if not, four stars.

So overall we’ll give it a solid four stars; some more followthrough on deploying the examples onto non-iOS platforms, and we’d give it an unreserved five stars.

Postscript — Other cocos2d-x Resources:

Those awesome iPhone Game Kit dudes have a game called Paralaxer deployed to all the popular stores that you can buy the source of, to go along with a free book in progress.

The Wenderlich archives have a recently updated Cocos2D-X Tutorial for iOS and Android: Getting Started and Space Game.

Review: Developing Mobile Games with Moai SDK

So we’ve been vaguely aware of the Moai cross-platform SDK for a good while now, and been somewhat interested in learning more as its Direct Services and Custom Cloud Logic make it stand out a bit from the plethora of engine options available; so when the nice people over at Packt asked if we’d like to take a look at the first Moai book published, we were why yes this a good opportunity to polish up our knowledge of cross-platform options, no doubt our Dear Readers would be ever so interested in our thoughts!

5064OS_mockupcover_normal_1.jpg

Unfortunately, we were kinda underwhelmed. Not that it’s a bad book mind you — just of rather less scope than we were hoping for. Let us take the introductory section “Why Moai?” from the second page of the book, for those of you who didn’t click the links above to check out the Moai basics:

Moai SDK is a multi-platform game development framework. It’s been developed in C++ and all of its features are accessible through Lua. What does this mean? That you can build your game completely in Lua (taking advantage of the flexibility of this amazing language) and, in case you need low-level access, you can always switch to C++ and do whatever you want. You can even bind your C++ libraries to use them in your game, in Lua. It has built-in access to Moai Cloud as well, which is a cloud service that allows you to deploy server-side code written in Lua, with databases, support for push notifications, leaderboards, and other fancy stuff…

… and that’s the LAST mention in the book of Moai Cloud!! Très déçu. Since we see that as being the compelling reason one would likely pick Moai in the first place, we were rather hoping that would be covered in some detail. More detail than that single sentence, anyways. Well, on to what it does cover.

They have you install the SDK and install Zerobrane Studio and run the first project in the SDK /samples folder, and that all goes perfectly smoothly; then we have a chapter on the high level design philosophy, and on to walking through a Concentration-style game, which takes 4 chapters:

  • Chapter 4: Our First Game with Moai
  • Chapter 5: Showing Images on the Screen
  • Chapter 6: Resource Manager
  • Chapter 7: Concentration Gameplay

All pretty straightforward, especially if you already know Lua. And if you don’t, it doesn’t take much to figure out, which is kinda its point.

Chapter 8 “Let’s Build a Platformer!” introduces camera, parallax and sprite sheet animation. The next chapters straightforwardly introduce more functionality essentials:

  • Chapter 9: Real-world Physics with Box2D
  • Chapter 10: Creating a HUD
  • Chapter 11: Let the Right Music In!

And that’s it for your tutorials. Somewhat spartan, but the essentials of a single-player game are covered decently yes.

Chapter 12 is a fairly good chapter on how to get your Moai project compilable in Xcode for submission to the App Store; and Chapter 13 “Deployment to Other Platforms” … well, it’s not much more than a collection of weblinks. We really would have hoped that Windows, OS X and Android would have got the same deployment detail as iOS did.

So, yeah. On the one hand, if you have decided already to go with Moai, this will certainly help you through the learning curve associated with the free documentation — generally agreed as being somewhat lacking — quite a bit.

On the other hand, if you’re approaching it from the perspective we are, which isn’t “I’ve already decided, teach me how to use this” but “convince me why I should pick Moai over any of the other cross-platform kits available, particularly since I have several tens of thousands of lines of Objective-C cocos2d-iphone invested into already”, we would have needed

  • Walkthroughs of using Moai as a PaaS to provide social web services and cloud back end logic
  • Detail on how to integrate advertising, analytics, and other native SDKs
  • Much more detail on cross-platform deployment workflows

which you won’t find here. So that was rather a disappointment. Hard to qualify this book as “essential” without covering those points to the curious reader’s satisfaction, we think. But it is nicely written within the scope it does cover, so we’ll give it three stars, with the caveat that the cover says “the basics” and don’t expect any more than the basics. Then you should be satisfied with it nicely.

Review: Creating Games with cocos2d for iPhone 2

So as promised in our cocos2d survey a couple days back, we’ve been reading the latest from Packt,  Creating Games with cocos2d for iPhone 2:

9007OS_9007OS_Cocos2d for iPhone Hotshotcov.jpg.png

and why yes, we quite like the approach it takes. Most books we read go through pieces of a big project where the newbie finds themselves easily overwhelmed, or are snippets without a context so you need to be able to grasp their application on your own; what this one does is present nine complete but small enough to be easily graspable games of popular genres — and bundled them up to the App Store too, where you can check them out to see if you’re interested in seeing the code:

Pack 1 – Mole Thumper, Brick Breaker, Pool

Pack 2 – Memory, Match 3, Snake, Scrolling Shooter, Endless Runner

Pack 3 – Cycles of Light

The theory behind that is explained on the cocos2d blog here:

… Most developers learn the basics of cocos2d for iPhone v.2.0, and subsequently hit a wall. We have all these interesting classes that are really powerful, like CCLayer, CCSprite, actions, etc. How can we put these things together and make something equally interesting out of them?

That is the “gap” this book aims to fill. Rather than take the beginner’s book approach, where we spend several pages explaining what a sprite is, how it is drawn, etc. “Creating Games” skips many of the generalities and jumps right into the reason we are here: building games. This is the book I wished I had in hand when I was first exploring cocos2d for iPhone.

Class by class, method by method, the text explains the “good parts” of why we are building the code in this fashion. All the “good parts” are explained in detail: from building with Box2D to GameKit Bluetooth integration, and even how to build in “artificial randomness” into a Match 3 game, so you never run out of moves.

Each chapter is a complete game, and all source code is available as a download from the publisher’s web site. The games cover a wide variety of game types, and the games become more intricate and complex as the book progresses…

Can’t add to that really, except to observe that why yes the book is pretty much perfectly positioned to help cover that jump from reading the API to figuring out how to actually use it. So if you’re a complete newbie, we’d still recommend The iPhone Game Kit; but if you’ve got a bit of programming background but are new to cocos2d and/ot game programming, yep this is an excellent choice. Or if you’re interested in checking out the approach the author takes to the covered game genres, which are

  • Chapter 1: Memory
  • Chapter 2: Match 3
  • Chapter 3: Mole Thumper
  • Chapter 4: Snake
  • Chapter 5: Brick Breaker (with Box2D)
  • Chapter 6: Cycles of Light (iPad with Bluetooth integration)
  • Chapter 7: Pool (with Box2D)
  • Chapter 8: Scrolling Shooter (using Tiled)
  • Chapter 9: Endless Runner

One quibble you might have is that why isn’t v2.0 out of date already? Yep, but not by much, and download notes to bring it up to speed are on the author’s site. And while you’re there, check out the video. Definitely the best trailer we’ve ever seen for a programming book. (Pretty sure it’s the only trailer we’ve ever seen for a programming book, so the bar’s low there, but hey.)

So overall? Well, we like to reserve five stars for books that qualify as “absolutely essential fundamentals”, and it’s not quite that, but it is definitely a well done guide with far more coherence than you’ll find hunting down tutorials and samples on the web. Solid four stars, with the particular recommendation that if you find yourself in the position of being able to install cocos2d and run the samples but are having trouble gapping that over to getting started on your own game, this is the absolutely perfect book for you!

iPhoneTrip.com

So we’re just back from going walkies about southwest Europe for the Christmas break, and before we get into checking out just what all we missed in development circles whilst away, we have a recommendation for staying connected on your next trip:

iPhoneTrip.com

Pretty much as simple as it gets: pick the country you’re going to, or “World”/”Europe”/”Asia” for multiple countries, the dates you want it, and whether you want 50/100/500 (“Unlimited”) MB a day; and they’ll mail (or FedEx, if you’re as last-minute as our planning always seems to work out) you a SIM and a backup. Worked out about a fifth the price of what our carrier costs us for roaming data travel packs, plus better coverage; besides various mainland countries, we wandered off to outlying bits and pieces from Madeira to Melilla — and absolutely everywhere we had any cell signal at all, our “Europe” SIM worked flawlessly. You could probably shave off a few more bucks by hunting down local carrier data SIMs each place you visit sure, but for sheer convenience? No beating these guys. Check out the Engadget review for more discussion.

Another handy piece of kit for the inveterate road-tripper we can recommend from experience: this auto/air power inverter from Kensington.

Car Power
Kensington Auto/Air Power Inverter with Two USB Ports for …
Kensington
$50.99

Kept our iPhone, iPad and baby Macbook Air running nicely all through the trip. Some of the Amazon reviews claim it’s noisy, but not the unit we got; can’t tell if it has a cooling fan at all, for all we ever heard from it. If you’re going to be on the move constantly like us, highly recommended indeed.

UPDATES:

iPhoneTrip has been renamed to Keepgo.com!

Review: Test-Driven iOS Development

So we imagine that if you’re reading this, chances are that you’re pretty confident in your programming skills and figure that the optimal development methodology is for people to stay out of your way. We understand. Spent better than two decades repeatedly proving so, in fact. But recently we’ve been shipping additions to a growing family of generally accoladed sports apps; and that has demonstrated to us nicely that the problem with that approach is that it scales past a single app … questionably. At the moment with nine teams in three sports things are still reasonably manageable, but that won’t last, if you get our drift. So we have been looking into things we can do to optimize the scaling process. Which, serendipitously, brings us to Graham Lee‘s new book!

Test-Driven iOS Development

We’d actually talked with Graham briefly after his TDD presentation at the Seattle VTM conference last year, where he’d just about convinced us that TDD might be something other than the development-slowing waste of time we’d previously observed it to be at places that applied it as a management-imposed afterthought, so we had fairly high expectations of the book; and why yes, yes indeed it would be an excellent book even if it wasn’t the one and only out there for iOS on the subject — matter of fact, we unconditionally recommend it to anyone who wants to be a better iOS programmer!

If you’ve already got the TDD religion from other platforms, you can jump directly to Chapter 4 “Tools For Testing”; those of us of a more skeptical bent will find reading through Chapters 1-3 an nice gentle progression through demonstrating the value of testing at all through to “How to Write a Unit Test” and how that leads to safely refactorable design.

Said Chapter 4 goes over the Xcode built-in support thoroughly and introduces GTM, GHUnit, CATCH, and OCMock on the coding side, plus Hudson/Jenkins and CruiseControl on the integration side. That covers anything you’re even remotely likely to encounter in existing projects.

Chapter 5 “Test-Driven Development of an iOS App” starts the 6 chapter process of developing BrowseOverflow, a StackOverflow question browser; full source available on github for everyone. Note that we say “process of” rather than “walkthrough of” developing; these aren’t 5 chapters of simple lecturing, at every step the analysis and alternatives are discussed thoroughly, with asides on design patterns, refactoring, and all kinds of good stuff, finishing up with Chapter 11 on general design principles derived from the process, thoroughly applicable even if you’re not using TDD at all.

Finishing up the book, Chapter 12 “Applying Test-Driven Development to an Existing Project” gives some straightforward advice on grafting testing into your ongoing development, and Chapter 13 “Beyond Today’s Test-Driven Development” surveys techniques not fully baked for iOS development yet.

Overall, we’d say that pretty much every — no, seriously, pretty much every — iOS programmer would solidly benefit from reading this book. Even if you’re already developing with solid test coverage, there’s almost certainly some insights here you’ll find useful. And if you’re in the position of most of us where you’re using tests half-heartedly and more likely not at all, you should put reading this to figure out just how this TDD thing could do you some good at the top of your list of self-improvement tasks. And if you’re new to development in general, why then this should be pretty much the next thing in your programming curriculum after design patterns!

UPDATES:

TDD – is it worth it? nicely summarizes why TDD is very likely worth the trouble to adopt.

BDD: From the Idea to the App 2; BDD – Mastermind : TDD in the Model