I have just started game development in android and for which i choose Libgdx framework, i downloaded gdx-setup.jar file and setup inside android studio. when i opened the libgdx project in android studio, it does not show any 'res' folder, layout, etc. means nothing about gradle (drag & drop). Is there any way so that i could get the gradle (drag and drop) dependency management with Libgdx in android studio..
I searched over the net, but could not get any understandable solution regarding this.
Thanks for your time
LibGDX and Android is not the same thing. LibGDX uses different ways to present ui's which are cross platform.
I've seen some 3rd party software for visually generating scene2D stuff but have never tried it myself.
However, what you are describing is android specific stuff that has nothing to do with LibGDX, so you won't find it.
If you want to get into LibGDX look into this wiki page.
If you are searching for a tool where you can create an UI via Drag and Drop you can use Overlap2D. It is an editor for Scene2d which is used by libGDX
Related
I want to be able to run my Android code/app on Windows/Mac/Linux/etc. but not use an emulator, as they are slow/cumbersome.
I want a real Java SE app, but to reuse my Android code.
My idea is to make an Android emulator using Swing, read the layout files and create the widgets in Swing and map between the 2 UI event models, life cycle, and library classes.
Question is, does such a thing exist already, I googled it, but could not find anything.
Otherwise I will start an open source project for it myself. Anyone interested in helping is more than welcome.
So I created an open source project "Swingdroid" that lets you run Android apps and Java swing desktop applications.
You don't need to use an emulator or change any code. It loads Android layout files and activities and renders them using Swing.
On GitHub here,
https://github.com/BotLibre/BotLibre/tree/master/swingdroid
I totally agree with #muratgu. But, if you just want to parse Android layouts (views) xml files and render them using Java Swing, this is possible and this has already been implemented, before deciding to make your own implementation, you'd better check the wysiwyg feature of UI editor in Android Studio.
I'm wondering if it's possible to install libGDX without the android SDK. I don't want to have it create a bunch of projects for HTML, Android, and IOS I just want a Desktop app. Is this possible? If not, is there any other openGl library like libGDX? I'm wondering because Slick2D stopped being developed and libGDX is all that I know that's left.
Yes it is possible to run only the Desktop version, you can download the setup program and run it you will have to uncheck the boxes for Android, iOS and HTML, so you are left only with Desktop.
Download set up program here
I'm trying to begin programming with libgdx (in Windows XP with Eclipse for JAVA - Android) but, as every begining, nothing is clear and every doubt is a big problem.
I have found some tutorials about how to begin to programming with libgdx, but every tutorial found says the same: you must create a PC project for compile the native JAVA code and then create another project for Android who needs the PC project.
It's possible to do it in a easier way (all in only one Android project)? If it's possible, how? It would be really slower? I run my Android projects in my device (a Motorola G) and it seems pretty fast.
All (kind) responses will be appreciated. Thank you.
Are you using the project generator? http://code.google.com/p/libgdx/wiki/ProjectSetupNew
You could use that and simply ignore the non-android projects it creates ,even delete the other ones you don't plan to use (not the main java one though) and run it via an android emulator/device.
You will probably still have to keep the main java project, libgdx is geared towards people that want to compile to multiple devices.
It's been over year since i've used libgdx and i don't recall this being one of the issues i had with it.
The easiest way I find is to actually just put a main method class in your libgdx project. I have a wrapper project for android that invokes my libgdx project but if you look at the example in superjumper source in github you can see they just put a main method class within their libgdx project.
The android project then just delegates to this project.
Consider though, if you do run it directly from a project, you'll need to code in keyboard cursor keys which is pretty easy, you can follow the superjumper example here line 138.
I know that questions like this have been asked before, and I have been sifting through them. So here is my situation: I have a decent amount of experience using Java, specifically Eclipse, and I have a game ready that from my current standards, could be uploaded to the Google marketplace.
However, I have the project saved as a Java project. How do I make this project into an android app? I have attempted using the ADT plugin for Ecclipse, and changing the nature of the project file but I am beyond confused regarding how to proceed.
Right now I can click: Run < Run as < Java application.
The goal is to be able to click: Run < Run as < Android application.
I don't know of a streamlined way of doing it. Is your game using Swing as a UI? JavaFX? Is it text?
Regardless, I imagine your game would need to be wrapped in an android activity in some way. e.g. The activity can invoke the browser to run your applet (if your game is an applet).
I'd first create an android project, then copy your source from the java project into the android project. The manifest (R) will be updated with the new resources, etc.
Then you have to finish wiring everything up.
It's going to take more than that. Android has it's own UI system and lifecycle that differs from raw Java. Depending on how you've written the game you may be able to reuse a lot of the drawing and logic code but you going to need to make a lot of changes to the input and allowing multiple screen sizes.
Without seeing your code I can say exactly what you'll need to do but I can tell you it's not going to be as simple as Run As... Android Application.
Although android apps are written in Java code, this doesn't means that it is possible to "translate" a java program or a game in an android app simply clicking a button.
If the game are complex I suggest that you rewrite the game using a framework for develop android game!! You can reuse some logic but sure you have to create all the graphics and readapt the game to run in android devices.
GOOD WORK!!
Be patient and star from here:
Androi Developers
It is not possible. You can implement the application logic in Android in the same way that you used in Java, but you cannot simply convert the java project into Android project. Some packages used in your java project (like swing) can't be used in Android.
Hi all I have question.
I want to use Scoreloop system in my LibGDX game. So i want to change Libgdx Android Activity to Scoreloop Activity. The problem is that Libgdx abstract layer is out of Android Eclipse project - Libgdx shares Eclipse desktop project and Android Eclipse project. The main game logic is out of Android Eclipse project.
Summing up - How is the simplest way to change android activity in cross-platform Libgdx eclipse project.
regards
You must put android specific code at libgdx android project.
Take a look at http://decisiontreegames.wordpress.com/2012/03/17/writing-android-specific-code-in-libgdx/ for a better integration model.