Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Time to write the devlog !

I've been thinking a lot about the form that my devlog would take. I asked myself why I wanted to join this jam. Two things came up : Having fun, and sharing experiences. Therefore, I decided to make a full tutorial, with code and everything. Starting from the very basic, and yet boring for anyone taking part to this jam : Installing and setting up a libGDX project. The jam is one month long, so I guess I can afford to spend 50% of the time I dedicate to this jam for the purpose of writing a decent tutorial devlog.

For the record :

- I am absolutely not a pro, thus, my code won't be clean, and I'll present the things the way I do them which is not necessarily the best way to do them.

- I work with Eclipse IDE, even though since summer 2015 Android Studio is the official IDE for Android, and everywhere you'll see that you must migrate to Android Studio as soon as possible. But I am lazy, and as long as my projects created with Eclipse work, I won't migrate. Thus my tutorials will only refer to Eclipse.


So here we go ! Let's start by the very beginning !

Those who already know libGDX may directly jump to the next post.


Setting up the libGDX project

Setting up the environment

To use libGDX with Eclipse, you'll need to set your work environment up. For that you'll need to install

To install ADT and Gradle, you can simply use the Eclipse Marketplace : Once you installed Eclipse, go in Help ---> Eclipse Marketplace. In the marketplace, just do a research on ADT and Gradle.

Once you finished setting up your work environment, you can set up your project !

Setting up the project

Just go on the libGDX download page and install the latest version of libGDX and start it, you'll get this screen :


On this screen you'll chose the name of your project, package, game class, the folder where you'll create your project, and the android SDK location. If you don't remember where you installed it, start Eclipse, go in Window ---> Preferences ---> Android and at the top of the Preferences window you'll find the SDK location link . Just copy and paste the link in the libGDX window.

Still in the libGDX window, you can choose which platform you want your game to run on, and you can install some extensions. I know for sure I'll need Box2d and Freetype, and I install Tools and Box2dlights "just in case". Finally you can generate the project.

Importing the project

Now that you created your libGDX project, you need to import it in Eclipse. For that, in Eclipse go in File ---> Import.

You'll get this screen :


Click on Gradle Project and Next, and you'll get this screen :


On this screen browse to the location of your project and find the folder core. Then click on Build Model, check all the part of the project you want to import to Eclipse (android, desktop....) knowing that you absolutely need core, and also desktop as we'll run the game on desktop during all the coding.


And that's it ! Your libGDX is set up, and you are ready to develop your game !

The default project

If you open the core folder, you'll there is only one class, MyGdxGame. Soon, we'll create a lot of other class and packages to make a lot of cool stuff !


To run this default project, right-click on the folder desktop and go to Run As ---> Java Application ---> DesktopLauncher.

You'll get this screen displaying the Bad Logic logo :



This is it for the basic setup !

As from the next post we attack the real fun ! Game coding !