Book Image

LibGDX Game Development By Example

By : James Cook
Book Image

LibGDX Game Development By Example

By: James Cook

Overview of this book

Table of Contents (18 chapters)
LibGDX Game Development By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Looking closer – HTML


The last platform we are going to look at is HTML. This might perplex you even more than iOS did. How on earth do we go from Java to HTML! Luckily, Google has the answer—Google Web Toolkit (GWT). By using GWT will convert Java classes into a JavaScript equivalent.

However, there are some limitations with the HTML export. I would like to add that HTML exports are getting smaller with each release and the smaller releases are the support for certain Java classes. You might find sometimes that there isn't a JavaScript equivalent available and GWT will refuse to compile the code. But having said that, I have used it a lot before and there are always ways around this, and LibGDX has full GWT support from the onset. So as long as you don't stray too far from LibGDX, you will be able to create an HTML game!

Check out the GWT website, http://www.gwtproject.org/, for more information.

Getting ready to launch

Like with the other plaforms, HTML has it's own submodule and a HtmlLauncher...