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
1 answer

How to deploy Libgdx game to iOS

I have made a game using the Libgdx framework and deployed it to Google Play Store over a month ago. Now I want to deploy it to the Apple app store but the libgdx wiki is not updated on how to deploy to the iOS since RoboVM is discontinued. I am…
Karan
  • 201
  • 1
  • 3
  • 13
11
votes
1 answer

libGDX : Multi-color text in one label

I saw this post Multi-colored text in libgdx but it's not useful specially in new API. For example: I want to color "libGDX" text like this: BitmapFont font = new BitmapFont(Gdx.files.internal("fonts/CarterOne.fnt")); LabelStyle style = new…
iibrahimbakr
  • 1,116
  • 1
  • 13
  • 32
11
votes
1 answer

libGDX shader coordinate and camera position

I am working on a platformer with libGDX, Tiled Map and Box2D. I want to apply some shaders. I want a vignette effect that stick to the hero. For the vignette effect, I used this tutorial. The problem I encounter is: If the camera is fixed, I…
vdlmrc
  • 737
  • 5
  • 17
11
votes
3 answers

"Tainted canvases may not be loaded" Cross domain issue with WebGL textures

I've learnt a lot in the last 48 hours about cross domain policies, but apparently not enough. Following on from this question. My HTML5 game supports Facebook login. I'm trying to download profile pictures of people's friends. In the HTML5 version…
Will Calderwood
  • 4,393
  • 3
  • 39
  • 64
11
votes
2 answers

How to add libgdx to existing project

I have provided an aplication made in android that has a navigation drawer and in it has a list of games. I have to create another game and to put it there. The game that has to be created by my must use libGDX but the original application didn't…
ghita
  • 2,746
  • 7
  • 30
  • 54
11
votes
2 answers

How to get ttf font data from system fonts in java

I have some ttf fonts installed on system. I get that list using GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() This is not only ttf fonts but all fonts I guess. Eventually if I use: Font.decode(fontName) I can get…
Avetis Zakharyan
  • 887
  • 2
  • 9
  • 20
11
votes
2 answers

How do I link assets from android to desktop in libgdx?

Whenever I try to run the desktop version of my LibGDX project it says "badlogic.jpg not found". How can I link the assets folder from android to desktop? I found this post but I can't find out how to do it for android studio. I tried just copying…
Vincent Williams
  • 2,836
  • 3
  • 17
  • 22
11
votes
1 answer

LibGDX - Mapping Individual Textures to each face of a box using Modelbuilder.createBox

I have the following code snippet that generates a 3D cube: ModelBuilder modelBuilder = new ModelBuilder(); box = modelBuilder.createBox(2f, 2f, 2f, new Material(TextureAttribute.createDiffuse(AssetLoader.tr[0])), …
Scalarr
  • 746
  • 7
  • 26
11
votes
1 answer

How to resolve Gradle plugin dependency?

I am trying to install Eclipse integration Gradle from http://dist.springsource.com/release/TOOLS/gradle in order to create LibGdx project in Eclipse. But there is a dependency issue where I am stuck at and not able to understand the error. Below is…
sat
  • 40,138
  • 28
  • 93
  • 102
11
votes
4 answers

libgdx -- Gdx.files.internal(); --> File Not Found

I've been having trouble using the Gdx.files.internal() from libgdx; it seems that every time I run it as a desktop application i get this main error: Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: …
user3756264
11
votes
3 answers

How do I make a ProgressBar work in LibGDX?

I'm trying to understand how to use a ProgressBar in LibGDX. I have created the bar but I don't know how to make it works. I want to duplicate the knob in order to fill the bar(background line) in 60 seconds. I know how to manage about the time,…
adrianoubk
  • 225
  • 1
  • 4
  • 12
11
votes
1 answer

PolygonShape Native Method not found using new libgdx gradle project

I have a LibGDX project in android studio that uses gradle. It worked well until this morning but due to LibGDX changes now the box2d extension doesn't work properly. I think i've already done the right imports like so: build.gradle (root of the…
LaboDJ
  • 207
  • 1
  • 9
11
votes
2 answers

Unit-testing of libgdx-using classes

I'm writing a game over libgdx; I'm using the junit framework to simplify unit-testing my code. Now there's part of the code (a map generator, a class converting my own map format into TiledMap...) which I need to test thoroughly, but it uses libgdx…
Calimar41
  • 222
  • 2
  • 11
11
votes
1 answer

Android NullPointerException in $Proxy0.equals

I've recently published a couple android games based in libgdx, both of them have reported an error I have no idea where to begin with debugging. This is the stacktrace.- java.lang.NullPointerException: null result when primitive expected at…
ssantos
  • 16,001
  • 7
  • 50
  • 70
11
votes
2 answers

How to put properly a libgdx application inside swing application?

I'm creating a level editor for my game, and I ave a problem using LwjglCanvas with a JFrame. I use a JFrame (not a LwjglFrame) to keep engine and level editor as independent as possible. I have two JARs: WorldEditor.jar, and GameEngine.jar. Inside…
dooxe
  • 1,481
  • 12
  • 17