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
1answer
443 views

Random Sprite Speed

I followed the Rain Catcher tutorial from libGDX and I made some modifications to the code, allowing the rain drops to appear faster. But I cant figure out how to make the raindrops fall at random ...
1
vote
1answer
874 views

Android APK export duplicating libgdx assets folder

I'm developing a game using libgdx targetting Java desktop and Android. For the assets I have a "data" folder inside the "assets" folder in the Android project. Then, I link it from the desktop ...
1
vote
1answer
901 views

Errors on LibGDX tutorial

I get the following errors on the LibGDX tutorial "Simple App" Exception in thread "main" java.lang.UnsatisfiedLinkError: no gdx64 in java.library.path at ...
0
votes
2answers
2k views

libGDX application does not support 800x480 resolution

I have an application written with libGDX that does not run with a resolution of 800x480, whereas on devices with other resolutions (e.g. 480x320) it works perfectly. It also works perfectly as a ...
0
votes
1answer
1k views

Virtual screen size with libgdx and GLES 2

I've been trying to use a virtual screen size for my libgdx desktop-android game. I'd like to always use a 16:9 aspect ratio but with a virtual screen size so everything would adapt automatically ...
1
vote
0answers
148 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 ...
3
votes
2answers
766 views

How do I show a minimap in a 3D world?

Got a really typical use-case here. I have large map made up of hexagons and at any given time only a small section of the map is visible. To provide an overview of the complete map, I want to show a ...
4
votes
5answers
11k views

What is the proper way to remove a box2d body from the world in libgdx?

I'm wondering how to remove the body from the world, because I found an error when I tried. I found following error. java: ...
1
vote
1answer
429 views

Removing the circle outline rendered on Box2d CircleShape

How can I remove the outline on the CircleShape below? CircleShape circle = new CircleShape(); circle.setRadius(1f); This is what I'm using to draw: batch.draw(textureRegion, position.x - 1, ...
1
vote
1answer
2k views

How does the rectangle bounds (x,y,width,height) in libgdx work?

I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2 or 3 examples with that are: <!--this is the pause button in the top right ...
4
votes
4answers
797 views

More efficient in range checking

I am going to use a specific example in my question, but overall it is pretty general. I use java and libgdx. I have a ship that moves through space. In space there is debris that the ship can ...
2
votes
3answers
4k views

On screen controller for libgdx games?

Does anyone know a better controller for 2D Games than a virtual on screen joystick? The pros of the joystick are: Easy to implement for developers Familiar interface for users But there is a ...
-3
votes
2answers
802 views

How to create Executable Jar [closed]

When I run a jar file I created, I get the following error, so please someone help me out of this: Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't ...
3
votes
1answer
444 views

Photon alongside LibGDX

Can anyone point me to a possible implementation of the Photon network engine along with LibGDX for Android? Or any multiplayer networking SDK for all that matters. From reading source code it ...
-3
votes
1answer
523 views

Different texture for multiple resolution

How to use different texture(image) for different resolution in libGDX? Also specify how to detect it from asset folder?
3
votes
1answer
3k views

How do I move the camera sideways in Libgdx?

I want to move the camera sideways (strafe). I had the following in mind, but it doesn't look like there are standard methods to achieve this in Libgdx. If I want to move the camera sideways by x, I ...
2
votes
1answer
4k views

How do I properly implement zooming in my game?

I'm trying to implement a zoom feature but I have a problem. I am zooming in and out a camera with a pinch gesture, I update the camera each time in the render, but my sprites keep their original ...
1
vote
1answer
4k views

LibGDX Box2D Body and Sprite AND DebugRenderer out of sync

I am having a couple issues with Box2D bodies. I have a GameObject holding a Sprite and Body. I use a ShapeRenderer to draw an outline of the Body's and Sprite's bounding boxes. I also added a ...
15
votes
2answers
26k views

Where are all the tutorials for libGDX? [closed]

I've searched online for help and tutorials on LibGDX but I couldn't really find any, except and the wiki for asking questions on stackexchange. Besides the source (demos) and wiki, is there any other ...
5
votes
3answers
11k views

LibGDX tutorial help Scene2D

I'm having trouble understanding this tutorial. It defines the importance of classes, but it doesn't show an outline of the project file so far. From what I got from that tutorial was that there is ...
5
votes
5answers
6k views

Why do I get this file loading exception when trying to draw sprites with libgdx?

I'm having trouble with the "Drawing Images" section on the libgdx tutorial. I set up the documents completely and I typed the code as follows: public class Game implements ApplicationListener { ...
5
votes
1answer
3k views

Box2D Difference Between WorldCenter and Position

So this problem has been brothering for a couple of days now. First off, what is the difference between say Body.getWorldCenter() and Body.getPosition(). I heard that WorldCenter might have to do ...
3
votes
3answers
235 views

When is it best to load screens in mobile games?

In the develpment of a mobile game, is it a good to load all the screens at the start of the game, or destroy and create new ones during the game? I am doing the second thing, because I suppose that ...
2
votes
1answer
1k views

Why wont the LibGDX's main class Initialize on Android Launcher?

So I was searching for different ways that could suit me in programming and came across LibGDX. Naturally I looked at the tutorial. As I was doing it, I was following the steps word for word, except ...
0
votes
3answers
1k views

How would I generate random falling objects

I'm creating a game using libgdx on Eclipse that is similar to Ragdoll Avalanche. I'm looking for a way to generate falling objects like the triangles of Ragdoll Avalanche. All I know that i have to ...
2
votes
2answers
4k views

Change alpha to a Frame in libgdx

I have this batch.draw(currentFrame, x, y, this.parent.originX, this.parent.originY, this.parent.width, this.parent.height, this.scaleX, this.scaleY,this.rotation); I want to apply the alpha that ...
1
vote
1answer
3k views

Using NinePatch in libGDX for Loading Bar

I am trying to create images for a loading bar in libGDX. I came across the NinePatch class and I was hoping to use it for this loading bar, since stretching images with a plain Texture or Sprite ...
2
votes
1answer
3k views

Using the same font with different sizes in libgdx

I am using BitmapFonts, LabelStyles and Labels for my texts. I want to resize some labels, so i use this. fontType.scale(-.6f); LabelStyle style = new LabelStyle(fontType, Color.WHITE); titleLabel ...
4
votes
1answer
3k views

libGDX Multitouch Controls

Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
4
votes
1answer
5k views

Using the AssetManager in LibGDX

I am trying to use the AssetManager class in LibGDX and I understand how it works but I am trying to implement a loading screen. I have followed the AssetManagerTest.java file here, but I am having a ...
5
votes
3answers
7k views

Changing the color of a sprite at runtime

Is there a form to change the color of a sprite in runtime?} I have a black point loaded with an image, but i dont want to load various images with different colors, is there a mode to change the ...
1
vote
1answer
4k views

Waiting specific time to increase sound libgdx

I want to wait a moment (.5 seconds) before I increase the sound, how can i achieve this without using Thread.sleep, because i want my game to keep runnig.
1
vote
0answers
313 views

Which game engine is more worthwhile for mobile game development [closed]

I have been thinking of starting to learn mobile game development. I recently learned that there are three popular game engines available for android: AndEngine cocos2d-android libGdx you guys ...
1
vote
5answers
2k views

Errors happen when using World.destroyBody( Body body )

on Android application using libgdx, when I use World.destroyBody( Body body ) method, once in a while the application suddenly shuts down. Is there some setting I need to do with body collision or ...
0
votes
1answer
1k views

removing box2d objects before collision occurs

I am having a problem with a collision detection between the character and items, both created as box2d objects. What I am trying to do is to delete the item or remove item from the collision method ...
0
votes
1answer
2k views

Creating lots of sprites dynamically in libgdx

I´m creating Groups that contains Sprites and adding bodies with box2D, but when I create many of this my animation gets very slow. How can I handle it?
6
votes
1answer
1k views

SQLite in libGDX

Does anyone have an example of how I can use SQLite in libGDX? I have a class in my original Android code that allowed me to easily access a database but I can't seem to find anything equivalent to ...
1
vote
1answer
801 views

Scaling bodies in box2d and libgdx

Is there a way to scale the bodies made from vertexes (like a guitar), i was trying to multiply each vertex point by the scale value but c++ mark an assertion failed, is there a mehtod to do this? I ...
11
votes
3answers
13k views

Resolution Independence in libGDX

How do I make my libGDX game resolution/density independent? Is there a way to specify image sizes as "absolute" regardless of the underlying density? I'm making a very simple kids game; just a bunch ...
0
votes
1answer
912 views

Maintain speed in box2D body

I want to delimit my speed and to maintain that speed constantly, but it gets getting higher and if i apply the linear velocity it doesnt bounce :/, Here is te part of my code double fx = ...
0
votes
1answer
838 views

libgdx spite position relative to body

Apologies if this is a reiteration, as I couldn't find another discussion of this over the past couple days. Issue: I'm using libgdx and box2d, and I'm currently updating the sprite's position to ...
2
votes
1answer
2k views

Speed of bodies in Box2D and libgdx

I want to move my bodies at higher speeds, but they have a top speed. I have an Ortoghraphic camera defined at 800x480. My world doesnt have gravity. I apply an impulse of 1000,and a force of 1000 ...
0
votes
1answer
385 views

Make a callback to android methods from libgdx

How can I make a callback from libgdx to an Android method? I want to use the method to overwrite a file in the internal memory.
1
vote
4answers
7k views

How do I save files with libgdx so that users can't read them?

Writing my game in libgdx, I arrived at the point when I need to save the player stats and the info of the levels. However, in libgdx it's not allowed to write the file inside folder of the ...
6
votes
1answer
860 views

What methods should save/load a game state

There are a lot of articles about how to save a state of a game and they are pretty good. But I have one conceptual misunderstanding where should I save the state? My game has number of screens and ...
2
votes
1answer
3k views

Pop up screen on libgdx

Hi I want to make a pause and credits screen for an android game with libgdx the idea I have is creating a new screen like a popup that pauses the background screen and then, I can render the screen I ...
0
votes
1answer
3k views

How to know if an actor is touched in libgdx?

I am using "Gdx.input.isTouched()" in the render method of my Screen method, to know where is touched, but when the touch is dragged in the screen, it also activates the events i want only when an ...
5
votes
2answers
2k views

Detect if a sprite has left the camera in libgdx?

Is there a method to know if a sprite has left the camera of the stage? or I have to do my operations? :P
2
votes
1answer
1k views

Relative and absolute position with sprites in libgdx

In libgdx, can i add a sprite as children of another an set it with the relative coordinates of the father and not the stage? Like in HTML when you add controls they are relative to its parent, but ...
0
votes
1answer
2k views

How to use the actions of the actors in libgdx?

I'd like to know if someone has already used Actions in the actors, and how to use them. I don't know how. I want to rotate an Actor.