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

5
votes
0answers
143 views

LibGDX controllers: how to fix crashes in JRuby?

I'm using JRuby with LibGDX and it's been going quite swimmingly, save for a crash I experience every time I try to use the controllers extension. Here's a basic rundown: I've required all the ...
2
votes
0answers
14 views

Why does adding LIBGDX “fadeIn” action to a table in a group make the whole stage fade in?

I'm trying to "fadeIn" a store "screen" which is really just an invisible group. I set the group to visible=true, set the alpha to 0 and then do a "fadeIn" on the group. The problem is that the whole ...
2
votes
0answers
43 views

Drag And Drop in libGDX (Target and Source)

I'm trying to put together a drag and drop system in libGDX with the help of DragAndDrop class. I have the typical system in which you can drag something into a box. So far it is working all dough I ...
2
votes
0answers
48 views

Why do my Box2D bodies occasionally get stuck and separate forcibly?

I'm making a space game with LibGDX and Box2D. I made a video here to illustrate the issue. Verbal description: When objects collide, they sometimes get stuck together and are then suddenly separated ...
2
votes
0answers
122 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
0answers
297 views

How to create heat haze effect in Libgdx?

I would like to create a heat haze effect for a 2D game I am making. Do You have ideas or suggestions, how to get that effect. I am using Libgdx(OpenGL 2.0). Thank You in advance!
2
votes
0answers
932 views

Libgdx ParallaxScrolling and TiledMaps

I implemented ParallaxScrolling for my SideScroller project, everything is working but the tiled map (the most important part!). I've been trying out everything but it doesn't work (see the code ...
2
votes
0answers
630 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 ...
1
vote
0answers
30 views

Libgdx implement 2d drop shadow for transparent sprites

I am a libgdx learner. For an learning application that I am developing using libgdx on android, I need to show drop shadow or glow effect when a sprite is touched. The sprites are created from a ...
1
vote
0answers
37 views

How to eliminate the outline in libgdx?

I'm recently started working on a game in libgdx, and I've run into the problem that my sprites tend to get a thin, whitish outline around them. This is especially a problem for me since I'm working ...
1
vote
0answers
52 views

How do I fill a shape with a texture in Libgdx?

I am making a 2D racing game. I want to fill the area of the ground object with a texture. I have the shapes of the ground (a Box2D shape). If I make images of the ground with textures, it uses a lot ...
1
vote
0answers
44 views

Lighting shadow casting sprites with box2Dlights

I currently have something like this using box2Dlights Ideally, I would like objects casting shadows to be lit, so the object is lit but there is still a shadow cast around it. Right now the object ...
1
vote
0answers
44 views

Changing Box2D Body from Kinematic to Dynamic after contact

What is the correct way to change a Kinematic body into a dynamic body? context - I have a dynamic body as a projectile which has to be fired at a kinematic body (it is kinematic because i am ...
1
vote
0answers
40 views

LibgGDX drawing two seperate Textures in FrameBuffer

So I am trying to combine multiple TextureRegions in to one by using a FrameBuffer. This works extremely well when the TextureRegions originate from the same Texture object/file but as soon as I try ...
1
vote
0answers
67 views

libGdx Window .pack() not working

I'm trying to make a window, then use the pack method to get the right size, but the window maximizes instead. Here's my code: private Table buildOptionsWindowLayer() { winOptions = new ...
1
vote
0answers
64 views

LibGDX: Why look BitmapFont pixelated on a scene2d.ui.Dialog?

When I use BitmapFonts directly on the stage table, the fonts looks normal (not pixelated). But when I use the same BitmapFont with the same size on a scene2d.ui.Dialog, the font looks pixelated. ...
1
vote
0answers
123 views

2d libgdx: runtime level generation

I have encountered a problem during my first game development: I thought of a Array<Ground> groundArray that does groundArray.add when a new ground will appear on the screen, and removes oldest ...
1
vote
0answers
114 views

LibGdx Triangle Collision

I'm back with another question. I'm trying to get a collision between an actor and a sprite. With the actor, which only moves upwards and downwards, I've got no problem since it's shape is a ...
1
vote
0answers
50 views

LibGDX mesh silhouettes

How could I find out the silhouette edges of a mesh in libgdx? More specifically, how could I produce shadow volume geometry using the Mesh class of libgdx?
1
vote
0answers
75 views

libgdx - Image artifacts when downscaling image

Why does this border appear around the edges when I downscale a bitmap and how do I avoid it? I tried every filter I know, the results go from bad to worse. Here's the original bitmap:
1
vote
0answers
92 views

Incorrect click event when resize on libGdx

I want to use scene2D, in libGDX, to detect click on object. I have this simple Game sample : Stage stage; @Override public void create() { this.stage = new Stage(1280, 720, true); ...
1
vote
0answers
733 views

Resize the Texture Region (parallax background) to fit my screen size in libgdx

I am using libgdx to make a running game. I am using vertical parallax background. I have successfully implemented parallax background many times. But for this game, I want my Texture region to fit my ...
1
vote
0answers
391 views

How can I transform a group of objects in libGDX?

I'm new in LibGDX. I created group with actors in show method and add listener (where i calculate rotation matrix) and want to rotate all actors from group with ...
1
vote
0answers
305 views

LibGDX - Box2D: Realistic Light and Layers

I'm having some problems with my current game. Short description: It's a 2D game where you have to avoid the lights or you lose HP. My problem is the following one: Here is the rendering process: ...
1
vote
0answers
215 views

How do I implement a “sliding out of / into” effect on a settings menu similar to that in Angry Birds?

I'm trying to implement a settings menu component similar to that in Angry Birds - a button control that makes an options menu slide out of it and back into it when clicked on. I use scene2d.ui to ...
1
vote
0answers
240 views

LibGDX render sprites in tiled-map format ( convert texture to sprite )

I am creating a game in which till now I have used textures to create A 2D tiled game. I have created a matrix which converts the touch co-ordinates into a array index number and according to that ...
1
vote
0answers
172 views

How should matrix-based Parallax Scrolling work?

The question is at the end, as it requires a bit of context. I'm not sure if my understanding, my code, or LibGDX's ParallaxCamera is wrong. LibGDX's ParallaxCamera uses Matrix4s to achieve a ...
1
vote
0answers
103 views

How can I modify my procedural shadows to also show some of the walls?

I'm rendering shadows in Libgdx with the method from this tutorial. I think it's a nice and easy method. I render all my shadows in a framebuffer, then invert it. Before invert: After Invert: ...
1
vote
0answers
127 views

LibGDX polygon caching

I am developing an Android game using LibGDX and I have big world map made of polygons. I use PolygonSprite and PolygonSpriteBatch, when I render map, I get 30-35fps and it feels laggy. I wonder if ...
1
vote
0answers
178 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
63 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 ...
1
vote
0answers
114 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 ...
1
vote
0answers
330 views

Libgdx: scrolling background for preview screen

Good day, I have been coding for quite a while now and I'm at an certain point where i am having difficulties on solving something. I've been creating a preview screen which contains the following: ...
1
vote
0answers
142 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
329 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
454 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
179 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
153 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
2 views

Libgdx Admob integration

I have successfully added the banner ad in my application. I have found that visibility is used for displaying and hiding ad. The ad loads every time whether it is shown or hidden. Is it possible to ...
0
votes
0answers
4 views

Libgdx--how to store every single point drawn using touchdragged?

Basically i am trying to detect line collision. The problem is when intersection occurs quickly(touch dragged is done quickly like fling), the collision is not detected. It seems as if 'touch dragged' ...
0
votes
0answers
25 views

How to draw multiple large background images using libgdx?

I have developed a basic lunar lander-style game using Slick2D and dyn4j and am now redeveloping it using libgx for various reasons. I am having problems drawing the background (i.e. everything, but ...
0
votes
0answers
17 views

AssetManager and Pixmaps

I've been reading about AssetManager here: https://github.com/libgdx/libgdx/wiki/Managing-your-assets. Apparently assets are reference counted (with load and unload). I am wondering about Pixmaps. ...
0
votes
0answers
30 views

Seeking Advice: Collision with JBox2d for Top-Down or Isometric Maps

I Hope I can make this as clear as possible! Currently working on an action RPG game, very early stages, more just the basic ideas down and written in. So i'll start on with my setup: Using Java ...
0
votes
0answers
16 views

How do I get the impulse of a collision from Box2D in LibGDX?

I am developing a game using LibGDX and Box2D. I want to get the force or the impulse when two bodies collide, but I can't find the right way to do that. How can I use a ContactListener to get the ...
0
votes
0answers
12 views

Box2DLight position seems to Floor

I am creating a top down game and i'm using raycasted lights from Box2Dlights, My light is all set up and working. its attached to the player's Body, and when the player moves, the sprite I attached ...
0
votes
0answers
12 views

Box2D thow ball from PIXELS posisiton

Here are my enemy movement function. I want that my enemy in random Y-position throw a bunch of things in to the player. And I want to implement physics using Box2D. But I know that Box2D workd only ...
0
votes
0answers
34 views

LibGdx Exception

Here is the exception: Exception in thread "LWJGL Application" java.lang.NullPointerException at com.mygdx.test.excav.game.WorldRender.renderTest(WorldRender.java:34) at ...
0
votes
0answers
23 views

Libgdx Scene2d shows White screen when executed

package com.Darth377Apps.DeepShadow; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.scenes.scene2d.*; import com.badlogic.gdx.scenes.scene2d.ui.*; import ...
0
votes
0answers
21 views

Libgdx: ModelInstance texture is not rendered on Java8

I have project based on opengl, libgdx framework. It's impossible I think, but when I switch my project from Jdk1.7 on Jdk1.8 I have problem with rendering model's texture. I have no idea how language ...