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
163 views

Ledge climb animation and movement (2d platformer)

Struggling to make a decision on the implementation of a ledge climb mechanic for a physics driven 2d platformer. What is the best way to go about this without it getting overly complex? So far I ...
3
votes
0answers
81 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
246 views

HTML/JS publish LibGDX

I want to publish an app created with libGDX (HTML/JS publishing). Here are the steps I am doing. Right Click on the Project -> Google -> Gwt Compile -> Compile. After the compilation there is no ...
3
votes
0answers
331 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
42 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
36 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 ...
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
60 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 ...
2
votes
0answers
56 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 ...
2
votes
0answers
56 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
97 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
49 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
386 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
182 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
111 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
169 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
191 views

error in post a screen shot of game scores with Android Intent in LIbgdx game

I want to post a screen shot of my game on social apps. I have developed this game using Libgdx framework. I have created an interface in Core class. Here is its Intent share specific code. ...
2
votes
0answers
802 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
162 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
236 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 ...
1
vote
0answers
17 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
45 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 ...
1
vote
0answers
33 views

Best way to create defence(withdraw) algorthim libgdx?

I have created user body and enemy body. Enemy body uses the steering behavior created by gdx AI. User body have it own control inputprocessor. World doesnt have gravity. Enemy body arrives the user ...
1
vote
0answers
30 views

Java Libgdx Attaching Sprite to Box2D Body

So I am working on programming a java 2D platformer for fun on the side and I have a rendered TMX level and a box2d body (just a circle shape) that I am currently using as my player. All the controls ...
1
vote
0answers
38 views

libGDX text doesn't appear in TextField

A game I'm working on has libgdx's TextField. They work fine in every instance I've used them, however on a play tester's phone he says no typed text appears in the box until enter or space is ...
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 ...
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 ...
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 ...
1
vote
0answers
28 views

LibGDX Texture blending

I have two textures 1 and 2, and a "mask" image 3. I'd like to interpolate between the two textures by using the mask image, and get something like 4. I'm not really sure where to start, as I never ...
1
vote
0answers
24 views

Movement for Box2D Bodies

I'm having trouble wrapping my head around something that should be relatively simple. I'm making a breakout clone using LibGDX and Box2D. I'm also using the Ashley ECS. For movement with bodies, I ...
1
vote
0answers
59 views

Moving box2D body with texture?

I was following the solution from this http://stackoverflow.com/questions/20180063/box2d-body-with-texture. I ended up getting this working for static bodies. But when trying to get the PolygonSprite ...
1
vote
0answers
23 views

LibGDX: ActorGestureListener after change position

I have this code to get pan touch inside an Image and it works fine, but when I uncomment this line img.setPosition(100, 100); it doesn't work anymore, why? Texture tex = new ...
1
vote
0answers
51 views

Smoothly fitting texture tiles using alpha gradient on edges

I'm trying to draw a background texture with tiles that I'll rotate and mirror to create a maze. Here is a sample tile: As you can see, I use an alpha gradient on the borders. If I'd use a sharp ...
1
vote
0answers
36 views

Multiple bodies or multiple fixtures for a wall in Box2D?

I am making a game with a sort of "playfield" where the game takes place, acting as boundaries on a top-down shooter. I am using Box2D for physics, and I am questioning which of the following would be ...
1
vote
0answers
72 views

Point Light shows black box & rect (PointLight not working) - libgdx 3D

I am creating a 3d scene currently a box and rect, and trying to enable lighting. When i create a PointLight and add it to Environment everything turns to black color? all i want to do is ...
1
vote
0answers
22 views

Does Overlap2d have frustum culling

I'am wondering if Overlap2d has a own frustum culling or do I have to implement my own?
1
vote
0answers
95 views

Overlap2d + LibGdx load large map

I've been wondering if it's possible to load a large map made with Overlap2d before I get started with my project. A large map for me is something equivalent to a map from recent open-world RPGs like ...
1
vote
0answers
49 views

Libgdx box2d - what is the best approach to spawn an actor on a stage dynamically?

I'm currently building a 2d sprite infinite runner game, but everytime I spawn new enemy(actor) and platform, I noticed that there's a delay on it. Any idea of what would cause this behavior? I'm ...
1
vote
0answers
21 views

LibGDX: Box2d hovering, rotating body

Hello I am working on a hovering triangle (equilateral triangle). The triangle should allways rotate at a constant speed and hover over the ground. The problem is if I setAngularVelocity it does rise ...
1
vote
0answers
65 views

Unable to load Blender animation into libgdx

I am trying to load an blender animation into libGDX for an android app. So I created an animation using Blenders action editor, I exported this into .fbx format. I then ran the fbx-conv tool to ...
1
vote
0answers
147 views

UE4 or Unity or Libgdx for VR project using Oculus rift and Novint falcon

I've to make a multiplayer game Air Hcokey using 2 Oculus rift and 2 novint falcon controllers , I know that these 3 engines support the Oculus Rift but have no Idea if they do support the Novint ...
1
vote
0answers
61 views

How to disable static friction in Box2D?

I'm making a 2D platformer. One of the issues is that when the character hits the ground, there's an initial pause and then the character finally slows down to a halt. I believe the initial pause is ...
1
vote
0answers
59 views

Getting screen coordinates of actor

I'm trying to tell if an actor exists at a screen position so I can do something if the actor is clicked on. To do this, I first need to get the screen coordinates of the actor so I can compare it to ...
1
vote
0answers
58 views

Physics Body editor loader collision detect

In my game I use the Physics Body Editor to add custom shapes to my bodies. In my show() method I use the follownig code to create my Jetski Body: BodyDef jetskiDef = new BodyDef(); ...
1
vote
0answers
86 views

Libgdx - Transparent color over texture

I am attempting to tint a texture a color but I want the texture to show under the tint. For example, I have a picture of a person but I want to tint them a light green and not change the transparency ...
1
vote
0answers
74 views

error after changing the app name

I have made a game in Libgdx(eclipse).I changed the name of the app inside the string.xml file.Now I have an error in AndroidManifest.xml. in this line: android:label="@string/app_name"‬ (line 12). ...
1
vote
0answers
93 views

resize images in libgdx

I know how to set Image width and height using pixel coords. Is there a way to set relative coords? I want to deal with multiple screens. For example i have 1920x1080 screen size. And i have relative ...
1
vote
0answers
100 views

Rotating, moving and scaling a mask in a shader

I want to rotate, move or scale a mask in a shader. But I have no clue to how perform these actions. My code: @Override public void create() { batch = new SpriteBatch(); background = new ...