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
12 views

Libgdx understanding screen size

I'm trying to create my own jumper type game where the player moves up through an infinite y value. The problem I am having is getting the screen size to match up with the android screen. viewport ...
0
votes
0answers
25 views

Render 3D model files like dwg,.fbx,.obj on Android. Which 3D engine should i choose? [on hold]

I am an Android/Java developer and i don't have any experience/skills in gaming and c/c++. I have to create an application for android, This application should be able to load the 3D model ...
0
votes
0answers
17 views

LibGDX strange status bar in background [BUG]

I released an app and I noticed that some devices has a strange "bug" which I don't know if it's caused by Android, me or LibGDX. That bug is related to status bar, normally app let you see the bar ...
1
vote
1answer
26 views

Smooth Shapes in libgdx using ShapeRenderer

I am using ShapeRenderer in libgdx to draw my only character to get rid of texture in my game. But I am not getting quality results. Circle edges are distorted. I tried with high resolution and also ...
1
vote
0answers
23 views

LibGDX music doesn't play anymore after x times

In my App I added two sounds, the first is played when the gamescreen start the second when the game is going to game Over screen. Everything works fine but after about 12-13 games the second sound ...
0
votes
0answers
6 views

Eclipse import Gradle project download takes forever [closed]

I tried to generate a project with libGDX and then import it into Eclipse but it takes more than 5 hours on downloading dependencies, however, it works fine from the command line but not Eclipse or ...
1
vote
1answer
19 views

Actor not taking touch libGDX

I am trying to handle the touch of one of the Actors in the stage. The following is the code I have written: public class MyGame extends ApplicationAdapter { private GameStage gameStage; //Game ...
0
votes
0answers
14 views

Libgdx Music error QCMediaPlayer mediaplayer NOT present

Problem solved with music = Gdx.audio.newMusic(Gdx.files.internal("song.mp3")); I am looking for music implementation in my app with LibGDX. I saw the guide provided in LibGDX documentation but it ...
1
vote
2answers
46 views

Load a simple text file through asset manager in libgdx

It's easy to load a simple text file from the internal: Gdx.files.internal("data/colors.txt"); But I currently use an AssetManager to load assets that are defined in an array of ...
0
votes
0answers
30 views

LibGDX implement leaderboard [closed]

I am looking for leaderboard implementation in my app. I use libGDX and I found this guide: http://theinvader360.blogspot.it/2013/10/google-play-game-services-tutorial-example.html . If I implement ...
-3
votes
0answers
38 views

Which is the best Platform/Engine for a beginner for developing an Android game with following specifications [closed]

This is a very general question for which I wouldn't mind getting equally general answer. I want to develop a simple 2D android game with following specifications: 1> A 3D object that rotates in all ...
2
votes
1answer
38 views

Endless Running Game - Changing Lane Function in JAVA

I am developing a kind of vertical endless running game, where the character has 4 possible lanes to be in. I am using libGDX and want the character to change lanes by adding a horizontal velocity to ...
0
votes
1answer
22 views

Libgdx inputlistener scrolled is not working

I am currently using libgdx. Below codes are added to a stage. this.addListener(new InputListener() { public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { ...
0
votes
1answer
54 views

BitmapFont - where is getBounds method in new 1.6 libGDX

I download newest libgdx version 1.6 and i cant solve problem with center my BitmapFont text. Earlier in version 1.54 i used getBounds() method to find out width of text. Share your solutions, thanks ...
0
votes
0answers
20 views

libGdx extending the simple game tutorial texture in screen is not working

I have been following this tutorial in the libGdx wiki. I copied and pasted the code as is into my IDE (Android IDE because I do not have a computer to run Eclipse on and don't want to fork up $200 ...
1
vote
2answers
35 views

How to get this type of movement in LibGDX?

I want objects in my game to move randomly but always from right side of the screen to the left side. The movement must be as smooth and natural as possible, like they are following a path. Can i ...
0
votes
1answer
43 views

Libgdx using Box2d with TiledMap to create collision detection

I'm fairly new to Libgdx and have some good basic knowledge on Java. Right now I am stuck on how to add collision to my TiledMap, I am using the Mapeditor to create the tilemap. I read so many ...
1
vote
0answers
25 views

libGDX: Linking 3D scene from 2D screen

Using libGDX I have created a few 2D screens, such as a splash screen and a main menu, and also created a 3D scene which I want to be able to load when clicking a button on the main menu. I know how ...
1
vote
0answers
11 views

LibGDX and Sound Priorities

According to a post I found, the setPriority of a Sound in LibGDX is not only a hint, but does nothing on desktop, and I can confirm this. I really need priorities for sounds in my desktop game. The ...
0
votes
0answers
15 views

LibGDX, Box2D , Destroy body into parts

I am developing a game using libGDX game engine and box2d physics engine. There are asteroids in my game, I want to destroy their bodies randomly and fill with texture. How can I do it?
-1
votes
3answers
34 views

Which is the best method implementing a background scrolling for game in libgdx?

My question is very simple I am new to libgdx development, which is the best approach implementing a background that is to make the background move in y direction 1)My First approach is drawing the ...
0
votes
1answer
51 views

LibGDX collision with rectangle and circle

I have 2 objects, A and B, both are classes with only values, so positions and dimensions are only values (float posX,posY). I have a render class which render A and B with shapeRenderer; A is ...
0
votes
0answers
27 views

Building levels for use in LibGDX

I'm working on a 3D shooter game using LibGDX and was winding how I would go about building levels that I could import into my game easily. I'm using Blender as my modeling software and I've heard of ...
0
votes
1answer
27 views

LibGDX destroy object when not used

I am developing a game where objects move in the screen. My object is instantiated in Y = 0 and I want to destroy this object when it goes under the screen Height. So if (positionY >= ScreenHeight) I ...
-1
votes
1answer
36 views

Java libgdx get clicked square without iter

I would like to detect which square is clicked without iterating over all elements! i don't want to do this anymore for all elements. if( x >= this.getAnchorX()-HalfWidth && x <= ...
0
votes
0answers
52 views

Why does physics interpolation give me periodic jumps/flickers?

I have seen this question but it didn't solve the problem. I have followed the same steps as in this article. What I notice in my Android game is that my interpolation alpha (or fraction or ...
0
votes
1answer
19 views

How to run a method after a scene2d being rendered in libGDX

I want to make a screenshot with ScreenUtils.getFrameBufferPixmap(x, y, w, h); I call this function in Actions.run(new Runnable{...}) in scene2d.ui, and the problem is that actions are called at ...
3
votes
2answers
54 views

How to stop deltaTime while debugging

Framework: LibGDX IDE: Android Studio Game based on Kilobolt tutorial While debugging, the frame delta time i get using Gdx.graphics.getDeltaTime()continues to increment so when i stop debugging ...
1
vote
0answers
27 views

LibBDX create a tail when the object is moved

I am looking for a way to implement in my game a kind of shadow/tail which will be displayed after the object is moved. Should I use animation? If yes how? Here an example:
0
votes
0answers
26 views

LibGDX make an object rotate around something

I need to rotate and object, which should be a circle made up with a ShaderRender, around a specified point. In LibGDX there is a method or something which allow me to do this? If it doesn't exist how ...
0
votes
0answers
13 views

How to zoom and scroll in libGdx?

I am trying to both A.) Pinch zoom my game scene and B.) Move (scroll) my game scene but I have not found many examples. I learn more by examples than by reading API documentation (although I am ...
0
votes
1answer
35 views

Libgdx Actor touch undetected

I am looking for detect touch in an actor. The touch in my game is detected in wrong part of the screen. I want to detect touch only on the red circle, here is the code: Static_values public class ...
0
votes
0answers
40 views

How to smoothly display opponents in realtime multiplayer game

I'm implementing a small-scale multiplayer racing game. As of right now, the client sends updates to the opponents on a fixed interval (or as fast as possible), containing location on the map etc. ...
-1
votes
1answer
51 views

Libgdx detect touch on a specific object (while moving) [closed]

I have a class (I'll call it with letter "A") and class B. A is the object (as a character) and B is the rendering class which have the aim to show A. I am looking for a way to detect when A is ...
0
votes
1answer
20 views

Libgdx bouncy effect in a wall

I have an element inside the screen and I want to set my phone's bounds as a wall where elements are bouncing. I want it to be physically correct. How to do this?
0
votes
0answers
16 views

Libgdx draw random wavy lines (similar to sinx)

I am looking for drawing a wavy road. It must be random and I have to add an hitbox on its bound, how can I do it? I want drawing red objects Example :
1
vote
1answer
38 views

Why value 1 in OrthographicCamera viewPort width?

So, I read that camera = new OrthographicCamera(1, h/w); creates a camera with an appropriate width and height for the field view.. However, I can't understand that value 1 for the viewport width, ...
1
vote
1answer
39 views

What are the steps for creating level in Libgdx with Box2d?

I have been trying to learn game programming for a week, although I have a good knowledge of programming. I don't understand some steps of game design. I'm recently working to clone the iSlash ...
2
votes
0answers
29 views

LibGDX's HTML project doesn't show anything in Browser

The question is self explanatory, when I run my demo-html project as a Web Application and I open Chrome with the provided link by eclipse, my browser doesn't show the image it is supposed to show in ...
0
votes
1answer
88 views

LibGdx - How can I correctly handle tile transitions / connected textures?

So I am making a tiled game and I need to connect textures correctly based on whats next to it. With tiles that had connection really close to the edge of the tile I could just use the 4 bit meathod ...
0
votes
0answers
27 views

How to draw square composed of four triangles ? ( libgdx )

I've a case in which I need to draw square composed of four triangles like in the photo bellow : The triangles parameters are stored in the JDBC , I know how to draw shapes in Lbgdx but this kind ...
-1
votes
1answer
28 views

Libgdx Drawing a triangle cannot resolve method “render ”

I am looking to draw a triangle. I found a lot of code such as : https://github.com/libgdx/libgdx/wiki/My-First-Triangle-%28Example%29 The code I found are old I think; if I use ...
0
votes
0answers
69 views

Android Studio libgdx multiplayer

Does anyone know if it's possible to setup a multiplayer game using libgdx in Android Studio? I've been trying to convert my game to multiplayer using all kinds of tutorials on libgdx & ...
0
votes
0answers
38 views

How to get GestureDetector to work?(Problem with GestureDetector class)

I am trying to write simple program which would get input from user by swiping in four capital directions. I'm extending GestureDetector.java from libGDX and overriding fling method, but no matter ...
0
votes
0answers
23 views

LIBGdx - Kryonet with an InetSocketAdresse

I'm trying to implement Kryonet in my game and i'm facing some trouble. Using the source from the code i develop my server like that : try { this.server = new Server(); ...
0
votes
0answers
32 views

LibGDX Android Unclickable buttons on Dialog

I'm using the libgdx for a simple pong game only for Android and I'm trying to show up a dialog when the back button is pressed. My activity implements Screen, InputProcessor and in the keyDown ...
0
votes
2answers
71 views

How would I create classes for each map tile instead of using a tmx? LibGdx

I am making a top down style game using LibGdx that I want to be randomly generated each new game load. I already have the algorithm to generate the array for what tile should be what. But i'm ...
0
votes
2answers
84 views

Java libgdx Game Screens and rendering tile map [closed]

I'm working on a 2D tiled game with Java and libGDX. I'm having problems implementing gamescreens. I'm trying to set the screen to gameScreen and start rendering tiles, but I'm getting a nullpointer ...
0
votes
0answers
36 views

run animation one cycle when button is pressed in libgdx

I have been searching for a while now and i cant find how to run my animation a complete cycle when a button is pressed, the animation runs as long as the button is pressed but the animation takes a ...
0
votes
1answer
27 views

LibGDX full screen display mode and camera resize

I'm creating a simple 2D platformer and I have problem with my camera y position when I enter full screen mode. But first here's my code screenY = Gdx.graphics.getHeight(); public void ...