New app: LibGDX Project Setup
I teased a bit about that on Twitter, and it’s now over: let me introduce the new LibGDX Project Setup application!
This one is a special request from Mario Zechner, lead developer of the LibGDX framework. Its aim is to heavily facilitate the setup process of people games. Indeed, now that LibGDX 0.9.3 was officially released, the creation of up to four eclipse projects may be required to develop a game:
- A core project, targeting no backend and thus not directly runnable, which contains the source files.
- A project for the desktop backend, which compiles the game as a runnable jar file. It contains at least the source file of the desktop launcher, and any code that is related to the desktop.
- A project for the android backend, which compiles the game as an android apk file. This one contains the required source file to declare an android Activity. Note that this is also this project which stores all the assets of the game. Other projects use folder-linking, an eclipse feature, to retrieve these assets.
Configuring each project by hand can become a bit tedious and is often error-prone for new users, especially when if they are inexperienced. Indeed, the LibGDX library features various jar files needed by the different projects, as well as some native files for the android backend. Placing the files in the right folders and correctly linking them to the eclipse projects often results in a few mistakes. That’s why this application is born :)
The application main window features four panels, each clearly identified to guide the user through the different steps. The configuration panel is self-explanatory. Note that some settings can be tweaked in the advanced settings view, especially the android target/min/max platform versions.
The library selection panel lets you select the LibGDX release you want to use. You have the choice: either hit browse button to select the zip archive of the library, or you can also directly download its stable or nightlies version if you don’t have it on your drive already.
The overview panel lets you see if the choices you made in the configuration panel suits your needs. The virtual view of the projects is regenerated as soon as you change something, and is the exact representation of what will be generated on your hard drive.
Finally, the generation panel notifies you if everything is okay. Clicking the generation button opens a dialog showing the generation process (make sure it goes all the way to “all done”). I included in this dialog a FAQ with detailed tutorials to show how to import the projects into eclipse, and how to fix the error of the html project mentioned by eclipse on first launch.
About the third-party libraries
This feature is not totally ready yet, but its goal is to propose an increased visibility to useful third-party libraries proposed by the community to enhance libgdx games. I need to setup a web interface for developers to register their library, and the tool will automatically download their definitions and propose them as additional downloads.
Anyway, have fun with the application, and don’t hesitate to report any issue or suggestion you may have. It has been thoroughly tested, but there may be a few untested corner-cases left.
The application is available directly from the LibGDX repository. Have a look at the ProjectSetup wiki page for detailed instructions. You can also directly download it using this link. It points to the latest nightly build of the application.