A game library which enables cross-platform game development in Java, with support for Android development and desktop development. It makes use of OpenGL for portability.

learn more… | top users | synonyms

0
votes
1answer
96 views

Libgdx stage rendering issues

I'm using scene2d for the first time, and I can't get anything to draw EXCEPT the stage ui. Say I have my ui on top of my game screen: uiStage.act(): batch.begin(); gameSprite.draw(batch); //does not ...
0
votes
2answers
82 views

LibGDX - draw bullet physics bounding box

I am very new to game development and I am trying to debug my 3d collision bounds. Could somebody give me an example on how to draw the collision bounds of an object in libGDX? I assume it has ...
1
vote
1answer
43 views

Cannot Efficiently Loop SequenceAction

Why doesn't this work and how do I fix it/create a different, working loop for this SequenceAction? public void setLoopingFade(float time) { fadeLoop = Actions.sequence(Actions.fadeOut(time), ...
0
votes
1answer
90 views

2d Ice movement

I am building an top-down 2d RPG like zelda. I have been trying to implement ice sliding. I have a tile with the slide property. I thought it would be easy to get working. I figured that I would ...
1
vote
3answers
661 views

libgdx - collision detection with tiled map java

currently, I am working on a 2d rpg game which is similar to final fantasy 1-4. I can load up a tiled map and the sprite can walk freely on the map. However, I will like to create a wall for it to ...
1
vote
1answer
196 views

How do I efficiently collide and match groups of coloured circles?

I am new to game programming and working on clone of this game in libgdx. The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
2
votes
1answer
143 views

How do I split a texture into differently shaped pieces with libgdx?

I want to split a texture into variously shaped pieces with libgdx, like the pieces of a puzzle game. TextureRegion.split() is not an option, as it splits into equally sized rectangular texture ...
0
votes
1answer
30 views

Master sound volume in LibGDX

I have been searching everywhere for master volume for sound and music in LibGDX but to no avail. Can anyone tell me if it is implemented somewhere or do i need to implement such functionality myself? ...
0
votes
1answer
93 views

TiledMap not drawing completely

While attempting to constrain camera scrolling to within the TiledMap I discovered that it seems the renderer for the map is not drawing the entire map. The map is 1600x960px so one would assume the ...
1
vote
1answer
41 views

Daily Unlock in LibGDX

I am trying to make a game that is a collection of mini games. The mini games will unlock daily. There are story for each day. And the story cannot be repeated so for example the player start playing ...
0
votes
1answer
182 views

libgdx ActorGestureListener.pan() parameters not moving actor in smooth line

I override the pan method in ActorGestureListener to implement dragging actors in libgdx (scene2d). When I move individual pieces on a board they move smoothly, but when moving the whole board, the ...
0
votes
1answer
75 views

How to keep track of previous scenes and return to them in libgdx

I have three scenes: SceneTitle, SceneMenu, SceneLoad. (The difference between the title scene and the menu scene is that the title scene is what you see when you first turn on the game, and the menu ...
0
votes
0answers
24 views

LibGdx how to get touched point in differente screen resolution

I'm developing a game actually on phone and tablet. In libgdx I found that using camera.unproject api with vector3 can get the relative coordinate for differente screen resolution however I doesn't ...
0
votes
2answers
77 views

libgdx - handling battery warning

I want to pause my game when the battery warning on Android pops up. How do I do this? I have a method that pauses the game but how do I call it when the battery warning pops up?
1
vote
1answer
52 views

Touchable Hud with Actors in Libgdx

I am writing a Tower Defense for Android. Right now my LevelScreen contains a Background-Actor which is pan-able and some zones to buy Towers - after buying them you can upgrade them further. When you ...
0
votes
1answer
71 views

Array of map data

I'm looking for your thoughts on the best way to store map data. I need to store data for territory ownership for each pixel on the map. The data for each pixel is as such: Player 1 points: 24 ...
1
vote
1answer
607 views

Libgdx import bin/xml/json from physics editor

I'm using Libgdx. I did a simple json file in Physics Body Editor and I don't have any idea how could I import it into my physic world in libgdx. Any idea will be appreciated. P.S: Sorry if there ...
0
votes
2answers
44 views

LibGDX Images not loading

Now my Image isn't loading to the screen. I tried to be decorative with the code but since it isn't working I made it just like the video I'm whatching. I don't get any exceptions, but the image ...
0
votes
0answers
33 views

Experiencing weird effects with framebuffer

So I am trying to build a working flashlight in my game. I am using libgdx and the framebuffer class but there are some weird effects that I am experiencing and that may be due to my lack of ...
0
votes
3answers
500 views

LibGDX Android version

I am trying to use the LibGDX UI Project creator to create LibGDX projects, but it doesn't allow me to choose the Andorid version for the project. This is a problem for some android features. For ...
1
vote
1answer
122 views

Matrix rotation wrong orientation LibGDX

I'm having a problem with matrix rotation in libgdx. I rotate it using the method matrix.rotate(Vector3 axis, float angle) but the rotation happens in the model orientation and I need it happens in ...
1
vote
1answer
4k views

LibGDX Box2D Body and Sprite AND DebugRenderer out of sync

I am having a couple issues with Box2D bodies. I have a GameObject holding a Sprite and Body. I use a ShapeRenderer to draw an outline of the Body's and Sprite's bounding boxes. I also added a ...
2
votes
1answer
65 views

How can I use imprecise accelerometer data for controls?

I want to rotate an object with respect to the phone's position. I use the accelerometer output to detect orientation: float roll = Gdx.input.getRoll(); float pitch = Gdx.input.getPitch(); float ...
0
votes
1answer
88 views

How to follow object on CatmullRomSplines at constant speed (e.g. train and train carriage)?

I have a CatmullRomSpline, and using the very good example at https://github.com/libgdx/libgdx/wiki/Path-interface-%26-Splines I have my object moving at an even pace over the spline. Using a simple ...
0
votes
1answer
46 views

Does LibGDX abstract OpenGL ES away or can I still use my OpenGL ES knowledge?

I've been learning OpenGL ES, and am now turning my attention to using LibGDX. My main concern with LibGDX is, if needed, will I be able to apply my OpenGL ES knowledge to something if needed and ...
0
votes
1answer
351 views

Communication between Box2D and libGDX Stage (Scene2D) running in separate threads

I'm making a physics based 2D game using libGDX and Box2D. I want to move the execution of the simulation out of render thread. I use immutable messages and the BlockingQueue to pass the information ...
1
vote
1answer
89 views

Problem to match font size to the screen resolution in libgdx

I'm having problems to show text on my game at same size on different screens, and I did a simple test. This test consists to show a text fitting at the screen, I want the text has the same size ...
4
votes
1answer
794 views

Problem Implementing Texture on Libgdx Mesh of Randomized Terrain

I'm having problems understanding how to apply a texture to a non-rectangular object. The following code creates textures such as this: from the debug renderer I think I've got the physical shape ...
0
votes
1answer
371 views

Black Screen on pressing back button in libgdx

In my game when i touch on advertisements and press back button to return on game the i am getting a black screen. I referred this link. I tried to change IosGraphics.java but the change is not ...
1
vote
1answer
72 views

Restarting a libGDX game to apply changes to resolution

How can I restart a LibGDX game to apply certain changes to the game such as changes to the resolution (going from 1920X1080 to 1280X720), or changing full screen. Granted the resize(int width, int ...
1
vote
0answers
21 views

LibGDX mesh silhouettes

How could I find out the silhouette edges of a mesh in libgdx? More specifically, how could I produce shadow volume geometry using the Mesh class of libgdx?
2
votes
3answers
132 views

(LibGDX) Changing Origin of Box2D World relative to TiledMap (or Vice Versa)

I'm playing around with Box2D and TiledMaps and I've come across this minor annoyance. As you can see, both Box2D and TiledMap render at the center of the screen. This forces me to compensate by ...
0
votes
0answers
29 views

libgdx ScissorStack problem

Im making a user interface using libgdx I created a Window class & a Textfield class, that both use clipping. I use the ScissorStack class of libgdx for clipping. The Textfield is drawn inside ...
3
votes
1answer
77 views

How do you create a game overlay that makes the underlying graphics inactive?

I've created a simple game, and I drew a large rectangle in photoshop with faded edges that I want to use to overlay the game until the user presses "Begin" (on the overlay). The problem I'm currently ...
0
votes
0answers
11 views

InvocationTargetException caused by IllegalArgumentException due to trying to create a new OpenAL instance

So, after creating this class, (in this LINK) , I ran into a new problem, I recieved an InvocationTargetException, which is generally caused when a method is invoked and an exception is created when ...
0
votes
0answers
45 views

How to open another class by clicking on a button on libgdx?

I have a question about libGdx. I am making my own game, I have already made a splash screen and a main menu. I have made a button "Play" in my menu but I can't link it to my main game. however, I can ...
1
vote
2answers
117 views

Act on Right Mouse Button click on Button

I want to be able to listen for a right mouse click onto a TextButton. Is this possible without removing the default ClickListener of the TextButton? If yes, how? Or should I use a different listener? ...
2
votes
1answer
54 views

Centering a textbutton in a table libGDX

I have a few Tables spread across a Stage, now I have a problem. In one table, all the TextButtons are centered, while in a different one they aren't, like this: Table 1 Table 2 XXXtextXXX ...
0
votes
0answers
21 views

scrolling texture in libgdx

I am making a game using libgdx I need to the space to go forever I have written code but it is not very effective take a look. Look at the code that I used to move the background but I want to use a ...
2
votes
1answer
237 views

How to match font size with screen resolution?

So I'm working on a game using LibGDX, and I have a problem. To make my game fit most resolutions, I created a base asset for each aspect ratio, for example, a main menu background image, I made it ...
1
vote
1answer
49 views

Libgdx - Sprites disappearing [closed]

I'm facing a little problem and I have no idea to bypass it. I've made a dungeon generator and I'm able to spawn randomly mobs, the problem is that when they are not moving the game is fine, but at ...
1
vote
1answer
58 views

Libgdx Box2d createfixture crashes vm intermittently

I have a hard to debug problem. I have a Box2D game which creates a wheeled vehicle. I want the vehicle body to reflect when it goes from moving left to moving right. to do this i set a flag in a ...
0
votes
0answers
23 views

vertical lines on texture in libgdx

i am getting vertical lines on my texture even though i tried implementing texture filters,both linear and nearest and still i get the lines.how do i get rid of it? here is the code: package ...
1
vote
1answer
104 views

Dialog Title Does Not Fit

I successfully added my own font to the default .json file and it displays, however I get some weird sizing issues. Specifically when I try to create a Dialog. This is what it looks like: Ignore the ...
0
votes
0answers
47 views

Have button style not change when down

I'd like the button style to only change when it is checked and not change when it is pressed down, and/or have only the font color change. I'm using the built in Skin function with a .json file, ...
2
votes
0answers
98 views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
0
votes
0answers
34 views

Frame Buffer couldn't be constructed: incomplete attachment error on nexus 7

So I am running into an issue where I cannot load my game onto the nexus 7 because of the error stated previously. I read online that this is because the device can't use the Format class or something ...
0
votes
0answers
52 views

LibGDX scene2d button click not passing through to next input processor despite returning false

I currently have two input processors in my multiplexer, in the following order: Stage GameInput On the stage, I have an ImageButton with the up/down states set up correctly. Since the stage is ...
0
votes
1answer
60 views

Multiple clicks required before listener is called

I have a screen with multiple stages (pre-game, game, pause) and on the game stage I have a pause button. This is implemented as: public class PauseButton extends Actor { private NumberzGame ...
0
votes
1answer
52 views

Convert Screen coords to World Coords LIBGDX

I'm working on a tile based platformer game in libgdx. I'm having trouble getting the actual touch input coordinates when the aspect ratio of device is different from the virtual fixed aspect ratio ...