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
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 ...
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
28 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 ...
0
votes
3answers
112 views

How To generate spiky terrain in 2D?

I am learning game design, and wanted to know how one can automatically generate spiky terrain (something like this: Cavernaut, notice, the terrain at the sides?). I have heard about midpoint ...
0
votes
0answers
45 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
0answers
63 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
41 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
46 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 ...
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
1answer
470 views

libgdx - Box2d debug draw not correct

I have a problem where the bodies in my debug draw does not draw correctly, take a look: As you can see, there is some space between the dynamic body and the ground. I have checked the contact ...
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 ...
2
votes
1answer
1k views

Libgdx, how do i get the translation and rotation of a node from a model instance?

I have a model instance of a character, and a model instance of a sword weapon. THe character has a node on his right hand so he can "carry" the sword. Right now I use this code so the sword's ...
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 ...
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
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
2k views

How can I change the appearance of the mouse cursor in libGDX?

How can I change the mouse a cursor to a picture using libGDX?
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 ...
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 ...
1
vote
1answer
94 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 ...
5
votes
5answers
604 views

How can I support retina graphics in libgdx?

I'm not sure if I'm missing it somewhere or if this just doesn't exist, but I'd like to support "retina" graphics on desktop displays that support them (like the newer MacBook Pro), but I can't find a ...
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 ...
2
votes
1answer
903 views

LibGDX - Box2D: Realistic Light and Layers

I'm having some problems with my current game. Short description: It's a 2D game where you have to avoid the lights or you lose HP. My problem is the following one: Here is the rendering process: ...
0
votes
0answers
69 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
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
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 ...
3
votes
2answers
178 views

How do I use Libgdx viewport for UI?

I am using LibGDX to make a game for Android and I am using 2 Viewports. One for UI and one for the actual game content. My problem is I can't find a good way to scale my UI using a Viewport. This ...
0
votes
0answers
56 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 ...
1
vote
1answer
59 views

Hand cards auto arrangement

I'm making a card game with libgdx scene2d and what I'm trying to achieve is auto arrange the cards in a way the all fit the screen. This is what it looks now when the hand is full: I have done ...
2
votes
1answer
118 views

How can I set a Steam achievement in Steam via LibGDX or native Java?

Is it possible to set or 'unlock' a Steam achievement via LibGDX or with a native Java solution? If so, how it this possible. Furthermore, what would be a good implementation for 'saving' achieved ...
0
votes
0answers
19 views

LibGDX: Is there any way to check if space between 2 bodies is free?

I know how to calculate the distance between 2 bodies in my game using Math.hypot(x,y); but I need to know if between those bodies the space is free, I mean, without any body.
1
vote
0answers
62 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 ...
0
votes
0answers
32 views

Have libgdx particles leave permanent sprites?

I am trying to figure out how to have enemies hit leave permanent blood splashes in my game, but I am not sure what direction to go. I am currently using box2d, just for defining my ligh-system with ...
0
votes
1answer
37 views

Libgdx unable to enter input in TextFields

Hello I am trying to make login screen for my game, I use TextField's. 1. I am not satisfied with how they look I want it to look like this but simpler - basically to have a white field next to the ...
0
votes
1answer
68 views

Libgdx crash on dispose()?

Whenever I try to manually call the dispose method in one of my screen my game just crashes. My dispose looks something like this @Override public void dispose() { battletheme.dispose(); ...
0
votes
0answers
103 views

Water Rendering with LibGDX and LiquidFun

I'm very new to game development and I need some help with a renderer. Can somebody show some code for a Water renderer (and shaders if needed) using libgdx and liquidfun? I can render my particles ...
0
votes
1answer
46 views

Desktop launcher Error in Java & LibGDX

What's my problem: It says there is a null pointer exception in my desktop launcher class even though I haven't really touched it other than add a title and change the width & height. The weird ...
1
vote
1answer
6k views

Animations not working on custom actor in LibGDX

I have this code for rendering a sprite, retrieved from a TextureAtlas public class SpriteActor extends Actor { private Sprite sprite; public SpriteActor(TextureAtlas atlas, String spriteName) { ...
2
votes
2answers
3k views

rotating menu with Actors in libgdx

I am intending to build a circular menu, with menu items equally distributed around the circle. When clicking on a menu item the circle should rotate so that the selected item is facing the top. I am ...
1
vote
1answer
261 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), ...
3
votes
2answers
1k views

Why does adding LIBGDX “fadeIn” action to a table in a group make the whole stage fade in?

I'm trying to "fadeIn" a store "screen" which is really just an invisible group. I set the group to visible=true, set the alpha to 0 and then do a "fadeIn" on the group. The problem is that the whole ...
3
votes
2answers
157 views

How to stop deltaTime while debugging

Framework: LibGDX IDE: Android Studio Game based on Kilobolt tutorial While debugging, the frame delta time i get using Gdx.graphics.getDeltaTime()continues to increment so when i stop debugging ...
1
vote
1answer
478 views

Multiplying by delta not giving smooth movement

I started working on my first proper game but reached a problem straight away. In short I have a game that runs most of the time at 60 fps. ( I am using Libgdx a popular Java framework) but my game ...
0
votes
1answer
111 views

Libgdx Delta time stutter?

Alright, so I want my guy to move, I simply use this code. velocity.y = speed; Same goes for velocity.x Thing is, the lower the framerate the slower he moves. But, if I add delta time, the player ...
0
votes
0answers
24 views

How to set cursor position to middle of screen while still being able to change the Delta-X

I have this code: @Override public boolean mouseMoved(int screenX, int screenY) { float deltaX = Gdx.input.getDeltaX(); camera.rotate(Vector3.Y, deltaX * -0.3f); ...
0
votes
0answers
34 views

LibGDX & Box2D Actor Collision

I'm working on a LibGDX project, and I was wondering about the best way to define actors in a collision. I know this is probably a common question, but specifically I'm interested in beefing up one ...