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

-1
votes
0answers
34 views

Integrating Google API client with Libgdx

The Google API guides are some of the worst most confusing reads I've ever worked through. I have a few nice working games for Android and I bought the Developers account for the Play Store, but there ...
-1
votes
2answers
54 views

How big is a Game World in LibGDX?

I know that the game world is like the whole game itself and most of the time, the developer sets the Screen to be a particular section of the Game World. However, how big is the Game World? For ...
0
votes
0answers
8 views

Does the Physics Body Editor from Aurelien Ribon work with a Texture Atlas?

Is it possible to use the Physics Body Editor from Aurelien for a texture atlas? I have only been using it with seperate textures. If so, can someone please give an example in code? This is my ...
0
votes
1answer
25 views

How is the render() method called in LibGDX?

Ok, I know that the project generator in LibGDX finds the render(deltatime) method in my Game project and make it into a game loop so that it repeats itself on an average of 60 fps. But I want to know ...
0
votes
1answer
44 views

How to move an object from off screen right to left continuously?

I am trying to make an object move from off screen on the right to off screen left and continuously generate (like the flappy bird pipes). How would I do this with my current code below? I have tried ...
0
votes
1answer
25 views

How to change mute/unmute button?

I'm saving music in libgdx preference, the following code works perfectly but if you enter the settings again you'd see the initial button up regardless if the sound is muted or not. TextureAtlas ...
1
vote
2answers
63 views

Register Enemies in game development

I'm working on a game to learn the basic for game concepts. I end up with the following problem. I got a class called enemy, but now I want different types of enemies. These enemies extend from this ...
0
votes
2answers
50 views

what makes render() and update() change frame 60 times every second in LibGDX

Whenever we declare the render(float deltatime) or update(float deltatime), in any class, it automatically become a method that is repeated 60 times per second. But what makes this method repeat ...
1
vote
1answer
51 views

Why do we put deltaTime as a arguement in render() LibGDX?

I know that deltaTime is the time the last frame took to be rendered. However, I have no idea why we have to put it inside the parameter of the render method. I also don't know how the render method ...
0
votes
0answers
13 views

QueryAABB and PPM calculate in Libgdx

How does the calculation works for the QueryAABB in the world class? In the game PacMac here that part confuse me: for (int y = 0; y < mapHeight; y++) { for (int x = 0; x < ...
0
votes
1answer
34 views

How to update void show?

getMusicPlaying is set to false whenever someone touches the button, but libgdx runs show method only once, at the start of the game, hence the music will keep playing forever. I tried to use the ...
0
votes
2answers
27 views

What are world coordinates and pixel coordinates in LibGDX

I searched the Internet for these two terms, but there is no reference to them. I just started learning LibGDX, so please explain in the simplest way possible
0
votes
1answer
26 views

Why do we have to resize the screen in LibGDX

In a lot of the libgdx tutorials that I have took until now, I am told to resize the screen of the game using the SetToOrtho() of the orthographic camera. However, I don't get this part. Why do I have ...
0
votes
2answers
28 views

LibGDX Crash when destroying a body?

So I'm working on a LibGDX game, and when a bullet body collides with a block, I want to destroy the bullet. I'm calling: Globals.gameMan.world.destroyBody(bullet.body); and for whatever reason, the ...
0
votes
1answer
25 views

Libgdx: How to leave the dialog visible?

setBtn.addListener(new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { final Dialog dialog = new Dialog("Settings", skin, "dialog") { ...
0
votes
0answers
18 views

Replacing “String.Format” call Libgdx Java Android game

I am currently using this to create a certain length String from an Integer variable. This is the only way I know of at the moment, but Android Studio complains saying it won't work in all countries. ...
0
votes
0answers
18 views

ShadowMap doesn't render as expected with shader

Im currently trying to create a game where you visit planets in LibGDX for Java. To do this I use a TiledMap which is basically just an array of tiles to represent the planets themselves. To get the ...
0
votes
2answers
38 views

How to make a sprite jump up and return to original position android java libgdx [duplicate]

So I am just trying to make my game character, which is a texture (ball), to jump up in the air and then return back down to the position that it started at when the screen is pressed. I was just ...
0
votes
1answer
38 views

How do I load/use substances with libgdx?

I've been looking at some substances (.sbsar file format) but I have no clue how to load or use these files. The links I find brings me to Unity & Unreal Engine, but if I search up anything ...
0
votes
0answers
15 views

LibGDX: ExtendViewport Not Working

So I am creating a tile based game (let's just say its a replica of Civilization 2) as a final semester project for my Java class. I want the window of my game to extend as it is being resized by ...
0
votes
2answers
36 views

Libgdx: How to replace texture with shaperenderer?

I have a method that creates rectangles, it takes a texture for (Rectangle rect : rect) { game.batch.draw(rectImage, rect.x, rect.y); } The texture is simple, I could just draw ...
0
votes
0answers
11 views

any help using LibGDX Gesture Listener?

I've been trying to use GestureListener to turn touchscreen into the effect of my dpad. It all works pretty much, but the touch-held (or longpress) is not always working. It mostly does work but will ...
1
vote
0answers
13 views

Lib-GDX GWT build will not load without Flash on some browsers

I am trying to load my LibGDX application. Using Firefox without Flash on a freshly installed Ubuntu system, it does not load. I get this printed in the console: SoundManager: No Flash detected. ...
0
votes
0answers
9 views

screen layout is fine in windowed mode (any size) but not fullscreen (LibGDX)

I've been making a 2d platform game with Libgdx but still having major trouble with my viewports. Everything works fine now in desktop mode, but when i set desktopLauncher to fullscreen (or the same ...
0
votes
0answers
49 views

wall collision using vector math

How would one go about implying wall collision a 3D scene. Like this one, that I am using in my current game. It works to certain extent but it has obvious flaws. I have tried using Bullet, but it ...
0
votes
1answer
22 views

Intersecting dynamic bodies Box2D/Libgdx

Is that normal that while I'm jumping (by a player represented with a circle) on a dynamic bodies (boxes) they are interecting? It seems that there is some kind of diffraction. Is that any way to ...
0
votes
0answers
17 views

using tiledmaprenderer in second viewport - libgdx?

Re: Using multiple viewports? help needed I'm trying to make a platform game for Android, which will have a controller similar to a Gameboy Advance with the screen in the middle. I have it up and ...
2
votes
1answer
25 views

How accurate is Gdx.input.justTouch()?

We're developing a game, we want to perform actions the moment the user touches the screen, delays make the game impossible to play. We're testing on samsung S3 mini and samsung a5, we know they are ...
0
votes
0answers
14 views

LibGdx TiledMapPacker headless

My game makes use of the libGdx TiledMapPacker in the build process. Now, as the project grows, I want to run my entire build on my build server. Unfortunately the TiledMapPacker needs an OpenGL ...
1
vote
1answer
30 views

Using Multiple Viewports in LibGDX?? help needed badly

I've asked this question before but i am still unclear of how to do this after hours of frustration I have messed up yet another decent project I've been working on. I had a fully functioning Snake ...
0
votes
1answer
25 views

How to add event listener to Gifdecoder in Libgdx?

I asked this question and implemented the accepted answer. One last piece of the puzzle remains, how to add event listener to the button? I'm working with a teammate, I suggested to try Gdx.input....
1
vote
2answers
54 views

Is it possible to use animated .gif images in lbgdx?

Is it possible to use animated .gif images in lbgdx? If not how whats the alternative? We need to include animated buttons. When I use an animated gif, the animation won't play. This question (and ...
0
votes
2answers
58 views

Generate random point inside Perlin noise?

I’m working on terrain generation for a game of mine and has run into a slight problem. The terrain itself within the game procedurally generates as your character moves around. This means that all ...
0
votes
0answers
25 views

Changing a section of texture at runtime in LibGDX

I have a talking tom sort of game in LibGDX for android; I want to be able to replace the head of the character with an image the user provides at run time. Any leads on how to do this?
0
votes
1answer
28 views

LibGDX How can I draw a line at a specific angle

I'm working on a 2D platformer, shooter game and I'm attempting to draw a line to serve as a guide to indicate where the player is shooting. The line should be drawn from the player's sprite to the ...
0
votes
0answers
28 views

Bug in quadtree based 2d terrain generation in Java & LibGDX

Relevant Code Where the create quad function is called in the main application listener render game loop: if (player.getDX() != 0f || player.getDY() != 0f) { environment.createQuad(player....
0
votes
0answers
12 views

Box2D crash on collision

I've got a really strange problem, that I can't solve whatever I try. So it's the following: I have 2 body's in Box2D, one, the player is a dynamic body, the other one, an obstacle is a static one. ...
0
votes
1answer
24 views

Dynamic length increment of of an object-LibGdx

I want to implement something in my LibGdx game, where a small stick is positioned vertically.On tap,I have to increase the length of the stick with tap frequency.Later I want to rotate,perform ...
0
votes
1answer
35 views

LibGDX moving game window with mouse drag

TL;DR How can I move window with mouse without tide effect. Long Version So when I tried to move my game window via InputListener(just to test if it would work). I got some strange result. The ...
1
vote
1answer
25 views

How can I make my LibGDX game persist on android even if it's not the active activity

I want my android game using LibGDX to continue keeping track of events in the game, even while it's not the active window. For example, I have a stat that reduces over time even, if the game is not ...
0
votes
0answers
66 views

Player and weapon problem in LibGDX

I am following Brent Aureli's LibGDX lessons. I have a character, and I want a weapon that moves with that character, like the below images. How do I do this? public void defineMario() { ...
0
votes
1answer
33 views

How to use Libgdx Accelerometer?

I am developing a game with libgdx for android.I want use accelerometer for motion control.I am controlling a coin within screen bounds. I want to apply gravity according to device orientation as you ...
0
votes
0answers
38 views

get pixels in a rectangle

i'm trying to get the values of pixels inside a rectangle in LibGDx but i'm having trouble converting the coordinates from the word to the x, y in the Frame-buffer i used the code bellow : ...
0
votes
1answer
29 views

Checking for alignment on an axis

Suppose I have an array of 5 objects, each time the touches the screen I generate a new array and save the previous objects in another array. Is there a way to check if the object align perfectly on ...
0
votes
1answer
41 views

Questions about Libgdx

This question might be naive, I'm just making sure I grasp the API. Suppose you have an array of 3 objects Is array.get(o) the same as array.first(); and array.get(2) the same as array.peek()? ...
0
votes
1answer
40 views

Error suddenly when compiling Desktop on Android Studio - all projects - nothing changed - LibGDX

I have just gone into Android Studio to open a project. It will run in Android but not my Desktop configuration. Nothing of the code has been changed and I have now tried 3 projects, also a brand new ...
0
votes
1answer
30 views

How to Refresh Dependencies after Adding FreeType Extension in Android Project

I'm planning to use FreeType fonts in my game (LibGDX and Android Studio) and I already added the freetype dependencies in my project. How can I refresh the dependencies after adding them? I have ...
1
vote
1answer
29 views

Is using isTouched or justTouched multiple times bad?

Suppose you have justTouched or isTouched method multiple times in your game screen, is that bad? Is it better to create booleans and as few input listeners as possible? or it doesn't matter?
0
votes
0answers
33 views

AsyncExecutor doesn’t seem asynchronous

Introduction I initially asked this question on Stackoverflow—being my natural habitat—but no one there appeared to know the answer, so I thought I might as well familiarize myself with the Gamedev ...
0
votes
0answers
14 views

LibGDX Sprites won't render on Linux

I've got a problem with my LibGDX game. So, on Linux(Mint) and Android, sprites won't render. They'll show black rectangles where the texture would be. Other textures, like the tileMapRenderer and ...