Stack Exchange Network

Stack Exchange network consists of 175 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
41 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
37 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
40 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
0answers
18 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
39 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
28 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
55 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
12 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
21 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
28 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
0answers
19 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
27 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
16 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
40 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
41 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
120 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
18 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
37 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
67 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
39 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
44 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
53 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
81 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
79 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
120 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
37 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
102 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
146 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
47 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. <...
0
votes
1answer
78 views

Libgdx clicklistener of Image Actor not recognising click

So I am attempting to make a an image of a closed door for a ship. On clicking this door, it would then change to an open door. However, I am struggling to get the click listener to work for the Image....
0
votes
0answers
30 views

LibGDX: How to overlay particle effect using shaperenderer?

I made a simple wrap effect for my game using libgdx particle editor. But I am having some problem. When I draw any shape on screen using shaperenderer, the shape is not solid. It's transparent and ...
1
vote
1answer
39 views

How can I update the size of a button after adding it to a table?

I have a table that acts as the HUD for my game. It features a bar (as a text button) and label showing how much shields are left. So I initially add the shield bar to the table, with the cell set at ...
0
votes
1answer
74 views

How do I implement 3D A* Pathfinding in libgdx?

I am using BDX (Blender with libgdx engine) to create my game. I am not sure on how to implement 3D path finding using A* search. I looked into gdx-ai, but that is for 2D.
0
votes
1answer
106 views

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

I am developing a game with the LibGdx framework, but I would like to discuss a more theoretical question. Criteria: I want to support as many devices as possible for my game (phones and tablets) I ...
2
votes
2answers
50 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: ...
1
vote
1answer
57 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
34 views

Item collision detection doesn't work

My GameWorld constructor has the following code inside it. ...
1
vote
1answer
36 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
20 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
46 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
15 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
16 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 ...
2
votes
1answer
67 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 ...
1
vote
1answer
71 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
51 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
26 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
80 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
120 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
42 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 ...