A game library which enables cross-platform game development in Java, with support for Android development and desktop development. It makes use of OpenGL for portability.

learn more… | top users | synonyms

0
votes
0answers
5 views

Does the LibGDX AI extension work on IOS?

Does the LibGDX AI extension work for IOS? Here it does't show how to add it to the IOS dependencies. I don't have an IOS device but I want to release my game for IOS. I just don't to finish my game ...
2
votes
0answers
13 views

GLSL 2D Silhouette

I'm trying to render a silhouette of any entity behind foreground objects to indicate their position to the player. Here's an example of what I want to achieve, from Hyper Light Drifter: From what ...
0
votes
1answer
10 views

In Scene2D, does Actor.hasActions() no longer exist?

Eclipse does not allow me to do while (actor.hasActions()){} saying it's undefined for type actor, but the libgdx API still has it as one of an Actor object functions.
2
votes
0answers
24 views

generate box2d bodies from isometric tiled map

I followed the tutorial here to generate box2d bodies from a tiled map and that worked fine.... for orthogonal tiled maps. Unfortunately isometric maps use their own coordinate system where (0, 0) is ...
0
votes
0answers
19 views

TiledMap blocks makes Animation invisible

////////////////////////////////////////////////////////////////////////////////// Got it fixed. Thanks to anyone who tried to help me. New Code: mapManager.render(); ...
2
votes
1answer
27 views

How can I repeat a Texture Region in libGDX

I have a texture that is part of a sprite sheet. I want draw the texture to cover a certain length, but I want it to repeat not stretch. However,when I use the following code batch.draw(hillBottom, ...
4
votes
1answer
152 views

LibGDX input y-axis flipped

I'm writing a game in Java for Android using LibGDX, and I connected my phone so I can test it on it. I know that LibGDX's render system works different than regular Java systems since the 0,0 ...
-1
votes
0answers
30 views

Level Backgrounds [duplicate]

I'm developing a game using libGDX but am still new, especially when it comes to designing sprites etc. So far for my sprites I've used only GIMP. However, for my game I also need different level ...
0
votes
0answers
15 views

Filling the viewport area of a orthographic camera with an image (libgdx)

So im trying to get the whole area of the viewport and then use the coordinates to draw images in the camera's viewport. So if the camera moves I can fill it with one image the length and the width of ...
1
vote
0answers
30 views

Efficient Collision detection for polygons (fleet) in an RTS

I'm trying to make an RTS for android using libgdx. I would like to have collision detection to be able to detect ships inside the range of weapons and collision between my bullets and the ships. So ...
1
vote
2answers
45 views

How to make sure that when two bodies collide, there is only one collision detection on box2d?

I'm using LibGDX with box2d, and when to bodies collide collision is detected multiple times. here's the code `public void preSolve(Contact contact, Manifold oldManifold) { Body a = ...
2
votes
1answer
30 views

2D LibGDX Collision Avoidance [duplicate]

I would like to know what is the best way to implement collision avoidance and eventually pathfinding in a LibGDX 2D top view game. Think of "Binding of Isaac". I use a sort of tilemap to place the ...
0
votes
1answer
24 views

Move a box2d body towards mouse [on hold]

I'm using LibGdx's Box2D in Java. I'm trying to apply a force to the body that would send it towards the mouse. The problem is, I'm having trouble figuring out a way to send it directly to the mouse ...
1
vote
1answer
51 views

Using world coordinates instead of pixels

I've been told that having a set pixels-per-world unit number is bad practice because it will not look the same at different resolutions. Because of this, I am trying to learn about using abstract ...
4
votes
1answer
65 views

How do I convert screen coordinates to isometric tile map coordinates in libGDX using matrices

I know this has been asked many times but my question doesn't quite fit the others. I have an IsometricTiledMap and I need to get the tile under a set of screen X and Y coordinates. Here is a picture ...
-1
votes
0answers
23 views

LibGDX : Scene2D [on hold]

I wanna make the right scrolling button smaller and the buttons inside it to touch the right edge of the Table inside the ScrollPane, the buttons are smaller the left grey part is the background of ...
1
vote
0answers
27 views

LibGDX - ShapeRenderer as principal game entity renderer

I am trying to make a 2D game that is just a bunch of default figures like circles, arcs and quadrilaterals with no textures (similar to Super Hexagon), and for that I was using C# and XNA long time ...
0
votes
0answers
14 views

Scaling/Zooming a SpriteBatch

I am working on my first game with LibGDX and coming from ActionScript3 I am used with the possibility of scaling things more or less the way I want. I know it works different in LibGDX, but I can't ...
2
votes
1answer
38 views

How to achieve sprite reflection effect in libgdx

I am currently working on an open world game similar to Pokemon using libgdx. I am currently stuck on this effect that I really want to be done before moving to other features of my game. How can I ...
0
votes
0answers
34 views

Is the libgdx g3d model format really most efficient? [closed]

The libgdx wiki says that libgdx's g3d files are more memory and runtime efficient than others. Is this really true? I can see no major reasons why libgdx g3d models any better than the common obj ...
0
votes
0answers
16 views

Libgdx polygon ratating

I'm using polygons for collision detection. Here is the code: poly = new Polygon(verticies); poly.setOrigin(100,100); poly.setRotation(45); renderer.setColor(Color.GREEN); ...
3
votes
1answer
39 views

How do I use Libgdx viewport for UI?

I am using LibGDX to make a game for Android and I am using 2 Viewports. One for UI and one for the actual game content. My problem is I can't find a good way to scale my UI using a Viewport. This ...
0
votes
1answer
16 views

How can I use OpenType Font in libGDX

Is there a way I can use an OTF file with libGDX. The following throws an exception: gameFont = new BitmapFont(Gdx.files.internal("data/font.otf")); Caused by: ...
0
votes
0answers
12 views

LibGDX : Scene2D ScrollPane

I want to create a list of buttons with ScrollPane , but I cant create a ScrollPane . In the constructor method in the examples Skins are used (.atlas , .json files) but how to create these files? ...
0
votes
2answers
61 views

How to use world coordinates

I am quite new to game development (but not programming) so please forgive me if I am not correctly understanding certain concepts. I am trying to figure out how to use world coordinates rather than ...
0
votes
1answer
37 views

Libgdx - How to rotate a single ShapeRenderer object

So, looked at a couple of questions similar to this, led me straight into dead ends. I have an object drawn out in ShapeRenderer, and I wish to rotate only that one object. I have tried ...
3
votes
1answer
62 views

Box2d Body to follow mouse movement

I am trying a box2d body to rotate following the mouse. Here's an image to clarify what I mean. The red and blue circles are current point of the mouse and the body (of corresponding color) ...
0
votes
1answer
24 views

LibGDX - how to detect touchUp with GestureListener?

I'm making a game and I have implemented GestureListener as my inputprocessor. It came with a bunch of methods such as fling, pan, tap etc etc including touchDown. However, there is no touchUp method! ...
0
votes
1answer
37 views

LibGDX - Tilemap Wall Collision Detection Issues

I cribbed some code from another web tutorial (SuperKoalio - https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/superkoalio/SuperKoalio.java) about detecting a ...
0
votes
1answer
42 views

How to fetch unit coordinates for AI?

I have been designing a simple turn based Civ-like game over the last two days with libGDX to test myself. I have a units class that can be extended to make unit types and I have my game board set ...
0
votes
1answer
36 views

Libgdx Scene2d and Box2d light

Currently I am using scene2d and I want to implement shadows using Box2d light. I want shadows under characters but when I draw something after render() , it draws nothing. For example, in draw() ...
0
votes
1answer
26 views

How to store each rendered frame as image in libgdx for debugging

I have a libgdx screen's render method where I am executing lots of for loops and drawing various shapes on screen in thoese loops. Also I am manupulating (x,y) of each shape at runtime to acheive a ...
0
votes
1answer
34 views

Camera.unproject(Vector3) method is not working in libGdx

I know the touch postioning in libGdx uses OpenGL, making 0,0 the bottom left corner while the camera uses the top left corner as 0,0. I did some searching and found this SO question that specifies ...
0
votes
0answers
7 views

Libgdx : how to attach actor to a rotated group

I have a group actor with a circle image .png and then I spread small circles around surface of this group, I mean circle on angle 0 and circle on angle 60 and so on using the math equation: ...
0
votes
0answers
27 views

Kryonet with multiple clients overhead server, how to deal with this? [on hold]

I'm developing a server-client multiplayer game using Kryonet and libGDX. My server contains 100 entities and sends updates at 20 packets per second to clients using udp. Each packet contains the 100 ...
0
votes
1answer
60 views

LibGDX obstacle collision

How can I handle collisions with obstacles in LibGDX? Is there any automatic way to stop the character's movement when it collides with a wall or I have to constantly poll for all the possible ...
1
vote
2answers
67 views

LibGDX - Rendering things in different classes

thanks for your time! I'm really new to LibGDX (and Java itself). Which approach should I use to render my different game parts? I want to show a background, the main character, a bunch of enemies ...
1
vote
0answers
19 views

LibGDX's particle emitter - Multiple particles in the same effect?

Hello everyone reading this, I've used the particle editor to edit an effect to put in my game. Is it possible to have multiple and randomly emitted images (particles) instead of one? I don't want ...
-1
votes
0answers
17 views

Set the camera to follow a TextureRegion

I need to set the camera to follow an object like the player, I've seen some tutorials where two lines of code can solve this, like: camera.position.set(xPos, yPos, zPos); camera.update(); For my ...
0
votes
1answer
59 views

How do I manually make a .pack file like TexturePacker (without using TexturePacker)?

I am using libGDX and apparently the only way I see for creating a UI is with texture packs. I would say that since a texture pack is nothing more than JSON or XML file and a large png I could ...
0
votes
0answers
27 views

LibGDX - Show a minimap

I've started to develop a small roguelike game in LibGDX. I've also made a minimap class, which creates and updates the minimap as the player explores the dungeon, by using a Pixmap. The minimap class ...
-2
votes
1answer
43 views

Libgdx Statebased game not working

I'm using Libgdx and I wanted to change the default application to a Game with multiple screens. I get an odd nullpointer that has to do with the engine. I'll show you my little setup code. Here I ...
3
votes
1answer
63 views

Making a border around a translucent shape in LibGdx

The recommended method for making a border around a shape using LibGdx is to draw a larger version of the shape to serve as the border, then draw the shape over the larger image. ...
1
vote
1answer
25 views

[Libgdx]Screen not rendering after restarting game

I have a strange problem while using the libgdx library Game works fine on the initial launch on Android, but after that restarting game does not render the graphics on the screen properly. It is a ...
0
votes
1answer
38 views

Libgdx Platform collision problem

I am trying to come up with a collision function where all the cases are made. If the player (Who's hit box is a circle) collides with a platform (hit box is a rectangle) from the right the ...
1
vote
1answer
47 views

Box2D No Gravity when moving against wall

I use Box2D in my current project and I have a problem with the gravity.. You can see my problem here: https://www.youtube.com/watch?v=2_kv9LkKwN4&feature=youtu.be when i jump normal everything ...
2
votes
0answers
29 views

LibGDX Android Textures reload other textures, and transparent images get black backgrounds [Pictures]

I have very strange problems with my LibGDX Game in Android - The problem is that sometimes the textures get black backgrounds when they should be transparent, and sometimes when I remove the texture, ...
2
votes
1answer
78 views

Creating a Melee Weapon in Box2D (libGDX)

I am struggling with how to implement a melee weapon that can swing when a key is pressed. I am imagining two different attacks (stab and swing) I have tried creating two fixtures (character + ...
0
votes
0answers
20 views

Problem loading particle effect

I am trying to load a particle effect, but I get an error when libGDX tries to load the image file for the particles. Couldn't load file: - Image Path - The particle effect file itself loads fine. ...
0
votes
0answers
38 views

Use libgdx box2d for dynamically generated top down map

So, I've already found some information on how to use box2d and tiledmap together. Since I want to generate my top down map (100 by 100 tiles), I thought about only using box2d. The tiles would be ...