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.

learn more… | top users | synonyms

3
votes
1answer
87 views

Resolving collisions with float precision errors

I'm facing a problem when I try to resolve the collision between two units using floats as positions of the units in my game. I am detecting the collisions using the SweptAABB algorithm and if there ...
3
votes
2answers
50 views

Write error log on crash in libGDX?

I've been having problems building my game. I've built it successfully before, until I added the LuaJava.dll and LuaJava.jar files (so I can use Lua in my game). Now, it just briefly opens with black ...
2
votes
2answers
35 views

How can I automatically fit elements in libGDX layouts?

Recently I wanted to use libGDX's Table to show four buttons. But my table doesn't fit on the stage: Here is the code I used: table.add(new GameButton("1")); table.add(new GameButton("2")); ...
0
votes
1answer
40 views

Libgdx - when / how to save data

I'm making a simple 2D game in libgdx, and now I'm at the point where I have to save data. I already have a mechanism to save the data itself. The problem is that I don't know when/where the procedure ...
2
votes
1answer
47 views

How to set indent spacing of a tree in libGDX scene2d?

I've been trying to create a customized UI using scene2d library in libGDX. However I am having troubles as I'm trying to set a custom indent spacing on my Tree object. I have tried to search for the ...
2
votes
1answer
31 views

Call function via ContactListener

I've been creating a game on my own in LIBGDX, BOX2D and there' s a problem I can' t solve. When two World bodies collide, method "beginContact" is called in MyContactListener class that implements ...
0
votes
3answers
62 views

making an object follow a path libgdx [duplicate]

I am making a game that has objects that shoot other objects. I need the enemies to follow a path. The easiest way I can think of doing this is by having an array of coordinates and they move between ...
0
votes
0answers
31 views

Rendering BOX2D shapes with LIBGDX

I have been creating a game on my own and I need a little help to begin with graphics. I haven' t found much in the internet about this topic, so I came here. Right now I've got a chainshape that i'm ...
1
vote
0answers
46 views

Point Light shows black box & rect (PointLight not working) - libgdx 3D

I am creating a 3d scene currently a box and rect, and trying to enable lighting. When i create a PointLight and add it to Environment everything turns to black color? all i want to do is ...
0
votes
0answers
31 views

Is it possible to use a Unity 3d Model with libGDX?

Can I use a 3d model like https://www.assetstore.unity3d.com/en/#!/content/36951 in a libGDX 3d game?
0
votes
0answers
24 views

Creating tunnel of points in LIBGDX

I have been wandering in the Internet lately to find the best possible solution for creating a 2d tunnel/cave in my game in LIBGDX. My game in short: One player can control a shape in tunnel, the ...
0
votes
0answers
12 views

LibGDX: drag and drop in a vertical group

I need to mode with a drag and drop a cell/row in a vertical group and change its position, before or after another cell/row. Is there something that can help me to implement this? Thankyou
0
votes
2answers
44 views

Libgdx change to other screen and dispose current one

I am trying to switch to a GameScreen when the LinearVelocity of a Box2D - Object is x = 0. If it is so, I am using the setScreen() - Method by calling the main class. This works perfekt, but when ...
5
votes
1answer
77 views

Libgdx: how does dispose() work?

My game uses a lot of images, for the over-world, battle screens, chats, etc. I'm really meticulous when it comes to memory management, and I've noticed that even though I dispose every image when I ...
2
votes
1answer
38 views

Libgdx problem while converting TextureRegion to Pixmap

I'm developping a Tile base game where I have to generate transition tiles. To do so, I have a method that generate those tiles from 2 existing one and 1 "filter tile". I use this method to make a ...
0
votes
1answer
41 views

Libgdx crash on dispose()?

Whenever I try to manually call the dispose method in one of my screen my game just crashes. My dispose looks something like this @Override public void dispose() { battletheme.dispose(); ...
0
votes
1answer
39 views

Libgdx switching between screens without losing Information

I've been having issues with Screens, as I want to switch between the main game screen, the battle screen and the ingame menu screen (JRPG). The problem is that I have initialised all the information ...
0
votes
0answers
21 views

LibGDX: Skin and scaling problems

I'm trying to use Skins with TextButtons. However I'm having an issue where the TextureRegions of the Skin are NOT being scaled down to the tablesize. This is leading to an issue like in this image: ...
1
vote
1answer
25 views

Adding an InputListener to a Group

I'm trying to detect when a Group actor (my "slot") on my stage is clicked by add an InputerListener to the group. I've added the stage to my InputMultiplexer, but when I click on the actor, nothing ...
3
votes
2answers
69 views

How do I induce collision events in LibGDX 3D?

In the code below I've put an example of something I want to do. I have the camera and I want it to stop moving whenever it hits one of the boxes, how do I do this? public class Main extends ...
1
vote
3answers
112 views

libGDX best way to do Game States

I'm making a JRPG in libGDX, and I'm working with Screens. I have a main Screen called GameScreen, a screen for battles called BattleScreen and I want to make a screen for managing party members and ...
0
votes
1answer
63 views

Map coordinates to camera coordinates

I have a tiled map which is 3 times higher than camera. When I press on a tile, I want an actor on that tile to show up. This works if camera is not moved. If I move camera a little bit up, so the ...
4
votes
1answer
348 views

How do I save which NPCs the player has talked to?

I have built a save system that saves the players name, x and y location, map and the direction they are looking at in JSON. { data: [ { x: 400 y: 424 d: UP name: ...
1
vote
2answers
75 views

Libgdx: If Rectangle overlaps anything?

I've written a code that allows me to talk with an NPC. This works as long as there is only 1 NPC on the map. I'll explain why. public void getNPCCollision(){ for (int i = players.size() - 1; i ...
1
vote
1answer
53 views

Is it possible to use Android Libraries in LIBGDX?

I want to make an android application game that uses both android API like Location, even Google Maps API and also use Libgdx framework as well. Is this possible? I noticed there's an Android and a ...
2
votes
1answer
37 views

Get array from JSON in Libgdx?

I wanted to load in map information using JSON, is there a way to get String, Int, float etc lists or arrays from JSON in Libgdx? My structure looks like this { "data": [{ "name": ...
1
vote
1answer
28 views

How can I handle markup sequences in a libGDX TypeWriter implementation?

I've implemented my own TypeWriter for text that looks like this public static String GetWords(String text, float wordCount) { float words = wordCount; // loop through each character in text ...
3
votes
1answer
77 views

Creation of a tiled map editor polyline in box2d is not working correctly

I'm currently trying to create a box2d polyline object in my libgdx game, but it's not working as expected. To get a better picture of my subject, have a look at how it should look like, and how it ...
3
votes
1answer
50 views

Scene2D Actor walking animation?

I used to extend my Player/Entity class with Sprite, that way I could create a walking animation using SetRegion and super(stilldown.getKeyFrame(0)); I've recently started porting everything over to ...
1
vote
2answers
75 views

Async loading in libGDX to set the screen

I would like to bring up a loading screen, for this would make the load async. How can I do this? I looked on the libGDX website but I do not understand very well, maybe because of my poor English. ...
-2
votes
1answer
93 views

Libgdx incredibly high RAM usage! [closed]

Alright so I'm new to Libgdx and Game programming in general, and I've got a huge problem. If I leave my game on, it will start to eat memory, pretty fast at that, until it reaches a point my PC ...
1
vote
2answers
98 views

OpenGL — Better to switch out material or shader for changing object colors?

I'm fairly new to shaders and OpenGL so bare with me please, I just want to make sure I'm doing it correctly! Now I'm using LibGDX in order to create a simple 3d diagram for my company. I have a few ...
0
votes
1answer
55 views

LibGDX hexagonal tilemap getting adjacent tiles

How do I get all adjacent tiles to a hexagonal tile, my tile map is using a staggered co ordinate system with an odd stagger index and I am using libgdx java. if (x % 2 == 0) { hexAdj[0] ...
0
votes
0answers
19 views

Generating hexagonal tilemap in libGDX

How would I go about generating a hexagonal tilemap in Libgdx? My idea before was to just use a prebuilt tilemap and then change tiles on it but I'm having problems with the hexagonal co ordinate ...
1
vote
1answer
69 views

LibGDX - Rotating sprites and still keep the positioning between them

I've been struggling with a problem regarding rotations and relative positions between sprites (in this case, the sprites are just lines) - a bit off-topic, but should i be using the ShapeRenderer ...
0
votes
0answers
49 views

LibGDX: open android camera

I need help, I can't find a solution to open camera device in my libgdx app. I'm developing it only in Android for now but I have this issue. I need only to open the preview view, no snap picture o ...
0
votes
0answers
10 views

animation of an Actor in libgdx crashes on iphone

I am using a class found here on stackover for the animation of the actors , but I crash on the physical device class AnimatedImage.java: public class AnimatedImage extends Image { protected ...
0
votes
1answer
65 views

Libgdx Delta time stutter?

Alright, so I want my guy to move, I simply use this code. velocity.y = speed; Same goes for velocity.x Thing is, the lower the framerate the slower he moves. But, if I add delta time, the player ...
0
votes
2answers
43 views

libgdx tiledmap rendering optimazation [closed]

I'm new to game development can anyone show me how to render tiles which were only seen by the camera I cant seem to find straight answer in google. The game is in 2D and im using tiled
2
votes
1answer
54 views

Referencing individual cells of a tilemap and changing texture

I have a tilemap and am trying to proceduraly generate islands on it by changing the texture of the tiles and marking it as land ( I want to do this without texture atlas for now). How do you change ...
0
votes
0answers
35 views

SpriteBatch draw does not work on iOS - LibGdx

I have a small problem , in practice if I batch.draw ( ... ) ; It does not work on iOS with robovm . my code.: on the crete() method: texture = new Texture(Gdx.files.internal("background.jpg")); ...
1
vote
0answers
19 views

Does Overlap2d have frustum culling

I'am wondering if Overlap2d has a own frustum culling or do I have to implement my own?
0
votes
0answers
22 views

Libgdx HexagonalTiledMapRenderer

How does the hexagonal tiled map renderer work in libgdx I'm trying to render a hexagonal tiled map and I can't quite get it to display correctly I've used the orthogonal tiled map renderer before and ...
0
votes
1answer
19 views

Setting resizable to false in LibGDX

I have a small working game prototype. I want to do something like LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); cfg.resizable = false; But I get ...
1
vote
1answer
93 views

LibGDX - Level management on a level-based game

I'm new to LibGDX and android development in general and am trying to do a puzzle game. Being a level-based game, i'm trying to make it so in every level a certain number of blocks (just rectangular ...
1
vote
1answer
64 views

Scoping my first project [closed]

So I'm writing my first game which is a RTS and one of my main ideas for it is multiplayer deception however I'm finding it hard to control the scope of my project. Yes im thinking pretty small but ...
3
votes
1answer
92 views

LibGdx 2d Free-Form Terrain

I have a query about how to create a 2d landscape level using libgdx/ box2d (Or possibly with Unity) for Android and iOs. Let me describe the goal and then the specific points I need help with. What ...
2
votes
2answers
83 views

create ipa without RoboVM in a project libgdx

I am creating an application with libgdx , and I wish I could produce an IPA without using RoboVM , because since version 1.9 became a fee . I saw on the original documentation that you can do with ...
2
votes
0answers
26 views

libGDX AppWarp integration problem

I have tried to use up AppWarp's old SuperJumper as a sample to create an up to date project from it with Gradle. Maybe it is good for learning. So, I have downloaded project from ...
1
vote
0answers
57 views

Overlap2d + LibGdx load large map

I've been wondering if it's possible to load a large map made with Overlap2d before I get started with my project. A large map for me is something equivalent to a map from recent open-world RPGs like ...