Game Development Reference
In-Depth Information
The demo application - how the projects
work together
In Chapter 1 , Introduction to LibGDX and Project Setup , we successfully created our
demo application, but we did not look at how all the Eclipse projects work together.
Take a look at the following figure to understand and familiarize yourself with the
configuration pattern that all your LibGDX applications will have in common:
What you see here is a compact view of four projects. The demo project to the very
left contains the shared code that is referenced (added to the build path) by all other
platform-specific projects. The main class of the demo application is MyDemo.java .
However, there is a different main class where an application gets started by the
operating system, which will be referred to as starter classes from now on. Notice
that LibGDX uses the term starter class to distinguish between these two types of
main classes in order to avoid confusion. We will cover everything related to the
topic of starter classes later.
While taking a closer look at all these directories in the preceding figure, you might
have spotted that there are two assets folders: one in the demo-desktop project and
another in the demo-android project. This brings us to the question, where should
we put all the application's assets? The demo-android project plays a special role
in this case. In the preceding screenshot, you can see a subfolder called data , which
contains an image named libgdx.png . This image also appears in the demo-desktop
project in the same place.
 
Search WWH ::




Custom Search