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

2
votes
1answer
163 views

Universal Tween Engine - simulating time T instantaneously

I have a circuit in Universal Tween Engine in libgdx and I want to make several entities follow this path , each behind the other, like body pieces of a snake. The problem is that I need to find ...
0
votes
0answers
40 views

Find angle between two points in java [duplicate]

I am making a very simple game and want the hunter to shoot the dragon when the player touches on the screen. I want the arrow to be craeted at hunterPosition.x and hunterPosition.Y and move towards ...
0
votes
0answers
33 views

2D collision beetween a sprite and an array of sprites [duplicate]

I am creating a simple Android jumper (think Doodle Jump or Abduction) using libGDX so I can get started in game programming. My problem is that I need to figure out a way to check for collision ...
0
votes
0answers
82 views

Different Spawning Target Pattern on a Music Game App (Prototype)

I'm using Gtomee's audio spectrum decoder tutorials (from sample video or codes at GitHub) to create its own spawning pattern according to what music it played. It worked pretty nicely despite this ...
0
votes
0answers
189 views

How to draw table border in libgdx?

I'm new to libgdx and I'm currently working on TableLayout and wondering how could I draw borders for each cells. I've done some research on this but it seems that I could come up with this solution ...
0
votes
0answers
139 views

Messaging system between components implementation

What are the pros and cons of these two kinds of messaging objects: The first one I make a generic message object with things like an Enum for the type of message, and arrays of ints, floats and ...
0
votes
2answers
341 views

Problem with AssetManager while loading a Model type

Today I've tried the AssetManager for the first time with .g3db files and I'm having some problems. Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: ...
0
votes
2answers
401 views

SpriteBatch being drawn outside of Stage?

Currently working on my first game, though running into some problems with libgx and screen aspect ratio. What I have is a Stage which contains things like menu buttons etc, and the rest of the game ...
3
votes
1answer
203 views

Why is my Tiled map distorted when rendered with LibGDX?

I have a Tiled map that looks like this in the editor: But when I load it using an AssetManager (full static source available on GitHub) it appears completely askew. I believe the relevant ...
0
votes
0answers
12 views

time issue in render libgdx [duplicate]

pls. help how to implement this loop in render method next_game_tick and GetTickCount(); always contain same time value. so position never updated @Override public void render() { float deltaTime = ...
0
votes
0answers
14 views

time issue in render libgdx [duplicate]

pls. help how to implement this loop in render method next_game_tick and GetTickCount(); always contain same time value so player position not updated. @Override public void render() { float ...
0
votes
2answers
399 views

RPG Equipped Item System

I'm making a 2d rpg with libgdx and java. I have an Inventory class with an Array of Items, and now I want to be able to equip items onto the player. Would it be more managable to do have every item ...
2
votes
1answer
76 views

Libgdx Palette Swap

I'm developing a game using the Libgdx library. I'm trying to implement a very simple palette swap functionality (basically just complete recolouring of some areas, I don't even need to have various ...
5
votes
1answer
185 views

Running multiple box2D world objects on a server

I'm creating a multiplayer game using LibGdx (with Box2d) and Kryonet. Since this is the first time I work on multiplayer games, I read a bit about server - client implementations, and it turns out ...
0
votes
1answer
333 views

Navigating Libgdx Menu with arrow keys or controller

I'm attempting to make my menu navigable with the arrow keys or via the d-pad on a controller. So Far I've had no luck. The question is: Can someone walk me through how to make my current menu or ...
7
votes
2answers
289 views

How can I implement a scanline effect?

I am working on an old-school platformer in libgdx and I want it to have a "scanline" effect, like this: My first attempt was to make a little texture and draw it on a full-screen quad. I used two ...
1
vote
0answers
94 views

Cylinder scrolling / wrap-around world using shaders?

I am making a 2D game using OpenGL ES 2.0 (libgdx), where the world will wrap-around itself on Y-axis. Apart from implementing the "modulo" method in my rendering code, I'm wondering whether it's ...
1
vote
0answers
59 views

Need to join 2 bodies via weld joint but not on center of mass

I have successfully join 2 bodies via weld joint , but my problem is I want to join corners of bodies not on centre of mass. Is there any way to achieve this? Above image consist 3 polygon body that ...
7
votes
1answer
166 views

Problem when scaling game screen in Libgdx

Currently, I'm able to scale the screen by applying this bit of code onto an OrthographicCamera Camera.setToOrtho(true, Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2); But something ...
1
vote
1answer
235 views

Movement of body after applying weld joint

I have two rectangular bodies. I've applied Weldjoint successfully on these bodies. I want to move that joined body by applying linear impulse. After weld joint, these two bodies becomes single body ...
2
votes
1answer
113 views

How to flip 2d skinned quadruped character?

just would like to know is flipping 2d skinned character with one of scale axis good way for left or right movement(flipping direction and animation)? Normal direction would change.(UPDATED) for ...
1
vote
1answer
129 views

Pixmaps, ByteBuffers, and Textures…Oh my

My ultimate goal is to take a specific region of the screen, and redraw it somewhere else. For example, take a square from the upper left hand corner of the screen and redraw it on the lower right ...
-1
votes
1answer
343 views

libgdx intersection problem between rectangle and circle

My collision detection in libgdx is somehow buggy. player.png is 20*80px and ball.png 25*25px. Code: @Override public void create() { // ... batch = new SpriteBatch(); playerTex = ...
3
votes
1answer
154 views

Why is SpriteBatch.end() generating null pointer exception in this code?

I am getting a null pointer exception using libGDX that the debugger points as the SpriteBatch.end() line. I was wondering what would cause this. Here is the offending code block, specifically the ...
0
votes
0answers
27 views

libgdx loading textures fails [duplicate]

I'm trying to load my texture with playerTex = new Texture(Gdx.files.internal("player.jpg")); player.jpg is located under my-gdx-game-android/assets/data/player.jpg I get an exception like this: ...
0
votes
1answer
353 views

coloring box2d body in LibGDX

I want to color polygon of box2d in LibGDX. Found below useful class for that. http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.html But, it is not ...
1
vote
1answer
60 views

All libGDX input statements are returning TRUE at once

I'm fooling around with Box2D and libGDX and running into a peculiar problem with polling for input. Here's the code for the Screen's render() loop: @Override public void render(float delta) { ...
1
vote
1answer
207 views

Why doesn't RGB565 lead to a smaller memory footprint on Android?

I'm using LibGDX for my game. I'm loading 9 bitmaps into memory at once using the AssetManager, about 512x512 pixels each on average. TextureParameter texParam = new TextureParameter(); ...
0
votes
1answer
239 views

Using native code with Libgdx, (Raknet)

I was searching for a game engine (Java- maybe C#) with built-in real time networking library to develop 2D cross platform (Android - iOS) multiplayer game. Actually I have not found well suited ...
2
votes
2answers
761 views

Libgdx OrthogonalTiledMapRenderer not rendering map properly

I'm using a little hack to change the coordinate system to the one i'm accustomed to (left and up is negative and right and down is positive) but this causes the tiled map renderer to render the map ...
0
votes
2answers
153 views

Libgdx InputListenner not working

I've added an InputListener to my libgdx actor and I've added the actor to the stage. The stage (and all of its actors) gets drawn just fine. The problem is my actor doesn't seem to be receiving ...
2
votes
0answers
99 views

Unproject considering parallax depth

How can I take screen coordinates (or alternatively world coordinates on the 'primary' parallax plane) and find out what world coordinates they translate into when taking parallax depth into account? ...
2
votes
1answer
412 views

box2d raycast filter category

I am trying to filter a category in my ray casting (jBox2D within libGDX), which should return the closest object that does not belong to the category LEVEL0. I've tried a plethora of approaches, but ...
0
votes
0answers
108 views

Rendering tile maps for mobile devices

Hitting a bit of a roadblock with my game's development and I'm just looking for some outside advice. I'm trying to render a tilemap for my mobile game (Android) and I'm using LibGDX. Now, here's ...
5
votes
1answer
327 views

OpenGL ES 2.0 obscured texture is visible

Hi, I am using LibGDX and OpenGL 2.0 to create a game. So far I have created two meshes. The front mesh is the one with the brown circle texture and another mesh on the top with a green to white ...
4
votes
2answers
584 views

LibGDX stretching 2d graphics

I have a problem with stretching sprites in LibGDX. I have one png file for the sky in the game (1 x 1000px) and I want to render it 1000 x 1000px sprite.setSize(pixelWidth,pixelHeight); I want to ...
0
votes
2answers
691 views

Detecting key press only once [duplicate]

Have a question on keyboard inputs. Currently I am using this method to read my input, Gdx.input.isKeyPressed(Input.Keys.A), it is working fine. But I do realized at times there are multiple instances ...
0
votes
1answer
281 views

How can I get animated bone's transformation in LibGDX?

I am trying to get transformation from a bone, but i can't, I exported just a animated armature with just a bone from blender, then I converted to .g3dj, so I just need the bone transformations so ...
0
votes
0answers
139 views

Error when create FrameBuffer: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS

I'm using libgdx, to create some program. I need used some operation in framebuffer. For this operation I create new framebuffer, after this operation I'm call in framebuffer dispose(). When I create ...
0
votes
1answer
166 views

Remove a body when touched in LibGDX(Box2D)

I am using LibGDX to create a new project. What i am trying to do is, i load bodies from a tmx file into levels which works fine. The bodies also has a sprite with them. The problem is, is i would ...
1
vote
2answers
131 views

When input listener set in resize(), input doubles

I created a button and assigned an input listener in the resize() method of the screen. For simplicity's sake, whenever I press the button, 1000 adds to a total amount. The weird part is, it adds ...
1
vote
0answers
87 views

LibGDX drawing portion of tmx map

I am trying to make a tile based game in LibGDX and I have run into some problem. In earlier versions of LibGDX you were able to draw a certain section of a .tmx map instead of a whole and even a ...
0
votes
0answers
309 views

libgdx - Getting Errors after New Project Initialization using gdx-setup-ui.jar

I'm using libgdx-0.9.8 Trying to figure out how to resolve these issues: The constructor LwjglApplication(Main, LwjglApplicationConfiguration) is undefined The project was not built since its build ...
4
votes
0answers
349 views

Advice on NPC architecture [closed]

I'm developing a 2D Zelda game with LibGDX in Java using TileD maps. I am now adding NPCs to the engine and I'm thinking about how to make them so it's going to be easy for me to add/edit their custom ...
0
votes
1answer
48 views

libgdx fixture is giving unresponsive error

need some support. I am novice in libgdx game engine. Below is my code package com.game.box2d.fruitcart; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import ...
0
votes
1answer
342 views

libgdx actors and instant actions

I'm having trouble with actors and actions. I have a list of actors, they all have either no action, or 1 sequence action This sequence action has either : a couple of actions (some are instant, ...
1
vote
1answer
307 views

rendering transparent meshes in LibGDX

Building open this tutorial - https://code.google.com/p/libgdx/wiki/ProjectionViewportCamera I have constructed a class for generating polygon meshes. But i cannot figure out how to render semi ...
2
votes
2answers
323 views

How to implement pathfinding in this situation

So I'm creating a game for android using the libgdx library. I render the map from a tmx file and in it all the water tiles have the property of blocked. My player(a sprite) moves to where I ...
1
vote
1answer
491 views

Moving bounding box in 3D using Libgdx

How do i go about moving a bounding box in libgdx? I want to make the bounding box capture my character and move with him. So ideally i want to be able to copy my vector 3 from my model instance and ...
-1
votes
1answer
389 views

Different Attack Systems in RPG [duplicate]

I'm making a 2d rpg game with libgdx and java, and I'm wondering how I would organize different attack systems - magic, melee, etc. (it's not a turn-based rpg). I have a PlayerClass enum, a Player2D ...