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

Controlling and creating multiple sprites array Java Libgdx

I am trying to create a game which has sprites and every second another is spawned, i tried using this as a base: https://github.com/libgdx/libgdx/wiki/A-simple-game However when the new one spawns in it destroys the old one and they start to spawn…
user3165683
  • 347
  • 1
  • 9
  • 28
3
votes
1 answer

How can I save an image from a web page using libgdx HttpRequest and HttpResponseListener?

My current code using these methods is here and work fine for getting text back. How can I modify this to save an image to the filesystem? public static class URLResponseListener implements HttpResponseListener { public void…
Sym
  • 187
  • 2
  • 9
3
votes
2 answers

Libgdx I18NBundle, cant show scandinavian letters

So I've created a I18NBundle for all my strings to support different languages, my problem is that when i draw the strings in my game, the letters æ ø and å wont show, so that something that should be: "Spil på tid" shows up like: "Spil p tid",…
Jolly
  • 399
  • 2
  • 12
3
votes
3 answers

Class Design in Game Programming

I am developing a game for a company. I will only develop this game for 2 months. My company ask me to make my code clean and extendable so they can hire another programmer when they need to add more features. I have read Clean Code by Uncle Bob. I…
3
votes
1 answer

LibGDX fonts with mipmapping drawn as black squares

I've encountered some issues with LibGDX's filtering. Fonts work fine without using mipmaps, but when I add them the text renders as a series of black boxes. Here's the method I use to generate a font. public static BitmapFont generateFont(String…
Jephron
  • 2,652
  • 1
  • 23
  • 34
3
votes
1 answer

libgdx - implementing moving Kinematic body

project: I am making a simple project in which i want to be able to make a kinematic body and move it from point x to y. There doesn't seem to be much directly on "Creating kinematic bodies". i've been following a few different tutorials on…
RooneyMUFC
  • 103
  • 2
  • 11
3
votes
2 answers

BitmapFont Memory Leak

I am using a BitmapFont as follows: create(){ font = new BitmapFont(getFileResource("50.fnt"), getFileResource("50.png"), false); } dispose(){ font.dispose(); } I have several screens that load and unload fonts of different sizes.…
jeremyvillalobos
  • 1,795
  • 2
  • 19
  • 39
3
votes
2 answers

Libgdx coordinates Gdx.input.getX() incorrect

So I'm sitting here with a phone with a 800px wide screen.. and Gdx.graphics.getWidth() also returns 800 as it should.. But when I get coordinates from Gdx.input.getX() the highest number I get when touching the screen all the way to the left is…
3
votes
1 answer

Android Gradle Build Errors

I am getting errors building my Libgdx project with gradle. the android version is broken, but desktop works fine. I have all jars setup in build.gradle as well. It does successfully clean and build the android project file, but when I run the APK…
ahew
  • 116
  • 1
  • 3
  • 10
3
votes
1 answer

Top-Down Car in JBox2D libGDX movement issues

I am trying to implement a Java version of the top down car game based on Emanuele Feronato's "Two ways to make Box2D cars". I know some basics of box2d and for the most part I converted the code to Java as is with few exceptions. However, when I…
BBogie
  • 31
  • 5
3
votes
0 answers

Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxx LibGDX Android

I'm making a Android game with LibGDX and I want to use the Google Play Game Services API but I can't get it working. Here's what happens when I try to login: 06-12 20:08:47.745: E/Volley(4046): [253] tk.a: Unexpected response code 403 for…
user3575481
3
votes
4 answers

Texture from Texture Atlas Find Region or Create Sprite

I am trying to get the Texture from Sprite or Atlas Region created by Texture Atlas. atlas=new TextureAtlas(Gdx.files.internal("Test.pack")); region=atlas.findRegion("green"); or Sprite s = atlas.createSprite("red"); texture =…
Jatin
  • 341
  • 3
  • 8
3
votes
1 answer

Making "toggle buttons" with LibGDX

I'm trying to make sort of toggle buttons with LibGDX, so I searched how I could do them, and I found the ToggleButton class, but I suppose it's old since I don't have it in the last build... So I'm trying to do them this way: final TextButton…
shinigota
  • 53
  • 2
  • 7
3
votes
0 answers

Shader code wrong on the Adreno GPU

I'm coding a page curl effect (use libGdx). My code work well on the Mali GPU (Samsung S3), but it wrong on the Adreno GPU (Samsung Ace): #ifdef GL_ES precision mediump float; #endif varying vec2 v_texCoords; uniform sampler2D sourceTex; uniform…
hunghd
  • 1,274
  • 11
  • 21
3
votes
5 answers

Build Model Timeout when importing Gradle project in Eclipse

I've created a new libGDX project, which basically creates a gradle project that you can then import into your respective IDE - I'm using Eclipse Kepler. I import the project by going to file > import > gradle > gradle project. I then point the…
user818700
1 2 3
99
100