Questions tagged [libgdx]

'libGDX' is an open-source cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and WebGL enabled browsers.

The libGDX project is a cross-platform (Windows, Mac OS X, Linux, Android, BlackBerry, HTML5, and iOS) game development library written in Java with some JNI code. It abstracts away the differences between the different platforms and enables easier development of OpenGL-based games on them.

'libGDX' is an open-source effort, started by Mario Zechner in late 2009/early 2010. In its original form it was an attempt at a rapid prototyping library which avoids the slow development cycle usually encountered when creating pure Android applications. The goal was to be able to work mostly on the desktop, and only deploy to the emulator/a device when absolutely necessary.

'libGDX' now is a multi-backend, cross-platform game development library which is not only targeting Android, but it can also be considered a viable framework for desktop applications (stand-alone, applets, and Web Start).

It includes a wrapper to work directly with (2D physics). And one for (3D physics).

Please note that there's a rich community on the official forum, and an official wiki.

The current stable version is 1.11.0, which was released in May 2022.

12609 questions
11
votes
2 answers

Is there any 2D Game Engine Better than Libgdx?

I've started libGDX programming a few months ago, and I've found many tutorials for basics. I've liked its cross-platform nature and ability to build Android, desktop and many other game versions at the same time - but when getting into intermediate…
Waleed Mohamed
  • 233
  • 1
  • 5
  • 10
11
votes
4 answers

libgdx coordinate system differences between rendering and touch input

I have a screen (BaseScreen implements the Screen interface) that renders a PNG image. On click of the screen, it moves the character to the position touched (for testing purposes). public class DrawingSpriteScreen extends BaseScreen { private…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
11
votes
1 answer

When to use ShapeRenderer, Mesh + SpriteBatch, Box2D and Scene2D in Libgdx?

I'm new in Android Game Development and after I started with libgdx ShapeRenderer and did a little more search, I became confused if I started with the right foot. So, what I really would like to know is when should I use ShapeRenderer, Mesh +…
Cristiano Santos
  • 2,157
  • 2
  • 35
  • 53
11
votes
1 answer

Is Cocos2d-x commercial quality?

Possible Duplicate: Cocos2D OR libgdx for Android Game Developement I am interested in using cocos2d-x for Android and iOS development but not sure it its ready for prime time? How does cocos2d-x compare to libgdx on android? It seems like they…
Code Droid
  • 10,344
  • 17
  • 72
  • 112
11
votes
3 answers

image is not a power of 2?

So, i've made the raindrop tutorial project by libGDX. However, when i attempt to deploy it to the emulator i get an error saying that the image is not a power of 2. But i did re-size the images to be 48X48 using GIMP (as the tutorial had…
BigBug
  • 6,202
  • 23
  • 87
  • 138
11
votes
1 answer

LibGDX inside Android Activity

I'm in the middle of developing a small app for Android using the Android UI and activities for the most part of the interaction, however one key aspect requires the use of LibGDX (using 3D models and physics). I want to be able to click a button in…
Ice Phoenix
  • 1,001
  • 3
  • 16
  • 34
11
votes
1 answer

Producing eraser effects using libgdx and OpenGL ES

Please consider the following images for the illustration: Initially I fill the whole screen/stage with individual Images until the screen turns pink. Each blob of pink colour is an individual Image actor that I add to the stage. Now I want to…
Rafay
  • 6,108
  • 11
  • 51
  • 71
10
votes
6 answers

Managing assets between desktop and device version in libgdx

I'm building a little Android game using libgdx. For now I have a copy of the game's assets in the desktop project folder and the Android project folder. For some strange reason I have to access those files differently in each of the two…
Boris
  • 8,551
  • 25
  • 67
  • 120
10
votes
3 answers

How do libgdx detect keyboard presence

When writing in the Textfield, I need my textfield to move upwards in order to let the textfield be visible when the keyboard pops up. Does libgdx have some kind of method which returns true if the keyboard is visible and false when it is down?
Patrick Romstad
  • 141
  • 1
  • 5
10
votes
0 answers

Unable to parse template "Class" Error whenever I try to open a new java class

I'm doing an Android Studio project (from this tutorial here: http://www.kilobolt.com/day-2-setting-up-libgdx.html). When I press New Java Class I'm getting the error that's described in the title: Unable to parse template "Class" Error message:…
Erick Adam
  • 399
  • 6
  • 13
10
votes
1 answer

Draw text over sphere in libgdx

I am trying libgdx for rendering some fbx models and I successfully did that, but I am stuck at a point. I am rendering a basketball fbx file with the help of ModelInstance and now I want to draw a text on that basketball. I am able to draw text on…
Vikrant_Dev
  • 430
  • 2
  • 15
10
votes
4 answers

Libgdx | Scene2d | Set background color of table?

I am creating a menu (like the one is flappy bird, when you die it pops up over the play screen). I created a class that extends table, and I want to set the background of the table to white. Is there a way to do this?
J Doe
  • 385
  • 4
  • 16
10
votes
1 answer

How do I create a shared library in C++ for both Android and iOS?

I am using LibGDX to write apps for both Android and iOS and I want to be able to add C++ code to my apps to optimize certain parts and to port some functions etc. I have been searching the internet and tried to follow some tutorials, but did not…
Z0q
  • 1,689
  • 3
  • 28
  • 57
10
votes
1 answer

make scrollable list in circular shape using libgdx

I am developing a game using libgdx. I am stuck at making a list in the shape of a half circular which is also scrollable. This is a sample image (not circular) which I want to be in similar shape like this. I know this question doesnt contain any…
shine_joseph
  • 2,922
  • 4
  • 22
  • 44
10
votes
3 answers

What is a Delta time in LIBGDX

What is a Delta time in LIBGDX? I read many posts regarding that. To my knowledge, Delta time is, The time gap between previous and current frame delta time will add upto 1 since its the computation of x frames per second ie.(1/x of the frames) To…
Anusha
  • 939
  • 3
  • 13
  • 31