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
0answers
173 views

How to use HyperLink with Actor in Libgdx

I am making a quiz game using LibGDX. I want it to redirect to a website. I am using classes like Text and Label that extends Actor to write text using a bitmap Font. I have no idea on how to provide ...
1
vote
0answers
496 views

Create a touchpad-joystick using texturepacker2

I am adding a touchpad control to my game, using TexturePacker for loading images into the image-atlas. I have followed this tutorial to add the joystick. Everything is the same apart from the loading ...
1
vote
0answers
472 views

Libgdx Particle Editor: Blank UI elements

How can I get Libgdx Particle Editor to run properly on my 32-bit Windows 7 machine? When I run it, the UI elements are blank like this:
1
vote
0answers
2k views

TileMapRenderer in libGDX not drawing anything

So I followed the tutorial on the libGDX wiki to draw Tiled maps but it doesn't seem to render anything. Here's how I setup my OrthographicCamera and load the map: camera = new ...
1
vote
0answers
186 views

Blending effect on textures

Hi i am trying to build screen animation like flickering, interlace, color separation similar to old style malfunctioning Amiga screens. The intended effects are shown in this video. I am using ...
1
vote
0answers
170 views

Parenting Opengl with Groups in LibGDX

I am trying to make an object child of a Group, but this object has a draw method that calls opengl to draw in the screen. Its class its this public class OpenGLSquare extends Actor { private ...
0
votes
0answers
5 views

Box2D - Slow movement on bodies when some are above others

I set a random position around the screen to some circle bodies with 1f density. And when some of them are above other bodies, they move until they dont touch each to other. I want this movement, but ...
0
votes
0answers
13 views

balloon with libgdx, impementation of FixtureDef.density, gravityScale, linearDamping?

I use libGdx/box2d's physic. My intention is to create a balloon filled with helium (a body, what hovers above a surface, if we apply a little force to it - it moves fast but not far, if we push ...
0
votes
0answers
14 views

Design a grid with draggable Actors

A quick overview about what i want to do. I want to make a grid 5x5 centered in the screen in which each cell can contain an Actor that can be moved in another cell. An Actor can be of any type, ...
0
votes
0answers
25 views

NullPointerException in android.app.Activity.onCreate(android/app/Activity.java:874)

I'm trying to get libGDX 1.6.1 to run on Android via Ruboto. So far, I: Generated a new libGDX app using the app generator Got the desktop app to run (Java) Got the android app to run (Java) ...
0
votes
0answers
34 views

Libgdx performance on old devices

I'm developing a game in Java for Android, using LibGDX. I'm using Nexus 5 to test my game most of the time and it works great (Minimum FPS it gets is 57 out of 60). Recently I ran my game in Galaxy ...
0
votes
0answers
18 views

Box2D collision between dynamic body

I'm implementing Box2D for my 2d top down LIBGDX game and i have some struggle with two dynamic body. Currently, my two bodies are created that way : BodyDef bodyDef = new BodyDef(); ...
0
votes
0answers
24 views

How to “pause” stage actors listeners

I have a problem with multiple stages and listeners in libGDX. I have GameScreen with gameStage (contains game elements), uiStage (score label and pause button) and pauseStage (resume, restart and ...
0
votes
0answers
34 views

Smoothly move a Box2D body to target position

I am using java, LibGDX and Box2D. I could opt to move my player from the current position to a target position using the setPosition() method many times, in order for the body to move "smoothly" to ...
0
votes
0answers
14 views

Error in projecting coordinates from FitViewport to screen in LibGDX

i'm using a FitViewport to render my "game world". Viewport virtual dimensions are fixed 400x240. I use viewport.unproject method to scale input touches from screen coordinates to world coordinates, ...
0
votes
0answers
18 views

3D Model is existent, but not rendering in LibGDX

I'm trying to render a simple model in libgdx. I tried ObjLoader, G3DLoader, and Asset loading but nothing works. I know the Model is actually there because when using a different batch besides the ...
0
votes
0answers
17 views

Raycast trouble

i'm having some trouble with the RayCast. I'm raycasting from the player position and my mouse position. I have this situation : http://i.imgur.com/h7iplnY.png (the white line is a representation of ...
0
votes
0answers
13 views

LibGDX : Textfield input type

I want to change TextField input type . When I click on the textfield the android keyboard appears with all the symbols , but I want only numbers and dot (.) . TextFieldStyle textFieldStyle = new ...
0
votes
0answers
41 views

LibGDX with Parallax Camera, unable to accurately select objects

So, basically I borrowed the ParallaxCamera test that LibGDX provides and got the camera set up rather nicely. However, I noticed that when I specify a speed other than 1, my game objects shifted ...
0
votes
0answers
17 views

LibGdx scaling properly

I've mad use of view ports and they do what they say they do, but the problem is I'm not able to get it to scale the whole world with it. The game is for android which it looks nice on but desktop is ...
0
votes
0answers
24 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 ...
0
votes
0answers
23 views

TiledMap blocks makes Animation invisible

////////////////////////////////////////////////////////////////////////////////// Got it fixed. Thanks to anyone who tried to help me. New Code: mapManager.render(); ...
0
votes
0answers
19 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 ...
0
votes
0answers
15 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 ...
0
votes
0answers
25 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); ...
0
votes
0answers
13 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
0answers
8 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
26 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
43 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 ...
0
votes
0answers
30 views

LibGDX , Box2D body Mass Center

I am creating complex bodies using this editor. But the mass center of the body is not in the right place , when I apply force to it it begins rotating . So I am confused why is the masscenter in the ...
0
votes
0answers
32 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 ...
0
votes
0answers
212 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 ...
0
votes
0answers
29 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?
0
votes
0answers
61 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
0answers
77 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
0answers
31 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
0answers
70 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. ...
0
votes
0answers
30 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 :
0
votes
0answers
34 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 ...
0
votes
0answers
202 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
46 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
50 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
0answers
42 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
29 views

Shaperenderer not showing any shapes

I'm trying to use the shape renderer in LibGdx, but I don't see anything. I followed the docs as well, but nothing appears. Is there something wrong with my setup? public class MyGame extends ...
0
votes
0answers
50 views

Libgdx trying to get reflection of ball with plane in 3D space

I just cannot seem to get the right reflection result. Have tried reordering the operations but none seem to work. Hoping someone might tell me what I am doing wrong. Trying to accomplish the formula ...
0
votes
0answers
104 views

(LibGDX/JAVA) How can I get a rectangle to rotate with this pendulum so I can start detecting collisions?

One of the objects in my game is a pendulum that swings in a semi-circle. This is done by having an update() method like this: public void update() { angleAcceleration = +1.81 / length * ...
0
votes
0answers
29 views

Connect lightsource with object in Libgdx

I want to make an minimalistic highway chase game in LibGDX, but I have a question. Can I attach a source light to an object so gravity will affect the source light, by pulling it down? One solution ...
0
votes
0answers
98 views

Sprites not being rendered on screen change - Android Libgdx

In my game over screen for my Libgdx Android game I've the following code which starts a new game upon a screen touch. if(Gdx.input.isTouched()) { ScreenManager.setScreen(new ...
0
votes
0answers
71 views

Dijkstra Pathfinding in Libgdx, some minor problems

I'm having some problems with my Dijkstra implementation in Libgdx. I understand that there are already AI libraries that can probably do this much simplier but this is a school assignment so i'm ...
0
votes
0answers
72 views

player sprite hidden after using a stage (scene2d library)

What i'am doing is showing a tiledmap on the full screen , and it works fine. The character moves perfectly and the camera too. What i want is : Showing some text or imageButton over the map like ...