LibGDX Tutorial – Part 3

Creating your first project

Sorry for this delayed update. I got caught in a frenzy the past two weeks. Anyway let’s get on with our tutorials, shall we?

Alright! Now that you have set up all the required software to start making games using LibGDX, let’s continue by creating a new project and import it into IntelliJ IDEA.

LibGDX provides you a project generator tool that provides you with the base files that can be used by an IDE. Go to the LibGDX Download page and get the Setup App.

Save the jar file anywhere you like and open it. This will present you with the project setup window.

LibGDX Project Setup Screen

There you can specify

  • Name: The name of the project. (You can set the app name in the Manifest file)
  • Package name:  Unique package name.
  • Game class name: The cross-platform class which is called from the native launcher class.
  • Destination: Where you want to save the project.
  • Android SDK: Location of Android SDK. Commonly, it is in C drive. Check where you unzipped or installed the SDK package.
  • LibGDX version: I don’t know why they put an option like that here, no way to change it. If you want a different version of LibGDX, you have to download the appropriate jar file.
  • Sub projects: These are the modules that you’ll include in the project. Here you choose which all platforms you are targeting to deploy. If it was me, I would select all options because it’s a little difficult to add a platform later in a working project.
  • Extensions: Additional libraries you need like for physics, particle editors or AI. For starters, you won’t need any of those now. And unlike platform addition, you can easily integrate extensions later using Gradle.

Alright, now before generating the project, click Advanced and that will open up a window

LibGDX Project Setup Advanced Screen

Check the box that says IDEA. It will generate IntelliJ’s project files so that it will be a smooth ride importing the project. If you’re working with Eclipse, choose the alternate option. Save it.

We’ve successfully configured our project! Now click Generate and wait for the project files to be created.

Note: During the first LibGDX project creation, it may take some time (depending upon the network speed) to download all the gradle files.

Advertisements

One thought on “LibGDX Tutorial – Part 3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s