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

0
votes
0answers
57 views

How to update projectile trajectory point?

I am a new game developer, I am making a game, but I have a problem, I don't know how I can update my trajectory point in OnDraw method. Could anyone please help me? Thank you! Here is my code: ...
0
votes
0answers
23 views

TiledMap Safe Area for different screen resolutions

I'm creating a Tower Defense game using libGDX (w/ scene2d) and TiledMap. I've been reading extensively about viewports and how I can better manage various screen sizes. I want my Tiled Map to take ...
0
votes
0answers
17 views

AdMob Banner appears 960x150 instead of 320x50 in libGdx - what's wrong here?

I am a bit helpless with this strange effect from AdMob. AdView is instanciated in code and so is the relative layout and libGdx view. View view = ...
0
votes
0answers
9 views

libgdx - objects are drawn elongated when width and height are the same value

I don't use view ports but my camera is set to the screen width and height of the device. My objects are drawn longer(taller?) then they should be. I check my sprites and they are square not ...
0
votes
0answers
22 views

libgdx - Math reflection to the correct direction

I'm using a simple reflection system, but the game doesn't work how I want. How should this game work? The game has two boxes. A red side and a black side. The player should only sort the bombs to ...
0
votes
0answers
45 views

Why is my tiled map moving when I move the camera in libGDX?

I use LibGDX. I have created a map with Tiled Map Editor and loaded it to the game. Everything else is working well, but when I move the camera, the map moves: it jumps or floats. My code: public ...
0
votes
0answers
27 views

LibGDX - black bars, FitViewport and drawing background

actually I'm creating game in LibGDX and i have few problems. I'm trying to solve resolution and aspect ratio problem by using FitViewport but i want to dispose black bars which occur when resolution ...
0
votes
0answers
27 views

How can I simulate a basketball throw in LibGdx box2d?

So I want to simulate a similar throw like in the game Bouncy Basketball. Do i need to create a body and attach another body on it that would be the arm and then how would I apply force/impulse to the ...
0
votes
0answers
15 views

Scene2D set table cell size in percentage of tables ´s size

Is it somehow possible to set Scene2D table cell´s size in percentage of the table? I would like to have orientation independent menu, with buttons filling let´s say 75% percent of the screen, and ...
0
votes
0answers
48 views

Box2D Physics Crazy

I have a simple Box2D Game with a dynamic player, a static floor, and a matrix of gems. The problem is that the physics engine goes crazy. You can see in this video: https://youtu.be/iaH_ex8eVVk ...
0
votes
0answers
14 views

DragAndDrop release with pointer on payload

When I am moving my payload all the way to the corner it remains on the stage and my mouse goes over it when I then release (on a valid target) it returns null as a target and thus does not drop ...
0
votes
0answers
41 views

How can I make an Actor repeat the action on collision in LibGdx?

I want my EnemyActor to do this SequenceAction when it collides with my bullets. I have already done the collision. Now the problem is that it only does the SequenceAction once when it gets collided ...
0
votes
0answers
33 views

Move player with platform libgdx

I'm learning libgdx and I'm having a problems with moving platforms. I have a bridge class with float values for move_amplitude(distance the bridge moves) and move_time(duration it takes). The bridges ...
0
votes
0answers
45 views

LibGDX - Player Movement Flickers

So, I was programming a very simple LibGDX game, so I decided to include a player class into the program. Once I did that, the players image started to flicker/stutter while I moved it. Here's the ...
0
votes
0answers
61 views

Implementing BaseGameUtils with LibGDX for Google Game Services

I'm developing a game for Android in Java using Android Studio and LibGDX. I'm trying to implement the Google Game Services inside my game but I'm having trouble using the BaseGameUtils. Every time I ...
0
votes
0answers
41 views

gdx-video - Error: Failed to resolve: com.badlogicgames.gdxvideo:gdx-video:0.0.1

I would like to use gdx-video extension in my libGDX project, to embed a YouTube video. I have found this extension on GitHub, but there are several error messages during Gradle Sync process. I have ...
0
votes
0answers
26 views

Move/Rotate 3d multiple objects w.r.t. to one another in libgdx

I have two blender objects in .g3dj format. Below is the code : private void createBaseArm1(){ // Now load the model by name from asset folder baseArm1 = ...
0
votes
0answers
40 views

Lip Sync Sprite Animation in LibGDX

Is there any free sprite package to achieve lip syncing animation ? This is what I have in mind. User will input text The character will talk with the appropriate lip sync. I know there are ...
0
votes
0answers
32 views

How to run Kryonet server inside Libgdx project and is it ok?

I am trying to add multiplayer to my game and I used Kryonet. I have written the server, requests and etc and the only thing that is in front of me is how to run the server, it is in the libgx project ...
0
votes
0answers
36 views

get object location in 3d view libgdx

Below is the code of rendering the .g3dl model. I am trying to find the x, y, z co-ordinates of model's top view in 3d (Android) from origin (0, 0, 0) using calculateBoundingBox. I am stuck with no ...
0
votes
0answers
37 views

Box2D top down car weird spasm

im currently programming a 2d top down racing game with box2d and libgdx. i have a car body to which there are 4 wheels attached. these 4 wheels are attached with RevoluteJoints ( for the front ...
0
votes
0answers
35 views

Stretch Textures to screen width and height with StretchViewport

I have an orthographic camera that have viewportWidth = 540 and viewporHeight = 960. My backgrund texture is 1080x1920 pixels. How can i resize the texture to fit the camera using a StrechViewport. ...
0
votes
0answers
33 views

Doing collisions on both axis with java overlap

I'm making a top down game from scratch and just found out about the java rectangle overlap method that would work great for collisions. However, after the overlap happens, I need to check for which ...
0
votes
0answers
30 views

libGDX - “Hosting” a Viewport inside of a Scene2d Window

I am making a game using libGDX. I am trying to build some tools to use while developing my game, things like a scene editor or a scripting console. The tools are Scene2d widgets which I have in a ...
0
votes
0answers
68 views

Box2d - Texture lagging and flickering

I'm having issues with texture rendering in my game. I've done a lot of research and repeated the same steps of tutorials over the internet to render and update Sprite positions properly. Somehow, ...
0
votes
0answers
56 views

Libgdx and Box2D TiledMap render is not smooth

I'm building simple side scroller game. My player (square) move fast and it interacts with other world objects. Problem is when my player is moving it seems that all world is rendering somehow strange ...
0
votes
0answers
19 views

LibGDX: Is there any way to check if space between 2 bodies is free?

I know how to calculate the distance between 2 bodies in my game using Math.hypot(x,y); but I need to know if between those bodies the space is free, I mean, without any body.
0
votes
0answers
32 views

Have libgdx particles leave permanent sprites?

I am trying to figure out how to have enemies hit leave permanent blood splashes in my game, but I am not sure what direction to go. I am currently using box2d, just for defining my ligh-system with ...
0
votes
0answers
102 views

Water Rendering with LibGDX and LiquidFun

I'm very new to game development and I need some help with a renderer. Can somebody show some code for a Water renderer (and shaders if needed) using libgdx and liquidfun? I can render my particles ...
0
votes
0answers
34 views

LibGDX & Box2D Actor Collision

I'm working on a LibGDX project, and I was wondering about the best way to define actors in a collision. I know this is probably a common question, but specifically I'm interested in beefing up one ...
0
votes
0answers
44 views

How to get many rectangles and join them together into one polygon

I'm using LibGDX to make a platformer game in which I have a tilemap containing lots of instances of a Tile class. From the Tile class you can return a rectangle which represents the tile's position ...
0
votes
0answers
31 views

ChainShape in Box2D

I recently began to learn libgdx and I am stuck at a problem with the CainShape of Box2D. My first goal is to simply create a box with a ChainShape. In order to achieve that, I added four Vector2 ...
0
votes
0answers
23 views

Libgdx moving a body sequence

How can I move a body (box2d) to different points in an order. Like first it moves to 100,200 then to 200, 450 and so on? I've tried actions(and actor) but I can't get the point where the body is ...
0
votes
0answers
10 views

Waiting for scene2d action to be done?

I am trying to make the enemies in my turnbased combat game to do their moves. As it is right now, they will only move one step, but it will cost them 3 action points each. I think it might be because ...
0
votes
0answers
36 views

libgdx box2d car wheel circle collision with ground

I'm creating game similar to hill climb racing. I have created car (which is basically polygon with two circles) and ground generated by sinus. Now here is the problem: when my car try to climb in ...
0
votes
0answers
19 views

Creating & loading animation from one class in libGDX

i'm new to libgdx and i wonder if i can create all the animation for my game in just one class so i can just call it to my main game screen class,if it is possible can someone teach me how to do this? ...
0
votes
0answers
27 views

Libgdx tiled map not showing

I'm using a HashMap structure to store and load my maps made in tiled. Currently I have two and I am able to go from mapOne to mapTwo with no problems. But when I go from mapTwo to mapOne, mapOne ...
0
votes
0answers
51 views

My characters do not reverse their velocity, why? libGDX

I have been programming my game in libGDX for a while now and even watched a tutorial on youtube from Brent Aureli. The game I'm going for is kinda like Super Mario Bros but there is one problem that ...
0
votes
0answers
56 views

LibGDX: Problems creating custom actor

I am creating a custom class that extends from Actor,just like this: public class MyActor extends Actor { ProgressBar bar; Label nameLabel; TextButton button; public MyActor(String name, Skin skin){ ...
0
votes
0answers
45 views

HashMap or LinkedList

I'm working on a 2D game for Android using LibGDX in Java. In my game I got lots of enemies, bullets and other stuff. I hold a hash map, which every cell holds a reference to an array list of that ...
0
votes
0answers
35 views

Libgdx tiled map collision scale problem

I followed Dermetfans tutorials on youtube to make a collision tile map for use in Libgdx and I think I have some scaling problems related to the camera. I'm loading the map and the bottom left corner ...
0
votes
0answers
44 views

Alternative Sound lib with LibGDX

i'm making a 2D game for Android in Java using LibGDX. I find LibGDX sound management not good enough for me. I wonder if it's possible to use an external lib for playing and managing the sound and ...
0
votes
0answers
22 views

Libgdx inaccurate collision detection (no body2d)

So, I am developing a simple 2d game that has no need of body2d or over physics engines. I make my bodies update position by adding a specific velocity to them. The problem arises when I try to make ...
0
votes
0answers
50 views

Wrong Normal When Models is Close to Each Other

I have a problem regarding my Normal FrameBuffer that creates gaps between models. The image below contains 10x2x10 block (Minecraft style) and one character. The image is outputed through: ...
0
votes
0answers
41 views

Libgdx easy peer to peer connection

Background Information Since a few weeks I am trying to create a easy libgdx game... Maybe a bit similar to Binding of Isaac... But theres one thing which I want to implement as soon as possible... ...
0
votes
0answers
21 views

WorldController won't update in Libgdx

I am trying to refactor the code from the superkoalio. If I take out the updateKoala() and I put it in the new class, name it WorldController, it simply won't update the game when I call it from ...
0
votes
0answers
18 views

Maintain actor position when switching screen in maximized form Libgdx

I have for now 2 Screens in my Game. First is Loading Screen which loads the assets and then when I click the screen (I added ClickListener) takes me to other screen which is my Login Screen. Problem ...
0
votes
0answers
69 views

How to dynamically draw a filled polygon with a given array of vertices?

Say I have a simple array of vertices (or floats with every odd index being the X of a vertex and every even being the Y), how could I paint all the area between the vertices? As in, I have maybe ...
0
votes
0answers
51 views

LibGDX Scene2D.UI without Scene2D?

I'm currently programming a little game in LibGDX for which I planned to use Scene2D's UI aspects to make menus and a hud. When fiddling around a bit, I noticed that my Scene2D.Stage basically made ...
0
votes
0answers
21 views

LibGDX BoundingBox + pickRay issue

I've been following this tutorial for trying to be able to detect if I have clicked on a 3D model, but am running into some issues. Here's what I have — public GameObject getObject (int screenX, int ...