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.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Multiple Bitmaps in Rectangle area

I am trying to build a card based game in which a card is added to player after every round. To win the match player has to remove all cards from his deck. However I have also drawn some additional ...
0
votes
1answer
33 views

LibGDX/Tiled rendering order

I'm using LibGDX and Tiled. I need to render a Texture for my repeated background, then myTiled map and finally the sprites. My problem is that if I put ...
0
votes
1answer
30 views

Libgdx - Screen tearing (or artifacts) while in fullscreen

I have a problem with libgdx, fullscreen and what I believe is screen tearing or any other sort of artifact. In windowed mode, everything works fine, but when i switch to fullscreen, moving sprites ...
0
votes
0answers
25 views

Box2D - Proper way to simulate player's body and feet

I'm new to LibGDX and Box2D, and I'm trying to create my player's body but got some issues. I've created the ground as a ChainShape, and my player as a Rectangle. I want to attach a fixture for its ...
0
votes
1answer
36 views

Libgdx - accelerating string displaying

My renderBoard is slow and it's because of font.draw function. I read that I should use stringBuilder instead of string, but it didn't help at all. I suppose I'm using it wrong. Could you guide me to ...
0
votes
1answer
17 views

LIBGDX - Artifacts when scaling background image

I've got a problem with libgdx. First off, im working with libgdx and box2d on a little physics game. Im using the aproach mentioned in this answer and thereby setting my camera to some smallish ...
0
votes
0answers
18 views

Tiled map .tmx to Atlas Region libGDX

I have some tiled tmx maps I made. I have a texture atlas that contains all of the textures I'm using in my libGDX game . I have a json tiled map saver class I wrote that stores the atlas region ...
0
votes
1answer
23 views

Why the value of float xAxis = -Gdx.input.getAccelerometerY(); is given a accelerometer of y axis?

I am learning game development from the udacity course "https://classroom.udacity.com/courses/ud405/lessons/5389263706/concepts/53853441090923" I am stuck with one statement in the code about ...
0
votes
1answer
21 views

(Tiled) Background stops being rendered in libGDX

I'm using Tiled and I created my background as an image in a Tile Layer. When I load the map in LibGDX, it shows fine. However when the camera moves, the whole background dissapears. The problem is ...
0
votes
1answer
72 views

Game loop inside libGDX game loop

I have the main game loop in libGDX. On the touch() event I want an animation to be executed. So I will have a variable which will store the value which will be ...
0
votes
1answer
30 views

x coordinates resets after changing speed?

I wanted to change the speed of a soldier when he enters a barbed wire texture. Since I have multiple soldiers and multiple barbed wires I just iterate with two for-loops through all of them. ...
1
vote
1answer
36 views

What is the exact unit in LibGDX if it says “private static final float WORLD_SIZE = 480”?

In the code I see that the WORLD_SIZE variable was initialized with 480 private static final float WORLD_SIZE = 480; What exactly the 480 means, are they pixels, cm or meters?
1
vote
1answer
34 views

Unexpected output from the merging of a quadtree, when that data is converted to Box2D fixtures

I've been staring at this code trying to troubleshoot this for the past 3 days, but I seem to have gone Code Blind. I KNOW the issue is stupidly simple, but I just can't crack the problem. I'm using ...
0
votes
0answers
24 views

LibGDX: Issues with two viewports, one from stage

I am frustrated.^^ I want to build a game that can run on different screen sizes using LibGDX. The best strategy for me seems to be to use a FitViewport so that I ...
1
vote
1answer
38 views

What is the connection between these LibGDX concepts?

In LibGDX, what is the connection between these concepts: stage, camera, viewport, batch (spritebatch), projection matrix, tiledmap? Currently my game has 3 stages: UI stage entity stage tiledmap ...
1
vote
1answer
32 views

Texture with transparency not rendered correctly in LibGDX

The title might be a bit misleading but I'm having a hard time to explain the problem so I'll try with pictures: Same tree from opposite site: I'm trying to create a voxel game and at the moment I ...
0
votes
1answer
27 views

Why can I not open the desktop and core folders in libGDX?

I think the problem is caused beacuse I have two JDK's. One dedicated one and another integrated from Android Studio. Before, when I start the bulid it gave me a warning: ...
1
vote
1answer
33 views

Action never fires

I have a method, which runs the action MenuScreen at the very end. It never fires. Why is that? ...
0
votes
0answers
29 views

libGDX - Zooming on a specific point in 2D space

I was hoping to modify my game so zooming would focus on a point: the mouse location on desktop or the midpoint between two fingers on mobile. This appears to require a simultaneous zoom and translate....
0
votes
1answer
50 views

How to get collision area within a circle in libgdx

I have a ball inside of a multi-colored circle, the ball will hit the inner area of the circle like this bellow circle image And the Circle will be rotated clockwise or anti-clockwise based on user ...
0
votes
1answer
59 views

Missing texture after add new actors

I want to add two types of characters multiple times but when I add a new actor to stage texture in "old" actors stops render. I can add multiple KnightActor (...
1
vote
1answer
44 views

How to retrieve the text of a text label placed in a TileMap (.tmx)

TiledMapEditor supports the placement of text-labels nowdays, but I'm not able to load the text in a String. I've tried iterating through the MapProperties of a <...
0
votes
1answer
55 views

Should I generate 2 array map or use tilemap?

So, I'm trying to build a 2d multiplayer bobmerman game. Right now I have whole map as 2d integer array. I'm thinking if I should change it to tilemap. In the future, I will want to be able to ...
0
votes
1answer
27 views

Using InputListener touchDown - Unable to jump while pressing direction button

Using InputListener attached to images for touchscreen control I initially had the problem of the player being able to continuously jump and fix themselves to the ...
-1
votes
1answer
47 views

Handling different aspect ratios on a 2D dodging game

I've been making a game where the player is on the ground and has to dodge objects falling to the ground. Since I'm using libGDX (But the question still applies to any other language/framework), The ...
0
votes
1answer
43 views

How to rotate two textures at once in Libgdx, while keeping their relative positions the same?

I am trying to develop a game with cards, where the user can swipe left or right to tilt the cards like this. The red & white cross should stay in the same position on the yellow card as they tilt ...
0
votes
0answers
62 views

libGDX/HTML5 game sounds doesn't work on iPhone

I have a libGDX/HTML5 project that works well on desktop browsers, but on mobile browsers it has problems. I can have some sounds on Android browsers (not perfect) but on iPhone browsers it doesn't ...
0
votes
0answers
21 views

Libgdx Box2d TiledMap Scaling

I think I'm doing something completely wrong but I just can't seem to wrap my head around the box2d pixels per meter conversion. Currently I have a Tiled map with an object layer I want to use as my ...
0
votes
0answers
15 views

Extra keytimes in FBX baked animation

I've exported my 3D model with animations in Blender to FBX, then used fbxconv-gui to create G3DJ file. The animations contain keytimes always like this even if I want to use different frame rate: ...
0
votes
0answers
23 views

Implement an “xprevious” in LibGDX

I have used Gamemaker Studio 2 before, briefly, and found that the xprevious and yprevious variables are extremely useful. ...
1
vote
0answers
31 views

Implementing an Asset Lifecycle

I'm currently developing a game using Kotlin and LibGDX. But this Question should be Framework/Engine agnostic. Given I have a Screen class like this: ...
0
votes
1answer
32 views

Libgdx: black screen when setting screen and font pixelated

I have a problem with black screen when switching back to main menu and when opening a screen. When the game starts, the screen is set to MainMenuScreen. That works. When I select the first menu ...
0
votes
1answer
30 views

libgdx: input handling issue

Not sure how to describe the issue I'm facing here: Rectangles are grouped and attached to a "layer" extending Stage. Each layer is added to a multiplexer in a Screen extension. There are 2 layers: ...
0
votes
0answers
20 views

How to scale ImageButton with viewport for different resolutions?

I am new to the libgdx framework. I don't know how to scale an ImageButton for different screen sizes. Currently it looks big on desktop, but small on the Android ...
0
votes
1answer
58 views

Getting solid black color when texture is added to GLSL

I'm trying to apply the default badlogic.jpg image to a .obj I have. I'm currently loading the texture from AssetManager and creating a material with a texture ...
1
vote
1answer
47 views

Why is my client's body drifting even after using data from the server, and how do I fix it?

I am trying to use Box2d on nodejs server with libGDX client. What I am trying to apply is authoritative server model so clients are just sending input data to server, server is running simulation and ...
0
votes
1answer
146 views

How do I wait till an animation is finished?

I am currently working on a Warfare 1917 like game. Right now I am trying to get the combat system working. I have made animations for a running and shooting soldier. It takes exactly 0.5 seconds till ...
0
votes
0answers
23 views

Box2D LibGDX Cant Create ChainShape Static Body in server side with same position client side

I am trying to create walls in server side which i have already created in client side.This is how i create them in client side: ...
0
votes
1answer
41 views

LibGDX - Drawing animation before specific tiled layer is drawn

I'm using TildedMap to separate map layer, drawSprites layer and objects layer.I'm trying to draw the map, then the player animations and then the objects on the map. This way I'll be able to have the ...
1
vote
2answers
89 views

Server Side Movement Box2D LibGDX

I am trying to implement server-side movement using box2d on libgdx client and planck-js(box2d for javascript) on nodejs server. I am running box2d world on both client and server. Before server i ...
0
votes
1answer
42 views

Trying to understand why libgdx wipes existing models when creating new ones

I'm coding a simulated brain and I'd like to make an arrow appear when one cell connects to another cell. My output without generating an arrow looks like this: Where each block rendered represents ...
0
votes
1answer
47 views

Isometric Game World Boundaries Equation

I ran into a problem last night and I can't solve it since. I'm making an isometric game based on tiles with equal rows and columns. Now I made moving entities which should turn whenever they reach ...
0
votes
1answer
61 views

Orbital rotation equation

I am developing a space sandbox (3D). Now I am working on an asteroid belt around a planet. I have an Asteroid class and an ...
1
vote
1answer
98 views

Handling bad network clients using socket.io

Currently I'm working on a MMO game which players can join and exit game whenever they want. I have a connection manager server (CMS) written in golang using socket io library. World connects to CMS ...
0
votes
1answer
84 views

LibGDX: How to make an object falls with random speed

I'm trying to make an object (ball) fall into position Y and when the ball collides with the base. The sprite changes and along with the change I want the speed of the fall to change according to the ...
0
votes
2answers
216 views

Why can't I read this JSON file?

I get an error every time I try to parse this .json file. Here is the error: ...
0
votes
0answers
39 views

Friction makes entity move slightly backwards

I'm having some trouble getting my friction to act properly in my game. My current goal is to add a dash move - which is working fine except that a bug with the friction is messing with me. The Dash ...
2
votes
1answer
107 views

Mesh rendering performance optimisation

I'm working on a libgdx implementation of mesh terrain and running into some performance issues. The terrain is represented by a number of mesh tiles, each mesh is made of vertices laid onto a 2D ...
1
vote
0answers
192 views

The most popular Resolutions and Aspect Ratios in Android OS 2019

I develop the game with Libgdx framework. When I tried to deal with support multiple screen resolutions it turns out that Libgdx is not following Android approach how to deal with Screen sizes and ...
0
votes
1answer
54 views

LibGDX: Change Direction

I want to move an object on screen and when the object intersect with the obstacle he change the position, for example he's going to the right and he found an obstacle, so he change to the left. <...