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

1
vote
2answers
19 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
18 views

LibGDX implement leaderboard [on hold]

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

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

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
22 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
20 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
29 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
14 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
26 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
0answers
36 views

How to implement something as shown in the picture [on hold]

I am trying to make a game using libgdx framework problem: Initially screen is blank,then blue ball enters the screen from top, when blue ball reaches middle red ball enters,when blue ball reaches ...
0
votes
1answer
38 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
20 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
votes
0answers
27 views

Where can I find up to date LibGDX tutorials? [on hold]

I've searched day and night, rain and shine, high and low, and I still cannot find up to date tutorials for LibGDX. I don't want to develop games for Android, but all the up to date-ish tutorials are ...
1
vote
0answers
10 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
10 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
27 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
44 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
22 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
34 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
49 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
18 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
49 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
25 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
12 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
28 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
36 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
48 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
19 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
15 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
35 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
27 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
81 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
25 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
22 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
49 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
37 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
21 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
28 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
69 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
69 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
31 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
23 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 ...
0
votes
1answer
28 views

How can I update a Stage-based HUD from another Stage's Actor in libGDX?

I feel like this is a simple problem, but I'm having issues finding the correct search terms. I have a Screen that includes two Stages. The first, stage, contains a number of objects deriving from ...
-2
votes
0answers
26 views

libGDX interface cannot be applied error

I would like to use interfaces in libGDX. I get an error in AndroidLauncher before compile. It says for this line: initialize(new MyGdxGame(actionResolverAndroid), config); .... cannot be ...
1
vote
0answers
27 views

Import Unity 2D objects in Libgdx

I'm using Libgdx to do some simple home projects. I'm trying to make a simple 2D game with Box2d using R.U.B.E as editor. I create a 2d terrain in R.U.B.E now I want to create the terrain texture. I ...
0
votes
0answers
309 views

Body gets recreated [closed]

In my game you have the Square, which is the player, and the Circle which is the enemy, the player carries a weapon, when shooting the game calculates where to place the bullet in relation to the ...
0
votes
1answer
63 views

Implementing Spine animations in Libgdx

I've been searching a lot for a guide on how to implement 2D animations exported from Spine to Libgdx, but all I could find was outdated tutorials and source codes. I can handle basic Libgdx but Spine ...
0
votes
0answers
31 views

error in post a screen shot of game scores with Android Intent in LIbgdx game

I want to post a screen shot of my game on social apps. I have developed this game using Libgdx framework. I have created an interface in Core class. Here is its Intent share specific code. ...