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
18
votes
3 answers

LIBGDX: How can i tell when a sound has finished playing?

The Sound API seems to be missing a function to indicate that a sound is finished playing. Is there some other way of finding out if the sound is done?
leech
  • 8,293
  • 7
  • 62
  • 78
17
votes
11 answers

Gradle - "Changes are not tracked, unable determine incremental changes."

When running my LibGDX desktop project I sometimes get this error: Changes are not tracked, unable determine incremental changes. I've tried using Java 8 and 17. I'm using Gradle 7.4.2. I've tried the changes mentioned here but they seem to be for a…
Michael
  • 3,411
  • 4
  • 25
  • 56
17
votes
2 answers

LibGDX logging not showing up in logcat

I cannot get LibGDX logging to work in Android Studio. First i thought I had the same problem as my previous question but made sure my app updated on debug. playButton.addListener(new ChangeListener() { @Override public void…
Madmenyo
  • 8,389
  • 7
  • 52
  • 99
17
votes
3 answers

Remove Actors from Stage?

I use LibGDX and move only the camera in my game. Yesterday I founded a way to draw the ground in my game. I'm trying to make a clone of Flappy Bird, but I have problems with drawing the ground which is moving on the screen. In every render call I…
Fabian König
  • 323
  • 2
  • 4
  • 10
17
votes
4 answers

How to change libgdx different window size?

How to change size in libgdx-android-desktop? I am confuse on window sizeing and not sure how to solve this problem. So for desktop window i want 500x500 but with android i want full screen so i cant hard code it. For some reason ANDROID_WIDTH is…
user2570888
  • 171
  • 1
  • 1
  • 5
17
votes
3 answers

Drawing a gradient in Libgdx

Ok I have this code @Override public void render() { // do not update game world when paused if (!paused) { // Update game world by the time that has passed // since last render frame …
JonFavale
  • 255
  • 4
  • 12
17
votes
3 answers

Is it possible to disable frame-limiting in libGDX?

More specifically, a desktop libGDX-LWJGL application. There are configurations options to disable CPU syncing as well as vsynching, but regardless the application runs at 60fps. This is fine for all practical uses - but out of curiousity if nothing…
Mistodon
  • 627
  • 1
  • 5
  • 12
16
votes
1 answer

How to set “Other Linker Flags” as Xcode in Eclipse?

In my RoboVM project, I used some third part frameworks. But they need add -ObjC to "Other Linker Flags", otherwise it will crash. I know how to add that in Xcode, but in Eclipse, how can I do that?
Donel Chan
  • 161
  • 4
16
votes
1 answer

'sourceSets' cannot be applied to 'groovy.lang.closure' warning in Android Studio

I've created a new AndroidStudio project using the libGDX generator. When I import the project into AndroidStudio using the build.gradle file, I get a warning while editing build.gradle file 'sourceSets' cannot be applied to…
kalebthered
  • 161
  • 1
  • 6
16
votes
1 answer

How to scale sprites in libgdx according to screen resolutions?

I am trying to scale the texture to fit the screen width. This is what I tried, but it simply repeats the texture. It does not scale it. In the init method: TextureLoader.TextureParameter param = new TextureLoader.TextureParameter(); param.minFilter…
Z0q
  • 1,689
  • 3
  • 28
  • 57
16
votes
2 answers

libgdx multiple objects implementing InputProcessor

So on my Screen I have two objects of the same class that implement InputProcessor with the following keyDown() method: @Override public boolean keyDown(int keycode) { if (keycode==fireKey) { System.out.println("Reporting keydown…
TimSim
  • 3,936
  • 7
  • 46
  • 83
16
votes
1 answer

slow model batch rendering in libGDX

I've got a question whether there is a special mode for grouping models in libGDX. I created a simple class that implements ApplicationListener which shows my problem. I am using the nightly build of libGDX. I read two different models which use the…
Paweł Jastrzębski
  • 747
  • 1
  • 6
  • 24
16
votes
0 answers

Building libgdx as a view inside a ViewController

Is there any way to build a libgdx application as a view/viewcontroller inside a main ViewController the same way it can be done in Android with Views inside an Activity?
MLProgrammer-CiM
  • 17,231
  • 5
  • 42
  • 75
16
votes
3 answers

How to get a Label with wrapped text?

I ave tried the following code: Label label = new Label(reallyLongString, skin); label.setWrap(true); label.setWidth(100); // or even as low as 10 table.add(label); ... and yet all I get is a very wide line that draws off the screen. How to get a…
talloaktrees
  • 3,508
  • 6
  • 28
  • 43
16
votes
2 answers

Adding a "rate my app" button in libgdx game

I want add a button in my game that will open up an URL to my app in Play Store. Below is what I got so far, but when I click on rate button it does not open the respective URL. My rate code is: if(Gdx.input.justTouched()){ …
Vishal Singh
  • 621
  • 3
  • 7
  • 17