I have developed some applications on android.But now i want to learn game development in Android & iOS with libGDX. I want to only develop for Android & iPhone.I do not want a desktop project. All tutorials tell me to first create desktop project than write code in main project & than run as Android application. But i want to write code in android project using both android & libGDX features. Is this possible ? if yes than how ?

  • \$\begingroup\$ Simon is correct. You can setup the project using the gdx-setup-ui.jar and safely delete the yourproject-desktop folder. You won't, however, have any extra benefit for doing so. \$\endgroup\$ – petervaz Jun 13 '13 at 12:30
  • \$\begingroup\$ can all the APIs and classes and all other features of Android accessible from main project ? \$\endgroup\$ – Shruti Jun 13 '13 at 12:46
  • 3
    \$\begingroup\$ Most of the libGDX APIs just compile multiple platforms and you don't have to worry about platform specific stuff. For example touchDown behaves like a touch on Android/iOS and a click on desktop. Obviously an accelerometer is missing from desktop, but you can emulate it, and it compiles just fine. Also some of the GWT/HTML5 stuff is incomplete. Desktop just compiles/runs faster making iteration way better when you are debugging. I would go insane if I had to wait 2-3 minutes for the emulator to load up every time I compiled my program. \$\endgroup\$ – mobo Jun 13 '13 at 13:39
  • \$\begingroup\$ can you please give me any link where i can find any mobile specific game example .....? \$\endgroup\$ – Shruti Jun 14 '13 at 12:54

As far as I know the framework, you code your game once, and it automatically creates an executable for all the platforms. So if you only want to make the game for Android and iOS, you only export the executable for these platforms and ignore the other platforms.

The game also isn't made in the 'desktop' project, it is made in the main project. The 'desktop' project is one of the executables.

  • \$\begingroup\$ can all the APIs and classes and all other features of Android accessible from main project ? \$\endgroup\$ – Shruti Jun 13 '13 at 12:44

When you create an app with gdx-setup, simply select Android and iOS and de-select Desktop and Web options. If you have created them, just ignore them.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.