James Williams
LinkedInMastodonGithub

Picking a Game Library

It's already day two of #NaGaDeMo and I already feel like I'm behind. I haven't totally decided on a game library yet or even a game concept. Picking a proper game library is not unlike picking a college. You don't want to fall in love with a library and then find that it greatly limits your idea or even makes it impossible. That would be similar to going to Berklee College of Music and then deciding that you want to major in Nuclear Physics.

I decided to do NaGaDeMo while I was trying in vain to sleep on a redeye flight to Louisiana for Memorial Day. From that time, I'd been jumping between several options. Among them were Amino, Unity, and PlayN.

Amino

Amino is a cross-platform 2D scenegraph library for JavaScript and Java providing built-in support for images, basic collision detection, and mouse events. The JavaScript variant uses the HTML5 Canvas whereas the Java version uses Java2D. With these low requirements, Amino works on any browser with Canvas support (even IE9 and iOS Safari 4.3) and pretty much on any desktop Java (probably Java 5 or higher). I found it compelling enough to author several articles for Pearson. As much as I like Amino and I found it to be very easy to learn, there isn't much of a community around it. If I'm going to be writing every day, I want the most eyeballs to benefit from it.

Unity

Unity is a juggernaut when it comes to the indie game space. In the past few years, they have moved from desktop support to iOS to Android and many other platforms including the Wii and Xbox. While the runtime is written in C++, there is a .NET[Mono] scripting API that allows you to use C#, UnityScript [variant of JavaScript], or Boo [Mono port of Python]. Tiger Woods PGA Tour Online and Battlestar Gallactica Online are two of the titles built using Unity.

Thanks to its mature codebase and userbase, a beginning Unity developer won't suffer from a lack of varied and quality documentation. One sticking point for me is the cost.

A low-end license with Android and iOS support will set you back $800. A high-end Pro license with all the bells and whistles costs $4,500. It has been reported that Unity is giving NaGaDeMo participants free one-month Pro licenses but I haven't seen anything official to substantiate the claims.

The other sticking points making Unity not an option are purely personal. I have a basic distaste for most things Canvas and the fact that Unity uses a plugin for their web content and not native HTML5. It's too bad I won't get to use their Google Native Client support.

PlayN

I have been interested in PlayN ever since it was released under its former more lamentable project name and have been impressed with it. Rovio used it to port AngryBirds to the Chrome Web Store. Through mutual Googler friends who worked on that port, I got the opportunity to meet the Rovio guys and pick their brains a bit. Feature for feature, PlayN is somewhat evenly matched with Unity. Both can publish to the web, Android, or iOS but PlayN doesn't support any video consoles at the moment. iOS suport on PlayN seems to be a bit experimental though.

Unity and PlayN really diverge when it comes to cost, underlying platform, and documentation. All versions of PlayN are free. PlayN also runs on the JVM and uses HTML5 for its web games, news that is manna from heaven for a Java developer. Documentation is one area that's a bit lacking. I'm not bothered by that at all. When I started writing my book, I had to be an early adopter and figure out things as I progressed. In this case, I know exactly who to bug if I get into a really sticky spot.