LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and your WebGL enabled browser.

learn more… | top users | synonyms

4
votes
0answers
138 views

How to correctly implement 'layered lighting' with Box2D-Lights

How does one only allow Box2D-Lights to affect one and only one OrthographicCamera. After researching, I found the following answer. This answer goes into detail about how to prevent one camera from ...
3
votes
0answers
23 views

LibGDX: Shader files in assets - Access is Denied

I stored the glsl files in android -> assets -> shaders directory, but when I run the app, an error is displayed: Error:Gradle: Execution failed for task ':android:mergeDebugAssets'. Error: ...
3
votes
0answers
18 views

Tile Texture If Dimensions of Sprite Are Larger Than Texture

I have a sprite that acts as a wall in a game that I am building. I would like to have the brick texture repeat itself instead of stretch to fit the height of the screen. I tried: Texture ...
3
votes
0answers
94 views

Is it possible to use OpenCL in libgdx?

Been looking for a way to implement some OpenCL stuff in my libgdx project. It's possible via LWJGL which libgdx is based on, but it's only for the Desktop environment. Would like to have it cross ...
3
votes
0answers
371 views

LibGDX's HTML project doesn't show anything in Browser

The question is self explanatory, when I run my demo-html project as a Web Application and I open Chrome with the provided link by eclipse, my browser doesn't show the image it is supposed to show in ...
2
votes
0answers
23 views

Resetting Achievement Progress for testing

Hi I tried to reset the achievement Progress, but it is NOT resetting the increment count and i want to delete and create a new achievement each time for testing. Is there any workaround to solve this?...
2
votes
0answers
216 views

Porting libgdx game to iOS using Multi-OS engine - how to add Admob ads

I want to port my libgdx game to iOS using Multi-OS (RoboVM is no longer available). I've searched whole internet but can't find any info about how to use Admob with Multi-OS engine on iOS. Every ...
2
votes
0answers
75 views

Texture gets blurry when moving Box2D body

I'm having this issue that is very annoying. Somehow the texture of the player body is getting blurry and leaving a slight trail with its colors when moving it. The interesting fact is, this only ...
2
votes
0answers
55 views

Libgdx - multiple images in a group, best practices - also overdraw question

I am trying to right a card game, that will have an image in the middle, a coloured border and potentially a symbol in the top left. I am using libgdx and a stage/scene2d. The image will change ...
2
votes
0answers
38 views

libGDX AppWarp integration problem

I have tried to use up AppWarp's old SuperJumper as a sample to create an up to date project from it with Gradle. Maybe it is good for learning. So, I have downloaded project from GitHub(https://...
2
votes
0answers
17 views

Eliminate an Actor dragged outside SlotTarget

As the title suggests, i would like to eliminate an Actor from the Stage when the player moves it outside my SourceTarget. The default behavior of DragAndDrop class doesn't allow to drag an Actor on a ...
2
votes
0answers
65 views

Get a body from TiledMap via MapBodyBuilder and draw a sprite on it in LibGDX?

I use a various of MapBodyBuilder in my Libgdx project. I created a body from map.tmx via my MapBodyBuilder and in my SpriteBuilder buildSprite method i created its sprite: sprite = new Sprite(atlas....
2
votes
0answers
69 views

Scene2d cyrillic font

I'm trying to use cyrillic(Russian) letters in libgdx Scene2d. I drop default.fnt and default_0.png (generated with BMfont) into folder assets of my Android project (other files such as uiskin.atlas,...
2
votes
0answers
59 views

Creating a bitmapfont from images?

A bitmapfont consists of a image and a textfile that hold the position and size of each character on that image. Is there any way to create the text file with just a image? Or do I have to manually ...
2
votes
0answers
106 views

LibGDX on Android TV

Anybody wrote games for Android TV using LibGDX? What is the mapping of the remote control? Can we use the game controller with LibGDX? Thanks!
2
votes
0answers
57 views

balloon ligher than air with libgdx, impementation of FixtureDef.density, gravityScale, linearDamping?

I use libGdx/box2d's physic. My intention is to create a balloon filled with helium (a body, what hovers above a surface, if we apply a little force to it - it moves fast but not far, if we push ...
2
votes
0answers
455 views

Libgdx performance on old devices

I'm developing a game in Java for Android, using LibGDX. I'm using Nexus 5 to test my game most of the time and it works great (Minimum FPS it gets is 57 out of 60). Recently I ran my game in Galaxy ...
2
votes
0answers
203 views

generate box2d bodies from isometric tiled map

I followed the tutorial here to generate box2d bodies from a tiled map and that worked fine.... for orthogonal tiled maps. Unfortunately isometric maps use their own coordinate system where (0, 0) is ...
2
votes
0answers
133 views

LibGDX - ShapeRenderer as principal game entity renderer

I am trying to make a 2D game that is just a bunch of default figures like circles, arcs and quadrilaterals with no textures (similar to Super Hexagon), and for that I was using C# and XNA long time ...
2
votes
0answers
193 views

LibGDX Android Textures reload other textures, and transparent images get black backgrounds [Pictures]

I have very strange problems with my LibGDX Game in Android - The problem is that sometimes the textures get black backgrounds when they should be transparent, and sometimes when I remove the texture, ...
2
votes
0answers
948 views

Drag And Drop in libGDX (Target and Source)

I'm trying to put together a drag and drop system in libGDX with the help of DragAndDrop class. I have the typical system in which you can drag something into a box. So far it is working all dough I ...
2
votes
0answers
199 views

LibgGDX drawing two seperate Textures in FrameBuffer

So I am trying to combine multiple TextureRegions in to one by using a FrameBuffer. This works extremely well when the TextureRegions originate from the same Texture object/file but as soon as I try ...
2
votes
0answers
245 views

Incorrect click event when resize on libGdx

I want to use scene2D, in libGDX, to detect click on object. I have this simple Game sample : Stage stage; @Override public void create() { this.stage = new Stage(1280, 720, true); ...
2
votes
0answers
169 views

Unproject considering parallax depth

How can I take screen coordinates (or alternatively world coordinates on the 'primary' parallax plane) and find out what world coordinates they translate into when taking parallax depth into account? ...
2
votes
0answers
2k views

Libgdx ParallaxScrolling and TiledMaps

I implemented ParallaxScrolling for my SideScroller project, everything is working but the tiled map (the most important part!). I've been trying out everything but it doesn't work (see the code below)...
1
vote
0answers
12 views

LibGDX TexturePacker line problem

I'm trying to use a TextureAtlas for all my textures for better performance. Every time my game starts all my tiles are packed into one texture atlas. I have put following code into my DesktopLauncher ...
1
vote
0answers
34 views

Move to specified coords - libgdx and java

So I am making my bullets go to a point and travel further. Only its acting really really weird. Its like its thinking that the 0,0 location is at the top left instead of the bottom left. This is the ...
1
vote
0answers
25 views

Why it takes some time to update the sprite draw order in libgdx SortedIteratingSystem?

I have a rendering system that extends SortedIteratingSystem and created a comparator to sort the sprite draw order. But the problem is when I update the z index, it takes some time before it changes ...
1
vote
0answers
23 views

LibGDX: I need to get from SpriteBatch to Batch in order to draw a Touchpad

I have created a little game using LibGDX and it uses a SpriteBatch when it renders the game objects. Now I want to add a Touchpad to it, and the draw method of Touchpad takes a Batch as a parameter, ...
1
vote
0answers
20 views

Linking 3D Models together in libgdx (skeletal)

I'm drawing a 3D stick figure for an Android app using Libgdx and its ModelBuilder's createCylinder() and createBox() methods. In the render method I animate it by applying translations and rotations ...
1
vote
0answers
23 views

How do I pool a bullet in libgdx ashley ECS approach?

I'm having problem creating bullet pool in ashley ECS approach, because i'm using PooledEngine, everything is pooled. So I've done is I just use engine.createEntity(), engine.addEntity() and engine....
1
vote
0answers
11 views

Libgdx Error in Importing chartboost. sdk

I am trying to add chartboost ads, I had added the jar file to my libs but when I am trying to import the chartboost sdk it gives me error and the whole lines of: import com.chartboost.sdk.Chartboost;...
1
vote
0answers
25 views

What is the proper way of creating bullet in libgdx ashley ecs framework?

I'm still thinking, how do I properly pool a bullet in libgdx ashley? Because the PooledEngine is available, which the Entities, Components and Systems are already Pooled. I made this below example, ...
1
vote
0answers
25 views

Displaying an image when ScrollPane item is highlighted

I would like to have images displayed when an item in the list is highlighted as a form of a "preview" of the map that is selected. I'm not sure how i would implement this with clickListeners or ...
1
vote
0answers
12 views

LibGDX Compare color of Box2D objects on collision

I have two red balls and two yellow balls, which were created from a class Ball. The balls are box2d circles, with sprites attached. Is there a way in which I can check to see if two balls have ...
1
vote
0answers
25 views

Test for Box2D collisions between object being dragged and other objects

Goal: I am writing a prototype which has as many as 50 (Box2D) colored balls on the screen. I can drag any ball, and what I need to do is test whether the dragging ball has touched a ball of the same ...
1
vote
0answers
35 views

Libgdx final stage of adding admob to game

I had finished my game and wanted to add Admob ads to the game. I followed all the instructions in Admob in Libgdx and It's working very well, and the ads are shown properly, I just wanna be sure ...
1
vote
0answers
19 views

Rectangle in object-layer has wrong coordinates in game

I extended the SuperKoalio LibGDX Example about an Tiled Object Layer in the Tiled Level-Editor and draw a rectangle on this layer. Now I would like to draw this rectangle in my game using the ...
1
vote
0answers
20 views

How to communicate with LibGDX HTML5 app?

I'd like to have a HTML form send data to a LibGDX game deployed as HTML5. Ideally as a form in HTML as part of the same page that contains the LibGDX div/canvas, and use the form to set up some data ...
1
vote
0answers
26 views

Retreive 3d World Map coordinates from touch/click input with LIBGDX?

Problem: I am trying to create an RTS style interaction. I want to be able to click on the map and have characters move to the click location. I haven't been able to figure this out, even after ...
1
vote
0answers
30 views

Libgdx actions to image is applied to whole actors

I am trying to make the Image hidden then fade in and this is working but the background image is also become hidden the fade in : here where I apply the action in this class: public class ...
1
vote
0answers
37 views

TurnBasedGame with libGDX + Google Play Services

I'm trying to write a small card game for Android using libgdx framework. My game is turn-based. I wrote to interface with the necessary methods to access the API interface from Google. I faced the ...
1
vote
0answers
28 views

Unable to draw tabular view for images in libgdx

I am trying to draw a table of images using images from my asset folder. However I always get a blank black screen.If I replace the images with textbuttons, then I am able to draw the buttons in ...
1
vote
0answers
44 views

Libgdx Creating On Screen Controls

I am working on libgdx.I am using this example https://github.com/oakes/libgdx-examples/tree/master/SuperKoalio/core/src/net/sekao/superkoalio to create a game. I want to add controls on the screen, ...
1
vote
0answers
33 views

Different Box2D bodies act differently and unexpectedly with same mass

I have a box2d body which is simply a rectangle (the spaceship). This ship flies around, affected by the gravity of planets (static circle bodies) just fine. I have tried changing the ship fixture ...
1
vote
0answers
13 views

Setting useImmersiveMode to true makes a moving sprite blink in a LibGDX game

I'm developing a simple game where i have gravity and a body which jumps when i touch the screen and a sprite displaying in its position. All is good until i set useImmersiveMode to true on ...
1
vote
0answers
7 views

Game freezing when i create a body Box2D Libgdx

I'm implementing a Worms game using libGDX and Box2D and I'm having a problem I didn't have until recently. When a player shoots, it creates a bullet body and applies a force to it. I have a step ...
1
vote
0answers
60 views

How to force libGDX to set display mode?

The following code represents my attempt to switch display modes. I've had to include the redundant setWindowedMode because without it, libGDX would not force the change required to reflect the ...
1
vote
0answers
174 views

Box2dMapObjectParser isometric map - bodies have wrong position and size

I'm using Box2dMapObjectParser to load Tiled objects layer onto my IsometricTiledMapRenderer'ed TiledMap. It works OK with a UnitScale of 1 but the position is wrong and some shapes have weird ...
1
vote
0answers
84 views

Libgdx stops all sounds when there are lots of sounds

I'm making a 2D game for Android using Android Studio with Libgdx in Java. I have a class, called SoundPlayer, which holds an ArrayMap. The key is the name of the sound file and the value is the sound ...