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
1answer
42 views

How to keep consistent between image quality, device range support and final size of the game?

I develop a game with LibGdx framework but I would like to discuss more theoretical question. Criteria: I want to support as many devices as possible for my game (phones and tablets) I want to see ...
1
vote
1answer
11 views

Parabolic Jump Libgdx Without Box2D and With Vectors

I have tried to write a jump method that sketches out a parabolic jump but it results in either no movement, or a jerky upward movement when I try to scale up dt. I have the following things defined: ...
0
votes
0answers
17 views

How to extract a point in LibGdx from Tiled map?

Tiled has a feature to insert a point in to an Object layer. But there doesn't seem to be a "PointMapObject" implementation in Libgdx on the doc. currently i am being forced to use a PolylineMap ...
0
votes
0answers
21 views

Item collision detection doesn't work

My GameWorld constructor has the following code inside it. ...
1
vote
1answer
17 views

How can I put multiple actors on a Button?

I like to have an Button with a Text and some Pictures in it. Is there something out of the box to that ? I mean I would like to add a Table into a button, so I could add anything I need to the ...
0
votes
0answers
4 views

libgdx onto existing IOS and Android App, Feasiblity and App Size

I am an IOS developer, my client has an existing app which they want to add some simple microgames onto. The main requirement is that the app size footprint is as small as possible. I suggested that ...
0
votes
0answers
26 views

How Can I Monetize With Startapp A Libgdx Game Made With Aide

I have created a libGDX game with the AIDE IDE Android app. The game is working fine so I will be uploading it to the Play Store to make money. I'd like to use Startapp ads, how would I integrate it? ...
0
votes
0answers
13 views

Box2D rotational issues

I am making a game in Android Studio using LibGDX. My player is supposed to fly up and down, and angle itself accordingly(lean back/up when going up, lean forward/down when going down). I am having ...
0
votes
0answers
10 views

Libgdx Box2D Triangle Joint behaviour

I have 3 Bodies (Nodes) that are connected in a triangualr shape using DistanceJoint's (Muscle). I'm increasing the length of the bottom Muscle(m). At a given point the "triangle" collapses and all 3 ...
1
vote
1answer
27 views

Rendering Tilemap Tile Layer Side by Side for Infinite/Endless Runner Game

I was strugeling this for days how to implement tilemap into libgdx and box2d with infinite/endless scheme. I can load a single map and display everything on screen. But placing 2 or more tilemap side ...
0
votes
1answer
38 views

Can't get AABB Collision to work properly

This is the code I'm using to resolve collisions on the players left side. It works when I'm on the ground, but if I'm falling, it does not work. ...
0
votes
1answer
34 views

Why is this LIBGDX Action behavior THE EXACT OPPOSITE of what I expect?

Here is a code snippet of the relevant section in my render loop. My intention was to make the actor who was currently focused blinking, to indicate that it was the currently selected UI element. But ...
1
vote
0answers
20 views

Uniform lighting when there are multiple light sources

I'm writing a 2d game where there are walls and the NPCs can only see what is within their line of site. To do this I'm using Box2dLights so the walls create shadows. The problem I'm having is ...
1
vote
1answer
69 views

Shadow artifacts/acne on block intersections

This is using the default shader and depth shader from LibGdx. It creates lines at the blocks intersections. This is what I use to create the blocks models for now: ...
1
vote
2answers
75 views

How to rotate a pixmap (LIBGDX)

In my game I have a world with randomly generated islands. My islands are based on the pixel information of the LibGDX Pixmap class. Now I need to rotate the islands. For this I need to rotate the ...
0
votes
0answers
29 views

Mirror effect on isometric map

I'm trying to make an isometric game with LibGDX and Box2D for collisions. The map and collisions lines are made in Tiled, but when transforming orthogonal coordinates to isometric with this code I ...
0
votes
1answer
14 views

Spine runtime for libgdx clipped rendering issue

I've started to play with the Spine for libgdx runtime in Java. But I can't seem to render without some sort triangular clipping. The code is based on the Spine examples: ...
0
votes
0answers
12 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 ...
-1
votes
0answers
15 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
55 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
19 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
1answer
23 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
35 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
114 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 ...
0
votes
1answer
27 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
31 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

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
23 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
23 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
21 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 ? ...
-1
votes
0answers
32 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. ...
-1
votes
0answers
28 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
30 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 ...
-1
votes
0answers
17 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 ...
1
vote
0answers
13 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 ...
-1
votes
0answers
12 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
1answer
30 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
59 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
48 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
37 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
169 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
89 views
1
vote
0answers
38 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
44 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
76 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
71 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
55 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 ...
23
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
110 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
32 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 ...