viernes, 6 de diciembre de 2013

Getting started (I)

Getting started (I) 

Starting with libgdx

Welcome to LibGdx Tutorial Series, this is my first entry and I go to explain about libgdx and how getting start the tools for the creation of Android games and other platforms. Not recommended this blog for a beginner developer, we work with Object-oriented programming and need to know Java. I'm not a expert in this, these tutorials are my own experiences working with libGdx but I will try to solve the queries

Libgdx is a library specialized in making games, it allow to write the code a time and run it in different platforms (Windows,Linux,Mac OS X,Android, iOS,...).

First of all I'm going to explain the workspace that I use, how install it and prepare it for start with this library.

Software to install.

Java Development Kit. (JDK)

We need the platform java "jdk" for to compile of code java in our computer.

This is the URL for download it

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

ADT Bundle for Windows.

ADT Bundle is a version of eclipse with the android sdk prepared for development of Android applications. http://developer.android.com/sdk/index.html



Click in the button "Download the SDK ADT Bundle for Windows"

When the download is finished, simply you need unzip it in some folder, if you installed correctly the jdk you can run eclipse.

GWT

Already having the eclipse installed, we need to install Google Web Toolkit (GWT).

For this we follow this steps:- Go to flange Help, Install New Software
- In the text field "Work With" we put the follow link:

http://dl.google.com/eclipse/plugin/4.3

- We should to find the SDK tab and install the Google Web Toolkit.



API and android emulators.

When we have the GWT installed, we go to install all android versions and the plugins. For this, we need to go in eclipse to the tab Window and do click in the SDK Manager. We need to install all the packages less the extras.

A LibGdx project.


We have already the eclipse prepared, now we go to import the libgdx projects, core, desktop and android.

Go to this Link

http://libgdx.badlogicgames.com/

- When we are in the web, go to tab Downloads and do click in nightly Builds
- In the file manager, we need to find the folder "dist" and download the file gdx-setup-ui.jar.


Create a project.
- When we click in gdx-setup-ui.jar, we find 2 options: Create or update project.
- We do click in create.



Now we have the screen to configure our project, in the tab 1, we write the game name, name from the package of project (com."Yourname/Nick"."gamename" ) and in the third text field write the main class of our game
.
Then select the platforms that we want to implement in our game. This tutorials are based in android and desktop projects so I'll deselect the HTML project  and the iOS project.

In the second tab we do click in the stable version of libgdx and we wait to the library  download. Then we do click in "open generation screen" button and start the proccess.

Importing the projects in eclipse or ADT.

Return to "eclipse", then do right-click in "package explorer" and select Import.

Important! , in the tab "General" we find the option "Existing projects in the worskspace" and search the folder where are our projects.

We need to have 3 projects, "core", "desktop" and "android" and add all in our workspace.

Good! we are prepared to start. In the next week I'll speak of project structure and how test our android project and desktop project.


I hope that this tutorial help you. Greetings and comments are welcome.

if you know spanish you can follow my tutorials in spanish in http://libgdxspain.blogspot.com.es/ .