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

0
votes
2answers
32 views

Sprite not drawn on the same position as its Body LibGDX after implementing Pixels Per Meter Division on Box2D

I had a problem where the sprite was not positioned on Body correctly which I solved and you can see it here: Box2D is not positioned on the sprite correctly LibGDX After I solved that, I needed to ...
2
votes
3answers
123 views

Accelerated movement in a specific time to a specific point

I am trying to move my sprite in a specific time to a specific position while using frame-independent or time-dependent movement. My sprite is also accelerated every frame to simulate gravity. I know ...
1
vote
1answer
56 views

How to handle two players playing on one keyboard with Box2D (LibGDX)?

I'm making a racing game with LibGDX and Box2D. I've been using this tutorial to implement the basic physics, and it works properly. My main problem is to implement two different sets of keys ...
0
votes
2answers
45 views

Box2D is not positioned on the sprite correctly LibGDX

I have a strange issue where my Box2D is not being positioned on the player correctly. Down is the picture: What I find more strange is that the Box2D is positioned correctly on the cloud that is ...
0
votes
2answers
83 views

Why is my character passing through in Box2D?

I have a collision problem in Box2D. I am trying to do a simple platform game with Libgdx, Box2D and TiledMap. I have a map made with TiledMap: I load the map in my Android game. I read all the ...
0
votes
1answer
36 views

LibGDX--constant high score in top corner

I'm currently programming a game using LibGDX and box2D. I have a sprite (player) that moves up the screen, kind of like doodle jump. I'd like to have my camera to be centered around the player at ...
1
vote
1answer
39 views

Box2D fixed timestep updating is twitchy on constant FPS

I'm messing around with libgdx and box2d and I'm trying to implement sidescroller movement with fixed timestep logic according to the famous Fix Your Timestep! tutorial/guide. However, logic updating ...
2
votes
2answers
113 views

Box2DLights in libGDX - Bad quality of the light gradient on Android

I am facing a problem while porting one of my libGDX project from desktop to Android : My game uses Box2DLights. While the light effect look very fancy on the desktop version of the game, it looks ...
2
votes
1answer
72 views

LibGDX How do I create a Shop?

My game is fully working but now I want to make a shop so that the player can buy boosts or other useful stuff for the money the player has collected. What is the best way of doing this kind of ...
0
votes
1answer
24 views

LibGDX - Bundling Files

I have 3 files. A JSON file, a PNG file, and a TXT file. Is there any possible way I can put all three inside a common file with a custom extension? (for example "fileName.abc") I searched the web a ...
1
vote
0answers
98 views

Libgdx and gdx-ai: How to implement wander behavior?

So I follow the original gdx-ai documentation and created 2 circles to test Steering behavior. The image shows arrival behaviour but I am still quite lost about how they work. Screen class: public ...
-2
votes
1answer
25 views

What is the purpose of the second parameter to Array.removeValue in libgdx?

I have been wondering what the second parameter of the method in Array removeValue does. removeValue(T value, boolean identity) What does indentify mean and should I pass true or false?
0
votes
0answers
14 views

DragAndDrop release with pointer on payload

When I am moving my payload all the way to the corner it remains on the stage and my mouse goes over it when I then release (on a valid target) it returns null as a target and thus does not drop ...
1
vote
0answers
18 views

Behvior of Ninepatch when smaller then unstrechable area?

I create a healthbar from a Ninepatch background and "fill" texture. However, it starts overlapping it's patches when it gets very small. Is there anything I can do about this? Is there a way to ...
0
votes
0answers
41 views

How can I make an Actor repeat the action on collision in LibGdx?

I want my EnemyActor to do this SequenceAction when it collides with my bullets. I have already done the collision. Now the problem is that it only does the SequenceAction once when it gets collided ...
0
votes
0answers
32 views

Move player with platform libgdx

I'm learning libgdx and I'm having a problems with moving platforms. I have a bridge class with float values for move_amplitude(distance the bridge moves) and move_time(duration it takes). The bridges ...
1
vote
1answer
39 views

How to get the position in an actor inside a table with LIBGDX?

Well the title says it all, I want to get the position of an actor inside a table Button button = new Button(bs); table.add(button).width(50).height(50); table.top().center(); By using ...
0
votes
1answer
45 views

Game Server Mechanic [closed]

Hey guys :) Im currently developing a little rpg duengon crawler. I really want to implement a local and an online multiplayer function, i know how servers are working and how to make them using ...
0
votes
1answer
79 views

TiledMap problem in android device (LIBGDX)

I'm a noob on programming java apps, and I'm trying to make a very simple platformer game. All is running very well on desktop project, but, when I put the game on my Xperia a "strage" thing ...
0
votes
1answer
30 views

Libgdx + Box2d working with 2 cameras

Recently I have read that you can work with 2 cameras whenever you involve Box2d, which only works in meters. In my Renderer class, I receive all the entities in the game and then draw them. I work ...
0
votes
1answer
27 views

LibGDX - Getting Tile Map Layers Problem

While following a tutorial with LibGDX, I am working with tile maps. This is the method that I'm using: tilemap.getLayers().get("Collision Layer"); or tilemap.getLayers().get(1); //1 is the ...
1
vote
1answer
61 views

Libgdx, TiledMap, and tearing

My TiledMap tears when the window is specific sizes, resized, or the camera moves. The tileset is padded by 2px and have tried as high as 10px. Each tile is 70x70. Here are the pack.json ...
0
votes
1answer
69 views

How could I draw text in an 'info bubble' with libgdx?

I am making an android game using libgdx where there are textures on the screen which represent people. When you touch a person sprite I want a little info bubble to pop above their head displaying ...
0
votes
1answer
69 views

How can I make an actor fire a bullet on touch?

I created a Jet and a Bullet, and when Jet is touched, the Bullet is fired. Now I want to know how can I make the Jet fire again when touched after it has fired the first shot? public class ...
0
votes
0answers
43 views

LibGDX - Player Movement Flickers

So, I was programming a very simple LibGDX game, so I decided to include a player class into the program. Once I did that, the players image started to flicker/stutter while I moved it. Here's the ...
0
votes
1answer
44 views

libgdx sphere rotation after movement

I'm moving my sphere on the screen using this method: Matrix4 m = myBall.body.getCenterOfMassTransform(); Vector3 translation = new Vector3(); m.getTranslation(translation); float multiplier = delta ...
0
votes
0answers
60 views

Implementing BaseGameUtils with LibGDX for Google Game Services

I'm developing a game for Android in Java using Android Studio and LibGDX. I'm trying to implement the Google Game Services inside my game but I'm having trouble using the BaseGameUtils. Every time I ...
0
votes
0answers
41 views

gdx-video - Error: Failed to resolve: com.badlogicgames.gdxvideo:gdx-video:0.0.1

I would like to use gdx-video extension in my libGDX project, to embed a YouTube video. I have found this extension on GitHub, but there are several error messages during Gradle Sync process. I have ...
-2
votes
1answer
40 views

How to get system date? [closed]

How do I get system date like: month, day in libGDX? I want to add to my game events that happen on specific date but I don't know how to receive it.
0
votes
1answer
50 views

GLSL Shader not compiling (Android & LibGDX) and no log available

I'm trying to get a "ripple"-shader working for OpenGL ES 2.0+ (using LibGDX). However, I can't get it to compile, and for some reason ShaderProgram.getLog() returns an empty string even though the ...
0
votes
0answers
26 views

Move/Rotate 3d multiple objects w.r.t. to one another in libgdx

I have two blender objects in .g3dj format. Below is the code : private void createBaseArm1(){ // Now load the model by name from asset folder baseArm1 = ...
0
votes
0answers
40 views

Lip Sync Sprite Animation in LibGDX

Is there any free sprite package to achieve lip syncing animation ? This is what I have in mind. User will input text The character will talk with the appropriate lip sync. I know there are ...
0
votes
0answers
32 views

How to run Kryonet server inside Libgdx project and is it ok?

I am trying to add multiplayer to my game and I used Kryonet. I have written the server, requests and etc and the only thing that is in front of me is how to run the server, it is in the libgx project ...
0
votes
0answers
36 views

get object location in 3d view libgdx

Below is the code of rendering the .g3dl model. I am trying to find the x, y, z co-ordinates of model's top view in 3d (Android) from origin (0, 0, 0) using calculateBoundingBox. I am stuck with no ...
0
votes
0answers
37 views

Box2D top down car weird spasm

im currently programming a 2d top down racing game with box2d and libgdx. i have a car body to which there are 4 wheels attached. these 4 wheels are attached with RevoluteJoints ( for the front ...
0
votes
0answers
35 views

Stretch Textures to screen width and height with StretchViewport

I have an orthographic camera that have viewportWidth = 540 and viewporHeight = 960. My backgrund texture is 1080x1920 pixels. How can i resize the texture to fit the camera using a StrechViewport. ...
1
vote
1answer
45 views

Player moving back and forth when moving with camera LIBGDX

I have a problem. When in libGDX my player moves across the screen and the camera is moving after him the player jumps back and forth a bit. Player still moves forward but it looks goofy I'm moving ...
3
votes
1answer
62 views

Problem merging vertices of two polygonial bodies

SUMMARY I need help to create a weld joint that fixes the two bodies together in a way as illustrated in the first image. ISSUE I am having an issue where I cannot find out how to weld vertices of ...
0
votes
1answer
35 views

GlViewport-code doesn't work in one specific screen?

I am currently working on a small game using LibGDX and Java. However, I have found one oddly specific problem. I want the game to resize so that it never has to be cropped and so it never has to cut ...
1
vote
3answers
194 views

Box2d set sprite to body that rotates around specific point

I want to rotate kinematic body around a specific point (I already done this part using shape.setAsBox(1.8f / PPM, 0.2f / PPM, new Vector2(5.2f, 0), 0); What I try is this: PolygonShape shape ...
0
votes
0answers
33 views

Doing collisions on both axis with java overlap

I'm making a top down game from scratch and just found out about the java rectangle overlap method that would work great for collisions. However, after the overlap happens, I need to check for which ...
0
votes
1answer
45 views

LibGdx: search through text file without lots of String garbage

I'm reading a text file from Gdx.files.internal in LibGdx. This is essentially streaming a file from a compressed Jar file so random access is not possible. I want to search through the text file ...
1
vote
1answer
93 views

Textures created with Photoshop show up with a white border

All of a sudden, I started having this problem. I've used libGDX + Photoshop before and never had this problem. One of my textures is showing up with a white border/glow around. The texture is the ...
0
votes
0answers
30 views

libGDX - “Hosting” a Viewport inside of a Scene2d Window

I am making a game using libGDX. I am trying to build some tools to use while developing my game, things like a scene editor or a scripting console. The tools are Scene2d widgets which I have in a ...
0
votes
1answer
39 views

Vertically mirroring the screen in LibGDX

I'm developing a game in which the screen layout is different for right and lefty players, so i'll put a button in it to mirror the screen vertically. For displaying textures and fonts, i use a ...
0
votes
0answers
66 views

Box2d - Texture lagging and flickering

I'm having issues with texture rendering in my game. I've done a lot of research and repeated the same steps of tutorials over the internet to render and update Sprite positions properly. Somehow, ...
0
votes
1answer
46 views

LibGdx Tiled Map Rendering Problem

Im trying to study a book to learn LibGDX game engine but i have a problem with rendering tiled maps. i think i wrote the same code with book but i couldnt get the same result. its a simple game with ...
0
votes
3answers
60 views

LibGDX efficient colored rectangle rendering

I'm creating a game in which I renderer around 1000 to 2000 solid colored squares per frame, 90% of which are the same size: ~4 px depending on the dpi. I am looking for the most efficient way to ...
0
votes
0answers
54 views

Libgdx and Box2D TiledMap render is not smooth

I'm building simple side scroller game. My player (square) move fast and it interacts with other world objects. Problem is when my player is moving it seems that all world is rendering somehow strange ...
0
votes
2answers
42 views

Libgdx box2d bodies go through other bodies

I'm developing a game using libGDX and box2d. I am facing a problem that bodies go through each other... I'm moving the body using a TouchPad by setTransform. I think the problem is that I use ...