O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making libraries compatible with GWT

Cross-platform deployment is surely one of the best features of Libgdx. However, supporting a platform is hard, even when Libgdx does the dirty work through Google Web Toolkit (GWT), which translates your core Java code into obfuscated, optimized JavaScript code. This can be interpreted by any WebGL browsers without the need for extra plugins.

This magical translation comes with a price. GWT does not support every single feature from the Java specification. In order to know whether a feature can be emulated or not, take a look at the official documentation at http://www.gwtproject.org/doc/latest/RefJreEmulation.html.

Another challenge starts once your code is able to be deployed into WebGL browsers—adapt it to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required