The Quest for A Perfect Lotto Machine Simulation

January 14 2014

alt text

Today, Lotto Machine went live on Google Play for the first time, 23 months after the launch of the original on iOS.

Why did it take so long? Actually, it didn’t! This new version is the result of a project I’ve been working on for [just] a week that is a complete rewrite of the app - in 3D, with 3D physics.

alt text

How did we get here?

I’ve always maintained that the physics simulation is my inspiration for making this app - originally built in Cocos2D, then later ported to SpriteKit for the iOS 7 launch. Both of these, however, are 2D simulations (since apps are generally 2D, this seemed the obvious choice).

After launching the first wave of High Caffeine Content’s iOS 7 ports, I turned my attention to Unity3D as my next learning project. After spending some months learning how to build things with it, and after the launch of Unity3D’s 2D workflow, it suddenly became clear that one could build a 2D app relatively easily in it.

Lotto Machine seemed like the perfect choice. In fact, after a few hours I had a running prototype that provided a much better simulation than I had on iOS, and all without a single line of code.

alt text

Of course, the primary benefit of using Unity3D over pretty much anything else is the support for virtually any platform out there. Web? Check. Desktop? Check. iOS, Android, Windows Phone? Check.

Not only could I use Unity to build a better app for iOS, but I could also use it to bring the app to a whole host of new platforms.

alt text

Fast-forward to now, and we have one finished Android app. As the Google Play store process is the fastest of the lot, it makes sense to be the first port of call - if there were problems, I could push 240 updates (one per hour) to the app on Google Play before the first binary would even have hit the App Store or Windows Phone Marketplace. If all goes well, there can be a Windows Phone release before long, and eventually it will make its way full-circle to iOS.

The quest for a perfect simulation has taken me through many engines and rewrites, and has ended up with me rebuilding the app in a 3D game engine tool, with 3D physics and lighting. It’s still not perfect, by any means, but it feels like an achievement.