Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
12 views

multiple mouse events for splitted screen on Libgdx

well i am working in a fps game , and i also splitted the screen in two parts for two players , i am using the mouseMoved event for the camera,, but in this situation literally i need two cameras each ...
0
votes
0answers
7 views

Libgdx Table not Positioning Correctly

I wants to store a scrollpane with table in another table. However, the positioning of the images are not as expected. I have look through this, but has no clue on solving my problem. My codes goes ...
0
votes
0answers
10 views

Libgdx : setDebug(true) method creates issue with image position

When I used the image.setDebug(true) on the image then it shows the correct position. But when I disable debug mode then it doesn't shows the correct position.I want to apply padLeft to this image. ...
0
votes
0answers
12 views

libgdx button doesn't work everytime

I made a button, which stops my game. The is a menu, where you can continue the game. But if the cam moves with the player, the button doesn't work anymore. You can see it, but if you click on it ...
0
votes
1answer
25 views

How to deal with standing/walking models?

I'm developing a game using bullet for the physics logic, but rendering using my own isometric algorithm (sprites). I'm currently dealing with the issue of how the physics object of the player would ...
0
votes
1answer
32 views

LibGDX - Animate Player using Finite State Machine in Ashley ECS

Hi everyone this is my first question on this forum hope you can clarify my doubt. I'm gonna start by saying that im not very good at english so my apologies. So I have a big school project and I'm ...
1
vote
2answers
32 views

How to access coordinates of objects in bullet physics (libGDX)?

I need to access the x, y and z coordinates of a bullet physics object. I'm assuming this is done via the transform matrix, but I have no idea which values mean what. There doesn't seem to be any ...
1
vote
1answer
23 views

Google Play Services Message Handling with Libgdx

I'm looking for some idea of how to handle Reliable Messages in Google Play Services with libGDX. So far I've been using it like this: I was waiting for message with ...
1
vote
1answer
99 views

2d water animation is jagged and not smooth

As a solution for this question I implemented the shader with a test program: ...
0
votes
2answers
82 views
1
vote
0answers
19 views

How can I make a transparent hole with shaperenderer using stencil masking in libgdx?

I'm making a 2d game, where I need a resizeable, moveable rectangle outline. I'm trying to use stencil masking to do it by cutting a hole in a solid rectangle, and I thought this would help: How can ...
0
votes
1answer
25 views

How to setup engine properly in ktx-ashley?

I'm trying to setup simplest Ashley project with only 2 entities and get this error: ...
0
votes
1answer
48 views

Billboard quad in same draw call?

I am currently drawing a isometric world in 3D, meaning the floors and walls are all quads aligned to the original axis in the world and using a rotated orthogonal camera to "distort" the images into ...
0
votes
1answer
49 views

How do I set the gravity of a plane world

As you can see in the image, the character is set to move on a ground plane, however that causes an issue with Box2d's gravitational pull. The player can go sideways, upwards and downwards on the ...
0
votes
1answer
23 views

Cannot find folder when building game to .jar LibGDX

Whenever I run my game from my IntelIJ IDEA the game runs fine. It finds every folder and every asset in there. But whenever I build my game with :desktop:dist and ...
0
votes
0answers
30 views

how to combine, intersect or subtract shapes? [duplicate]

is there a way to intersect, combine or subtract multiple shapes together similar to java.awt.geom.Area in LIBGDX or any libraries similar to this that will work on any device?
22
votes
4answers
3k views

How to animate abstract 2d top down water texture?

I currently implement a game with a top down view of the ocean. I use the following, a little abstract texture: The actual texture is transparent, I added the green-like color for clarity. The ...
0
votes
2answers
53 views

How to make shake effect on camera in LibGDX?

I want to shake my OrhographicCamera on some event (i.e. click on the keyboard). How can I do that?
0
votes
0answers
29 views

libgdx - can't drag/click on Dialog

I'm having problem with Dialog. I have Dialog (let's say MainDialog) with button. After the button is clicked, another Dialog pops up. Everything is fine, but I can't drag nor click the buttons from ...
0
votes
1answer
41 views

How can I implement a scrolling text ticker?

How can I implement a right-to-left scrolling text ticker in libGDX (like stock tickers)?
1
vote
0answers
16 views

Inner shadow of a polygon in libgdx

Is it possible to draw inner shadow for some polygon to make it look like this?
0
votes
0answers
29 views

Is there any better way to interact with HUD?

Lets imagine 3 classes: HUD, Player and PlayScreen. I want to control ...
0
votes
1answer
17 views

libgdx - getButtonTable() missing Window method

I'm following some tutorial to create my own Inventory for my game. I have met with an insidious problem: ...
0
votes
1answer
30 views

libgdx - creating static HUD/widgets on screen

I'm having problems with creating static HUD/buttons on the game screen. Currently my game has a character moving on the tiled map, with OrthographicCamera put on, everything works fine. I wanted to ...
0
votes
1answer
50 views

What is the easiest way to make an online high scores table?

I made an 2d Android game with using Libgdx library. This game like Flappy Bird. And every user have a highscore. I want to store this highscores respectively to an online database and return the rank ...
0
votes
1answer
44 views

libgdx - how to make enemies not overlap

I'm currently making a roguelike shooter in libgdx to get a better understanding of the library but I recently just stumped onto a problem where enemies would overlap each other while tracking the ...
0
votes
0answers
19 views

Efficiently drawing a batch of meshes?

I was playing around with some isometric ideas, I want to create fairly large maps with a couple of Z levels, much like the older X-com games. I figured I am probably way better off to draw the quads ...
0
votes
1answer
7 views

InputListener not working on a custom Actor

Right now I am working on a UI for my game. I'm adding my own UI elements to a group and adding that to a stage. But the listeners I'm adding to the actors are not firing off at all. I have looked on ...
0
votes
1answer
18 views

libGDX game crashes on Android without any mention of crash in logs

No mention of any issue in process logs, an application just turns off during loading assets (~3% of all assets loaded). It works fine on desktop. Only thing that seems related in global logs is this:...
0
votes
1answer
26 views

libgdx - Problem occurring after collision detected

I have just implemented collision detection in my little 2d rpg-like game. I'm using Tiled for the maps, mechanism is simple - I have one layer called 'collision' in my tiled map, and while loading ...
0
votes
1answer
96 views

Isometric Architecture Map Game Data

I'm not sure this kind of question has been answered yet, if so i'm sorry to duplicate it. My question is rather simple : I'm creating a simple Isometric game with libgdx, i'm using Tiled but only ...
0
votes
0answers
18 views

box2d get velocity with which the body collide

I need to know with which velocity an object collide to test if the body is destroyed. For example, if a vase collide and getLinearVelocity() > 10 the vase will ...
2
votes
2answers
121 views

Top-down conveyor belt with Box2D

I'm trying to code a conveyor belt for a project made with LibGDX and Box2D and I would like to make it like this one from Bomberman Land Touch. As you can see, the entities standing on it should be ...
0
votes
0answers
24 views

What is wrong with intersectLinePolygon method?

I need to detect intersection of a line and polygon, and now I use Intersector.intersectSegmentPolygon method (and it works well), but before that I tried to use <...
1
vote
2answers
41 views

Do I need to dispose Pixmap in Actor?

I create Pixmap in Actor and don't know how to dispose it. Is it necessary in my case? ...
0
votes
1answer
100 views

Queued rendering in LibGDX 2D

In my 2D game project, as well as in LibGDX in general, are a lot of different entities that need to be rendered(static images, sprites, animations, etc...), as well as have certain effects applied (...
0
votes
1answer
25 views

Player customization of entity and handling textures

I'm developing a racing game where you can customize your vehicle with pre-made textures and also user generated ones (players can add assets to the game). I want to know what you think is the best ...
1
vote
2answers
52 views

How can I draw Polyline and detect its collision with other objects?

The idea is to draw trace of moving Actor and if some other Actor intersect it, some function would be called. I've been searching for solution to this problem in Intersector class, but it seems to ...
0
votes
1answer
70 views

How can i collide two bodies without filtering(collision filtering)?

I have two bodies with fixtures. One is platform or ground and other is the player itself.I want to collide the player to the platform without bit filtering.How can i do that?I can see the rectangular ...
0
votes
1answer
54 views

Drag and drop more than one sprite (image) on Libgdx

well i am trying to achieve the same effect of windows desktop , you can select multiple icons and drag all of them to differents positions. here you can see how i select the images in the second ...
0
votes
0answers
42 views

improving a real-time tile based 2d lighting system

I'm making a 2D game with lots of little particles that can fly all around the screen. The viewport has a resolution of 900x900px. Within that region, at most 450x450 particles can be displayed per ...
0
votes
1answer
120 views

LibGDX Stage and Viewport management for Actors?

So I've done research about how to use Stage, Actor and Viewports etc. To optimize the game for most devices running Android. I'm pretty sure that the viewport is configured or the background image is ...
0
votes
1answer
50 views

Using 3D models in an 2D Game in libGDX

In my libGDX 2D RPG-Game (like Zelda or something) I want to display some items as 3D-Objects. Since I'm using an OrthographicCamera like this: ...
0
votes
0answers
34 views

Easy sprite-based 2D game in LWJGL3?

Earlier we have used libGDX, and in it, creating a sprite object was really simple, like: ...
0
votes
1answer
36 views

Does destroying body also destroys the sprite?

Suppose a sprite is attached to a box2d body. And world.destroyBody(b); is getting called then the sprite also get destroyed or it stays there in memory. In my ...
0
votes
0answers
20 views

How to force LibGDX to screen resolution on Android?

No matter what type of viewport I use, the Android version of my code renders to exact resolution on the bottom left of the screen. How do I make it occupy the whole screen realestate? I've tried ...
1
vote
1answer
37 views

How to set a box2d body to follow a strict path

I'm making an infinite runner type game and I want one of my enemies (when it's created) to swoop down in a sort of U motion where it'll hit the player if they don't react quick enough once the enemy (...
1
vote
0answers
28 views

Loading animation from server?

As android app that will be playing animation online, it will be connected via web-socket to a server. The question is, what is the recommend way to store animation that will be loaded by the android ...
1
vote
0answers
31 views

How can I render two scenes simultaneously on LibGDX?

In my LibGDX game, I'm trying to render two 'views' (one next to the other) at the same time. The idea is to have each view rendered according to global coordinates, but everything inside would be ...
0
votes
1answer
89 views

How to remove horizontal black bar at the bottom of the game screen in libgdx?

Here is the screenshot .Here is my Play constructor in Play class.