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

Should I use single state or multiple state of an entity in finite state machine?

In the below code, is the options I've created whether to use single or multiple states for my character or other entity. Still can't decide which one is better inf using state machines. public enum ...
-4
votes
0answers
18 views

Splitting TextureAtlas into Textures [on hold]

I have a TextureAtlas file (pack file) and png file only I want to split it back to textures which I don't have Libgdx tools has texture unpacker can I use it ? or any other programs if it doesn't ...
2
votes
2answers
66 views

Grid-based smooth lighting

I implemented basic lighting in my game and I want to turn it into smooth lighting (like this). I'm currently tinting the tiles based on their light level and I have no problem changing it. My current ...
1
vote
2answers
72 views

Why is there no glClear() and glClearColor() method in GL30?

In the GL30 interface, both the methods glClear() and glClearColor() are absent. I tried to call the method Gdx.gl30.glClear(GL30.GL_COLOR_BUFFER_BIT) inside render() but it threw me a null pointer ...
1
vote
1answer
24 views

Problem in nested parent-entity relationship in ecs

In the given flow, the character is the parent entity, gun is child of character and bullet is child of gun. I've got a component called NodeComponent which has the storage of child entities and a ...
1
vote
0answers
12 views

LibGDX TexturePacker line problem

I'm trying to use a TextureAtlas for all my textures for better performance. Every time my game starts all my tiles are packed into one texture atlas. I have put following code into my DesktopLauncher ...
1
vote
0answers
20 views

Resetting Achievement Progress for testing

Hi I tried to reset the achievement Progress, but it is NOT resetting the increment count and i want to delete and create a new achievement each time for testing. Is there any workaround to solve this?...
1
vote
0answers
31 views

Move to specified coords - libgdx and java

So I am making my bullets go to a point and travel further. Only its acting really really weird. Its like its thinking that the 0,0 location is at the top left instead of the bottom left. This is the ...
3
votes
1answer
253 views

Scene2d Stage Actor setup issues

I am creating a game using libgdx. In the same each level has a class. I have stage as a member variable of the class. To this stage, I add actors. Inside the levels class, I have attaced the input ...
1
vote
1answer
33 views

How to avoid position increment by velocity multiplied by delta time even the body is not moving?

In the below image, the character texture is properly sync to body even moving on free space. In the below image, the character is moving downward. But the texture got a span or not sync properly, ...
2
votes
1answer
32 views

Handling data logic on libgdx ai state machine or in ashley system?

In this below example, I've combined libgdx ashley and AI state machine. Do you think it's a good idea to handle the logic in state machine or stick on handling the data logic on System? public enum ...
1
vote
2answers
28 views

How to handle Tilled Map z index order with player in libgdx?

The below 1st image is the example how I render tiled map with player, I can properly change the player z index, If I want to make the player below the box i just set the z index to 0. But the problem ...
1
vote
0answers
23 views

Why it takes some time to update the sprite draw order in libgdx SortedIteratingSystem?

I have a rendering system that extends SortedIteratingSystem and created a comparator to sort the sprite draw order. But the problem is when I update the z index, it takes some time before it changes ...
2
votes
2answers
67 views

LibGDX game crash without errors (maybe AssetManager)

i have a problem with my game. It's a endless run shooter/platform made with LibGDX (Scene2d and box2D). I do tests with LG G2, LG G3, Galaxy s4, desktop and android emulator and i have no one ...
0
votes
0answers
31 views

Should I use finite state machine with entity component system? [on hold]

In the below code, is the components that is required to have a state. AnimationComponent MovementComponent AIComponent Where I'm at now: I've create a different State and Handle it using fsm or ...
1
vote
1answer
138 views

LibGDX - How to export a texture as a .png onto, say, the desktop

I'm making a game in which I need to export a texture which the user has edited as a .png into a specified location. I'd like it if I could have the default saving window thing (like on other apps ...
2
votes
1answer
94 views

Box2D fixed timestep updating is twitchy on constant FPS

I'm messing around with libgdx and box2d and I'm trying to implement sidescroller movement with fixed timestep logic according to the famous Fix Your Timestep! tutorial/guide. However, logic updating ...
1
vote
2answers
60 views

Should I have one asset manager and unload and load with different gamestates? Or should I have one for each gamestate?

I am working on a LibGDX game and I would like to find out the best way to manage assets. Should I have one AssetManager that is passed through to my GameState init() method to load from each level, ...
1
vote
2answers
44 views

How to use GdxAI with libgdx ashley ecs framework?

I'm planning to use GdxAI Telegraph in GdxAshley ecs framework, my problem is how I'm gonna create a telegraph component if I wanted to dispatch a message? I have created AIComponent and AISystem. ...
0
votes
1answer
54 views

Google Games Services Display Orientation

I'm developing a game using LibGDX and I'm using BaseGameUtils to implement Play Games Services in it. It's working very well. But my game is in landscape mode, so when I call leaderboard or ...
3
votes
3answers
332 views

LibGDX - Can't read .ttf file when running Android configuration

when running or debugging my game on android device, i get this error in the logcat: com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: data/fonts/myFont.ttf (Internal) which is ...
3
votes
1answer
81 views

Using LibGDX, is it necessary to clip what I'm rendering for efficiency?

So I am working on a game, and I've noticed that everything in the world is sent to be rendered. Of course with the camera, only some of the world is rendered. Does this mean there is there any ...
0
votes
0answers
12 views

What tools and formats are used to express motion graphics animation [on hold]

I'm developing a game application, I want to dwell on object motion designing in the menu scene in my game. Currently menu icons just fade-in with linear alpha value increasing, which I hard-coded. ...
1
vote
2answers
574 views

libgdx ActorGestureListener.pan() parameters not moving actor in smooth line

I override the pan method in ActorGestureListener to implement dragging actors in libgdx (scene2d). When I move individual pieces on a board they move smoothly, but when moving the whole board, the ...
1
vote
1answer
22 views

How to draw the imagebutton and place it in the lower left corner

I have the button: soundBtnStyle = new ImageButton.ImageButtonStyle(); soundBtnStyle.up = skinBac.getDrawable("on");// soundBtnStyle.down = skinBac.getDrawable("off"); // soundsButton = ...
3
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
2
votes
1answer
265 views

Cant write/read to/from external storage with LibGDX

My create method looks like this: @Override public void create () { batch = new SpriteBatch(); FileHandle file = Gdx.files.external("file.txt"); file.writeString("My god, it's full of ...
4
votes
1answer
167 views

LibGDX - Show a minimap

I've started to develop a small roguelike game in LibGDX. I've also made a minimap class, which creates and updates the minimap as the player explores the dungeon, by using a Pixmap. The minimap class ...
-1
votes
2answers
655 views

LibGDX Json not parsing full file

I'm trying to load a World with different Objects (World Objects and Entities). For that, I want to use Json. For less than two elements this works like a charm. But as I add more elements, some ...
1
vote
1answer
705 views

Handling Back Button in Android without implementing InputProcessor

Please advice/clarifyon below issue in libgdx while handling back button in Screens. I have already gone through these 2 threads, http://stackoverflow.com/questions/7223723/in-libgdx-how-do-i-get-...
0
votes
1answer
50 views

Libgdx if statement is not working well

I am trying to make the player die when it hits the rock or the time is up and the score is not reached, in this code at the first if statement it works when Rockhit is true, the player jump and ...
1
vote
1answer
58 views

Use Stage's draw() method to invoke Actor's draw method in Libgdx

Question : In the following snippet, I wish to draw different shapes such as rectangles, circles, triangles etc. I will be creating different class files for each of such objects, as I did for ...
2
votes
1answer
65 views

How to dispose in Newest Java/LibGDX ApplicationListener?

Am I new? yes What I'm wondering: How do you dispose of textures / spritebatches and the things you normally need to dispose of now? Why I'm asking: Because theirs no automatic dispose() function ...
3
votes
2answers
189 views

Android libGDX FreeTypeFontGenerator exception

I am working on a libGDX project for Android. Since I added the following code, running the game on my Android phone produces an exception: final FreeTypeFontGenerator generator = new ...
4
votes
1answer
2k views

Two pass blur shader using libgdx tile map renderer

I am trying to apply the following technique: blur effect using two pass shader to my libgdx game using the OrthogonalTiledMapRenderer. The idea is to blur the background wich is also a tilemap but ...
3
votes
2answers
831 views

How to use the zoom gesture in libgdx?

I found the example code for the GestureListener class, but I don't understand the zoom method: private float initialScale = 1; public boolean zoom (float originalDistance, float currentDistance) { ...
1
vote
1answer
61 views

Check collision between two rectangles - libGDX

I'm making a game in which the objective is to collect the maximum amount of balls(Rectangle) to get the highest score. The balls spawn randomly from the middle of every side of your smartphone, and ...
3
votes
1answer
533 views

How to draw a polygon with picture in libgdx?

I'm working around a simple rectangle game, It just split the rectangle in to a lot of polygon debris. I use Pixmap and Texture to draw the edges of each polygon. ... for (GraphEdge e: _edges) { ...
2
votes
1answer
45 views

Libgdx Image doesn't fit the Screen

I am Trying to show Image as background, but it doesn't fit to the screen. When I use this class as the start screen it fit the screen properly but when I call this class after winning the level, the ...
1
vote
1answer
107 views

Libgdx how to draw name above monsters head

As you see, the player hud works perfect, but when i move the monster name moves with me. Instead to get attached to the monster. Player has a hud and i'm using Scene2D.ui to pull it off and works ...
1
vote
1answer
106 views

Libgdx Fine Tune Megaman Movement

With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping. I believe I have managed to match moving on the X axis and the ...
2
votes
2answers
293 views

LibGDX - Tilemap Wall Collision Detection Issues

I cribbed some code from another web tutorial (SuperKoalio - https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/superkoalio/SuperKoalio.java) about detecting a ...
2
votes
2answers
271 views

Accelerometer problems

When I hit an object, my Fighter is supposed to fall to the Ground. BUT, because of the Accelerometer, i can still move it up and down eventhough it died. The Scroller on the x-Axis though stops. ...
1
vote
0answers
22 views

LibGDX: I need to get from SpriteBatch to Batch in order to draw a Touchpad

I have created a little game using LibGDX and it uses a SpriteBatch when it renders the game objects. Now I want to add a Touchpad to it, and the draw method of Touchpad takes a Batch as a parameter, ...
0
votes
2answers
46 views

Black lines on sprites

I am having the issue as seen below while using a textureAtlas with libgdx. I haven't found anyone else with the issue so I decided to ask here. Here is an image of the textures in the game screen: ...
1
vote
1answer
14 views

PlayerCenteredScores in LeaderBoards

Games.Leaderboards.loadPlayerCenteredScores(mGoogleApiClient,leaderboardId, LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC, 5).setResultCallback(new ResultCallback<...
0
votes
0answers
12 views

Chartboost ads not showing on some Android Devices [closed]

I had implemented chartboots ads in my Libgdx game. When I tested it, it worked properly and when I published the game it is working well on some devices, but it doesn't work on others. my friends ...
1
vote
0answers
20 views

Linking 3D Models together in libgdx (skeletal)

I'm drawing a 3D stick figure for an Android app using Libgdx and its ModelBuilder's createCylinder() and createBox() methods. In the render method I animate it by applying translations and rotations ...
0
votes
1answer
20 views

Transition the scale of a sprite

I'm new to this engine but I am making a menu with some basic animation, I would like to start with a sprite scaled up and then it would transition to the normal size. Is it possible with LibGDX or do ...
0
votes
3answers
81 views

Difference Between LibGDX and LWGJL

I've been looking into developing a small game with Java, as I am fairly familiar with it and see game development as good opportunity to improve my knowledge. When I research different libraries and ...