Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy libgdx to html5 on android studio

I created a game using libgdx with android studio (Intellij) and I would like to deploy it as a html5 code.

Can someone please help me doing this?

I saw that when using eclipse it's simply right clicking on the html package, and selecting "Google -> GWT Compile" but i can't find anything like that in android studio (intellij.

Thanks alot!

like image 909
Chiko Avatar asked Dec 22 '14 19:12

Chiko


People also ask

What is LibGDX in Android Studio?

LibGDX is a game development framework that gives you a bunch of useful features (a 60 fps render loop, animation, input, physics, and lighting for example) and allows you to deploy as a packaged executable, an HTML/JavaScript page, or an Android or iOS app. This multiple deployment feature is extremely useful.

Is LibGDX only for android?

libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, macOS, Android, your browser and iOS.


1 Answers

There are a couple ways to go about this.

1) In the Gradle window, under All Tasks, find the :html subproject, then run its dist task.

2) In the Terminal window, type gradlew html:dist and press enter.

Either of these methods will result in a dist directory within the html/build directory, which will contain the files you will need to deploy.

like image 87
nEx.Software Avatar answered Sep 23 '22 18:09

nEx.Software