
Open Source, Feature Packed and Offering a Big Third-Party Ecosystem Rather, it gives you the freedom to create a game the way you like it. libGDX does not force a specific design or coding style on you. It provides a well-tried and robust environment for rapid prototyping and fast iterations. LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, macOS, Android, your browser and iOS.
Finally press generate (confirm folder override).Cross-platform Game Development Framework. In “Extensions” unselect all, we don’t need any libgdx extensions in this tutorial.
You could optionally select other targets like Android but it require extra configuration beyond the scope of this tutorial (install AndroidSDK …etc)
In “Sub project section” just select desktop and html. Destination : ~/git/html5-game-tutorial. In main section, just change destination folder to our project folder (HOME_DIR/git/my-gdx-game). Download Latest Libgdx setup tool and run it (you may need to mark it as executable in order to run it from file browser). Libgdx provides a setup tool to generate project structure : If you don’t have java 8 yet, let’s install it, recommended JDK is provided by Adoptium Our game source repository is now clean, so lets generates our alpha version of our game. Now we will clone our empty repository (Note that we have added a “gh-pages” suffix, we will see later why) : Install git if you don’t have it installed yet on your local machine : sudo apt-get install git Command lines in this tutorial use obviously you’ll have to adapt these commands with your repository URL. Then create a repository for the game, for instance “html5-game-tutorial”Īnd copy the repository link. If you don’t have a github account yet you need to Create a github account first. Since your players don’t like to wait, we will first deploy a temporary web page for your game. Like other MGSX tutorials, we’re assuming you’re developing on a linux/ubuntu environement but it could easily adapted to other OS. Purpose of this tutorial mainly is the deployment process. How to develop games with libgdx is beyond the scope of this tutorial. For the sake of simplicity, we won’t code a game but just use the default game generated by libgdx. In this tutorial, you will learn how to create a libgdx game from scratch and deploy it as a static web application to github pages. This tutorial cover the following use case : “I want to deploy a HTML5/WebGL game to the web and I have no money” Tutorial - WebGL game with Libgdx (part 1)