Devs respond to Google PlayN

Google offers: one game, one code-base, many platforms

Shares

Google hopes PlayN will assist developers in creating cross-platform games

Google has announced PlayN, which it describes as an "open-source cross-platform abstraction layer that uses the GWT compiler to take one code base written in Java and compile it into targets that run it as HTML5, Flash, Java, or as a native Android application". The idea is to simplify and economise games development, which Google helpfully reduces to the snappy soundbite: "One game, one code-base, many platforms".

Creative Flash developer Iain Lobb told us that the general idea is sound, due to the divergence of different platforms and the need to target them all without rebuilding an application in many different languages. He noted that Adobe AIR, Unity3D and some others are trying to solve the same problem, and PlayN's choice of Java is an "okay choice of language, which is quite widely known, and easy to learn".

But Lobb had some concerns: "I notice it wants you to use Git, Eclipse, Maven and Ant, a complicated stack of technologies that may put off casual developers." Lobb is also troubled that PlayN doesn't directly target iOS ("That's losing the biggest mobile market already") and he maintains that Flash developers should stick to ActionScript, to be able to access all Flash's existing libraries like TweenMax. "In fact you could make the argument that for any of the platforms it targets, you're going to lose platform-specific features," he added.

Native vs the web

Rob Hawkes, a technical evangelist at Mozilla, also has concerns with PlayN, “although I’m not surprised Google is taking this role, since it fits in with their work on the GTW compiler and their Android platform". He wonders, though, who PlayN is aimed at and is irked that Google didn't concentrate on open web technologies. "I like the idea of writing code once for multiple platforms, but this is exactly why making games with HTML5 and JavaScript is so beneficial," he said. "PlayN is good for easily porting game code to various native environments, but that doesn't mean that I believe a solution like this is necessarily the right one in the long term."

Hawkes believes HTML5 and JavaScript should be championed as the solution for getting a game on multiple devices without rewriting code, and that shortcomings of this approach are fast disappearing. "In the meantime, platforms like Phonegap help provide the best of both worlds: HTML5 and JavaScript code, with the benefit of being portable to multiple native platforms and using the features of those native environments." He added that he'd like to see Google pushing HTML5 as a solution to these problems, and wonders if PlayN is "a stop-gap until HTML5 matures as a platform for games".

As for PlayN's impact on gaming, Hawkes told us it won't hurt the industry and that it could be handy for developers who want to target the devices PlayN supports. "But if HTML5 is already good enough for your game, using something like PlayN will overcomplicate matters," he warned. "What I mean by that is you would be writing code in Java and porting it to HTML5, rather than just writing it in HTML5 the first time. Another way I can see this being detrimental is that it's giving the impression that it's okay to pander to closed and native environments instead of targeting and improving open environments like HTML5."