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

Questions tagged [libgdx]

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

How to use individual Fonts for Witched Instances in LIBGDX

I have an Actor that acts as an GUI Element on the screen. In this Actor I will draw with a font on the screen. I would like to draw several instances of this Actor on screen, but with individual ...
0
votes
0answers
11 views

How to have zoom and translate in .tmx map in android

I load a .tmx file in libgdx project but I can not zoom in and zoom out and control map like a google maps in android device. how to implement this features in .tmx file with Screen touch. this is my ...
1
vote
1answer
26 views

Draw line between tiles of tiled map in libgdx

I want to draw line between two tile of my .tmx map in libgdx . I want to get a tile position but not in pixels , in maps grid numbers like : (0 , 6 ). or is there any way to change a tile color in ...
0
votes
0answers
16 views

Libgdx, can I load to the AssetManager from memory

I'm using the AssetManager to handle assets, but there is one time where I want to create a texture from a pixmap during the program. It would be nice if I could add that created Texture to the ...
0
votes
0answers
13 views

LIBGDX fadeout, hide and remove action not triggered

I try to execute an sequence of actions, but fadeout and following are not working for me. I can see the actor moving to the desired point, but after that it just stays there. My code. personActor is ...
0
votes
1answer
20 views

LibGDX Box2dlights - Body Shadow Problem

While playing around with the box2dlights with libGDX, I have managed to get it all up and running, but have a problem with the shadow rendering. This is what I currently have atm: With the lighting ...
0
votes
2answers
90 views

How do I implement efficient collision avoidance in 100 enemies

I am developing a libgdx game. It is a top down shooter and I am trying to make a good AI. I have tried to implement A* from the AI library from libgdx and it works fine but when i have a lot of ...
-1
votes
0answers
34 views

LibGDX AStar Pathfinding on a Tiled Map

I want to have pathfinding in my .tmx file that I created with the Tiled tool for libgdx, but I am just a beginner wirh libgdx. I use Tiled to build my game map. In this grid map, I want to add a ...
0
votes
1answer
24 views

How do I properly link an OrthographicCamera to a OrthogonalTiledMapRenderer

how to properly link an OrthographicCamera to a OrthogonalTiledMapRenderer How do I properly link an OrthographicCamera to a OrthogonalTiledMapRenderer? I have tiled map i'd like render and two ...
1
vote
2answers
27 views

In LIBGDX how to give different frametime to animations

As of now I've been using Gdx.graphics.getDeltaTime() to achieve this but I think this shouldn't be the correct way. Let's say I have 3 images/sprites and I want the first one to stay for 1 second, ...
0
votes
0answers
12 views

Handling events at LIBGDX. The event is registered in two place at the same time

Im creating a turn base-fight game and I have the problem that I want to create a button where you can click it and then it need to click on the target enemy. So far this is the part of the code I ...
0
votes
0answers
8 views

How to nest events in LIGGDX/Java: I have to get a target after clicking ona button

I making a game where you should be able to click on abutton with the mouse and then click on the game screen to target a enemy. Right now my game is able to target "enemyone" for example when I ...
0
votes
0answers
9 views

Why does ShapeRenderer's Rect draw different sizes/positions with ShapeStyle.Line and ShapeStyle.Filled

My test project does not use a camera/viewport but when I draw two same-sized rectangles using different ShapeStyles then two different sized rectangles are drawn <...
0
votes
1answer
20 views

Nullpointer exception with Scrollpane in LIBGDX

I get a strange Nullpointer exception and I don't understand why. Can someone help me ? Exception: ...
0
votes
1answer
17 views

Howto apply alpha value (Color) to a sprite in libgdx

Howto apply alpha to a sprite so it will work. With the following code, the sprite still is completely visible. Can someone help me ? ...
0
votes
0answers
17 views

set alpha for a texture

I have an existing texture and I like to apply the alpha value for it. But I cant find a way to do. I am missing something ? ...
0
votes
0answers
23 views

How to use Bullet ghost objects in libGDX?

So I went and did some research on how to get Bullet's ghost objects work in libGDX. There was nothing about the Java port of it, so I tried to translate some of the C++ code I found into Java. ...
0
votes
0answers
13 views

How to use drag/dragStart/dragStop methods in DragListener?

I want to scale up my actor on dragStart and scale in down on dragStop, but it looks like this methods does not even invoke on this events or may be I understand this methods wrong (there is no ...
0
votes
0answers
24 views

Repeat a region of an atlas

I'm using libGDX and I've switched from using a Texture instance for each wall in my game to an atlas. The wall texture you see was repeated alright: As you can see, it skips textures when I switched ...
0
votes
0answers
13 views

How to keep sprites in sync with non-box box2d polygon shapes

By non-box box2d polygon shapes, I mean polygon shapes that are made by specified vertices, instead of using the setAsBox method of box2d polygonshape class. I know this much: CycleShape and box ...
0
votes
0answers
13 views

Sprite array produces nullPointerException Libgdx

I've had multiple null pointer exceptions in the past but they have all been relatively easy to fix - a forgotten parameter, forgot to initialize with "= new class()" etc. but this one has me stumped ...
1
vote
0answers
10 views

LibGDX Button and Table Layout

I want to change the position of the Buttons inside a table, I tried setting their X and Y, or get their position when adding the Buttons on the Table, but it didn't work. It always aligns the button ...
0
votes
0answers
18 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
9 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
14 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
28 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
53 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
41 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
30 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
132 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
87 views
1
vote
0answers
32 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
34 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
65 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
62 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
28 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
33 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
74 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
31 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
55 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
17 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
33 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
21 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
55 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
53 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
59 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
22 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
10 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 ...