简体   繁体   中英

How do I deploy my LibGDX game to my website?

The furthest I've gotten is running it on the browser through the command line. I went into the appropriate directory and used the ./gradlew html:superDev command and then went to the URL localhost:8080 and was able to play my game. However, what i need to do is put this game onto my website so that anyone can play it on the internet. From what I was able to find on the internet, I compiled my project by "Google" -> "GWT Compile" and then placed the WAR directory contents into my website directory at GoDaddy.com (which is where my website is hosted). You can see what happens by going to the URL yourself at http://www.vikkalkat.com/war/game.html

Someone please help and tell me how to properly deploy a LIBGDX project to the web?

Using gradlew html:superDev is not appropriate, if you want to distribute the game on a public webserver.

The wiki article Gradle on the Commandline has a section, which tells you how to package your app when you want to distribute it. For the HTML backend this is done via gradlew html:dist . After that you will have to upload the contents of your html/build/dist/ folder to your webserver.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM