gdx-setup versus gdx-setup-ui

Before entering into the game, let's make a quite distinction between the two project setup tools. Why choose one over the other?

There is no doubt that the Gradle-based setup tool is the best. One of the biggest advantages of using Gradle is the dependency management system. The dependency management system is quick, simple, efficient, and easy. If you are developing a simple project without any extensions such as Box2d, you might use the old setup tool; however, if you are developing a multi-platform project, which might be updated soon, then you can use the Gradle-based setup tool.

The projects generated using Gradle and the old setup tool have some minor naming differences that are illustrated in the following figure:

gdx-setup versus gdx-setup-ui

The Java classes shown in the preceding figure are starter classes; we will learn about them in the next chapter. Although the names for projects, packages, and classes generated by the two tools are slightly different, other aspects of the projects such as the assets folder, manifest files, and project wiring are the same.

Note

All the chapters in this book will be explained based on the projects generated from the old setup tool. However, understanding projects generated from Gradle is very easy because the names are easily comparable.

The old setup tool (gdx-setup-ui) is now not encouraged by LibGDX and it might be phased out later; however, it is included in this book because it will be useful for smaller projects.

You can also see that the projects generated and organized under the C:libgdx path are different for both tools. The old setup tool (gdx-setup-ui) creates all the five projects in the respective folders, as shown in the following screenshot:

gdx-setup versus gdx-setup-ui

However, the Gradle-based tool (gdx-setup) creates a lot file, as shown here:

gdx-setup versus gdx-setup-ui

Observe that our projects are named core, android, desktop, html, and ios. Additionally, take a note of the build.gradle file. This file is important because this is the file you need to edit in order to add more dependencies (such as hardware platform) or new extensions (such as Box2D or Bullet).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset