• Sponsored Links

Step 9 : Step by Step libGDX Tutorial : Environment Set Up for Game : Step by Step libGDX Tutorial

Share this :

Environment Set Up for Game : libGDX Game Tutorial

I am sure most if you are ready with the softwares downloaded on your machine using my previous tutorial in this series . You can do to that from the left Menu starting from "Environment Set Up for libGDX " or follow below link

Step 2 : Step by Step libGDX Tutorial : Environment SetUp

Once all softwares are download lets get started . Open the setup app for libGDX and add below details to create a setup Project  as below :

 

Name : BriskyDemo ( This is the name of the app )

Package : com.versionpb.briskybird ( This is our game package name )

Game Class : BriksyDemo ( This is the class of our Game )

Destination : D:\Java\libGdx\BriskyDemo ( Make Sure you have this directory in your machine , if not give path accordingly )

Adroid Sdk : C:\Users\USER\android-sdks ( Give path to your android studio here )

Let the all sub project clicked . We are going to make this Tutorial for Andorid , Desktop and Html but anyways i am keeping Ios as well checked .

In Extensions Just keep  Box2d Clicked

Click on Advanced and Click on Ideas as well as Eclipse as we are going to use both of the IDE s for this Tutorial . IDEA i.e. Android Studio for Android because Android Studio works great for Android app building and Eclipse for Desktop and HTML because its damn easy to build your jar files for Desktop Version specifically windows using Eclipse .

After this click Generate button to generate the projects . You may get 2 warnings regarding the more recent versions of android build tools and API , just dont worry about it and click on Yes . Below are the screenshots . After Successful build you will see screenshot as below :

libGDX Advanced Screen

libGDX Advanced Screen

 

libGDX warning Screen

libGDX warning Screen

 

libGDX warning Screen 2

libGDX warning Screen 2

 

 

libGDX Build Successful

libGDX Build Successful

 

Now open the path you have provided in Destination and you will see following projects being built :

android

core

desktop

html

ios

 

Lets not waste more time and import it in Eclipse . We will start in Eclipse and do most of our programming first here and once we are done with some code , I will show you how to open it in android Studio and see that same thing which we have developed on Desktop can be seen on your android device or AVD . If you want to see how to do that prior you can anyways refer to previous tutorials of this series .

As soon as you open Eclipse , Give it a Workspace Path . I am going to give it D:\Java\libGdx\BriskyDemoWSEc , You can give any name of your choice .

In Eclipse now Click on File --> import --> General -- >Existing Projects into Workspace

Browse to the Destination which you have given while creating libGDX build , i.e. D:\Java\libGdx\BriskyDemo for my Case . You will see Eclipse will show 5 projects to be imported . Just Click Finish

Eclipse Import libGDX Project

Eclipse Import libGDX Project

 

From Left Projects Right Click on BriskyDemo-Desktop --> run as --> Java Application

Eclipse Run as Java Application

Eclipse Run as Java Application

 

Select Desktop Launcher and Cick Yes and you will see default libGDX Screen as per screen shots below

Desktop Launcher

Desktop Launcher

 

Default Screen libGDX

Default Screen libGDX

 

Lets Import the same project in Idea s now i.e. Android Studio  and Select Import a non-android studio project or Import project (Eclipse ADT,Gradle etc)

Give the path of the destination which we have given while building libGDX setup app and click OK . It might ask for which SDK to Use , Select android Studio SDK . It will take some time to load and finally will load all 5 projects as loaded in Eclipse

Import Project Android Studio

Import Project Android Studio

 

 

Android Studio libGDX Projects imported

Android Studio libGDX Projects imported

 

Click on the Green button with Android Selected as in screen shot below

 

Click Green Button With android project selected

Click Green Button With android project selected

 

It will ask you to select your AVD i.e  Android virtual machine or a live android device connected to the machine . Select it and you will See libGDX default screen on your android device

 

Select AVD to Execute the program

Select AVD to Execute the program


Default Screen libGDX in AVD

Default Screen libGDX in AVD

 

To know how to create AVD . See my post here  

How to Create Android Virtual Device

Well ! I think by now our environment is setup and we are ready to work on the game .... Stay Tuned

Cheers !!

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

94 − = 85