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

0
votes
0answers
10 views

Libgdx project “Not Responding” when in debug mode

So the problem I am encountering is that whenever I attempt to debug my Libgdx desktop project and Android project the "app" is constantly "frozen" or "Non responding." By this I mean that I cannot ...
0
votes
1answer
23 views

Box2DLights - the center of sprites are always 100% unlit (black) unless Xray is on

I'm using a ConeLight at 180 degrees, with this setup: pl = new ConeLight(rayHandler, 256, new Color(0.5f, 0.5f, 0.5f, 1f), 280f, 400 - x, 300 - y, 0, 180); And the object I'm casting a shadow on ...
0
votes
0answers
10 views

LibGDX: Its there any way to calculate the speed of a repeated scrolling background?

I'm trying to calculate the scrolling speed of an background, I'm doing something like this on the background class: private Texture texture = new Texture(Gdx.files.internal("backgound.png")); ...
0
votes
1answer
16 views

LibGDX how to change animations

I have a Player Class and i have 3 different Animations for it. I can render them perfectly but i don't know how to change from one animation to another. For exmaple i have 3 animations, one for ...
0
votes
0answers
12 views

Google Play Game Services - Handling messages via p2p, host or no host?

I am developing a real time multiplayer game using Google Play Game Services. The underlying networking is done via P2P. Everything I read says I should still have a game host that sends out all the ...
1
vote
0answers
24 views

Design pattern for animation sequence in LibGDX

What design pattern to use for sequence of animation that involve different actor in libGDX. For example I am making a game to choose a wolf from a group of sheeps. The first animation played when the ...
0
votes
1answer
53 views

Rotating a vector around a vector in 3D space

I am trying to rotate a moon around a planet (the planet is also rotating around an axis) but I am having trouble doing so. I tried to make the model move through space like so: @Override public ...
0
votes
0answers
33 views

Graphical Designer for creating in game objects

I am creating a 2D endless scrolling game . The game needs to have a repetitive object , say a building with random width and height . But the basic color and features like window shape of the ...
0
votes
1answer
15 views

libgdx custom shape overlap detecting

I'm writing my game on libgdx w/o any of those extensions like box2d and whatsoever. But right now I'm forcing problem with overlapping detection. I need to detect if bullet (which is always in ...
0
votes
0answers
20 views

Should I use the Spring framework in libgdx [on hold]

I started by creating a game with Java2D and I was using spring (partly just as I wanted to get better at using spring for work). Now I'm switching to libGDX and my question is, should I ditch spring ...
0
votes
0answers
44 views

Using Tiled (tile maps) for creating just parts of the game

I am creating an endless scrolling 2D orthogonal side scrolling game. But I am having an issue : In my game I want certain buildings to be there of random widths and height. Now the buildings are not ...
-1
votes
0answers
41 views

How to create my own word factory? [closed]

I need your help to know how to create word factory game using libGDX. We tried to make it in game maker but we can't understand how to use it. This game will be our thesis this year so,can you help ...
0
votes
0answers
22 views

Only 1 character prints in LibGDX

I'm creating a simple menu in LibGDX and following a Stage/Table approach. I have a header, and a TextButton. Both have some text to them, but both only show 1 character. For example, the header ...
3
votes
1answer
129 views

“Pixel-perfect” camera positioning in 2d game

I am writing a 2d game using LibGDX. The view to the game world is top-down. The game shows a grid of lines, which looks nice when the camera is at its initial position (0,0). The problem is now that ...
1
vote
1answer
125 views

If I convert my LibGDX game to an exe, is it legal?

I have a LibGDX jar file, and I want to have it as an EXE. Would that be legal? (Using launch4j) Also, how do I obfuscate a LibGDX game?
0
votes
1answer
22 views

LibGDX - Textures rendering at wrong position

Update 2: Let me further explain my problem since I think that i didn't make it clear enough: The Y-coordinates on the bottom of my screen should be 0. Instead it is the height of my screen. That ...
0
votes
1answer
26 views

How can I increase text using scale and keep the text smooth in libgdx?

I found that I can use DistanceFieldShader from here and found an example but I couldn't make it work. First my whole screen becomes white, all the other actors that I have on screen disappears. ...
0
votes
1answer
39 views

How can I implement online high score in LibGDX?

I found some posts that said to use Google Play Services. What about other platforms? Is their some libgdx library that I can use to implement it in core section or do I need to write separate score ...
0
votes
1answer
25 views

Is Table the only layout that I can use in libgdx?

I'm looking for the common way to handle the layout in libgdx. I searched google and found only table layout. Meanwhile I don't use any layout and just insert coordination into each visual object but ...
0
votes
0answers
20 views

Multiple time initialize same texture

I am newbie to libgdx gaming, i have a problem to initialize the multiple images having same texture;try to do using array and i could not do,as i am very new so can help me sort out. private Image ...
0
votes
1answer
44 views

The sprite will not move in libGDX

When I ran the android application, The sprite image will not move when I press the input keys. I followed a tutorial based on input keys and wish to know what's wrong. Can anyone see what's wrong? ...
0
votes
0answers
12 views

Correctly identifying a Fixture from an extended class in Box2D's ContactListener

Sorry for the confusing title, I dont know how to resume it that much. Im making a game, and I have a simple class Mob which is extended by Warrior and Enemy. A Mob has a Body, and that body usually ...
0
votes
1answer
52 views

Bodies going through the walls of a box

I have a game where the user controls a box to collect falling balls. However, very often the balls will just fall through the walls of the box and be flung away. What could be causing the balls to do ...
1
vote
0answers
41 views

Slick2D v LibGDX: [closed]

Okay. You might have seen some of these posts on forums here and there, but I wanted to ask this here mainly because everyone here is focused on game-dev and there seems to be quite a few Java ...
0
votes
0answers
5 views

swapActor not movings the actors

I'm trying to use myTable.swapActor(Actor a,Actor b). It does return true, so it should swap the items, however, nothing's moving. Is there something I've not seen in what the function really does? ...
0
votes
1answer
34 views

neon effect to textures libgdx [duplicate]

I am working on a live wallpaper with Libgdx . I am wondering if I can give neon glow to my textures , at runtime . Is this possible? If yes can anybody give me any pointers?
0
votes
0answers
21 views

Sprites on scrolling tmx map (LibGDX)

I have .tmx map loaded, and a camera to see it. The map is bigger than the camera viewport, so I need to move that viewport scrolling the camera. Now I want to draw a sprite on the map. To do that, at ...
0
votes
2answers
116 views

How do i make collision detection more effective?

In the game i am developing, there are 220 circles that are not moving. One of the circles is moving and in every update, it iterates through an ArrayList that contains all the circles and check if it ...
0
votes
2answers
39 views

How do i initialize and use a Texture Array? LibGDX

First of all, I am new to Java and LibGDX.. What I am trying to do is Load my texture images into an array so that I can reference them in my drawing code by number, rather than by name. I am drawing ...
0
votes
0answers
32 views

Does the Xbox One controller is supported by libGDX?

I just bought a Xbox one controller and i'd like to test my game with. I use the Controllers extension from libGDX and it works fine, at least with my PS3 controller. Indeed, i got some weird results ...
0
votes
2answers
115 views

Can I sell games made with LibGdx on Steam

my question is pretty self-explanatory, there is any technical or legal issue in selling libgdx games on steam? EDIT It is possible to show some kind of evidence, maybe a exemple of a game that is ...
0
votes
1answer
25 views

LibGDX Z index for groups

Have three groups, A, B and C. Let B and C be children of A. Now set B.setZIndex(3) C.setZIndex(2) Why is C drawn over B, if B has a greater Z index? If you do this: C.setZIndex(2) ...
3
votes
2answers
98 views

Why are my Box2D wheels slipping on ground?

I have a car, set up in Box2D as a rectangle connected with two wheels using WheelJoints: The wheels are defined as follows: FixtureDef wheelFixtureDef = new FixtureDef(); ...
1
vote
0answers
41 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 ...
0
votes
1answer
53 views

If filled polygon cannot be drawn via libgdx ShapeRenderer , then what is the work around?

I know most of you would suggest me to draw a filled polygon by using combination of triangles and rectangles , but that is not possible for complex shapes . I want to basically draw a generic shape ...
1
vote
1answer
43 views

Cannot Efficiently Loop SequenceAction

Why doesn't this work and how do I fix it/create a different, working loop for this SequenceAction? public void setLoopingFade(float time) { fadeLoop = Actions.sequence(Actions.fadeOut(time), ...
1
vote
1answer
51 views

LibGDX Box2DLights shadow offset problem on bodies

Hello I just started to use LibGDX, and it's awesome. I looked at the Box2DLights library, and started to learn how the lighting work here. I got something up: As you can see, it works, but the ...
1
vote
1answer
196 views

How do I efficiently collide and match groups of coloured circles?

I am new to game programming and working on clone of this game in libgdx. The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
0
votes
1answer
31 views

Master sound volume in LibGDX

I have been searching everywhere for master volume for sound and music in LibGDX but to no avail. Can anyone tell me if it is implemented somewhere or do i need to implement such functionality myself? ...
1
vote
1answer
42 views

Daily Unlock in LibGDX

I am trying to make a game that is a collection of mini games. The mini games will unlock daily. There are story for each day. And the story cannot be repeated so for example the player start playing ...
0
votes
0answers
26 views

LibGdx how to get touched point in differente screen resolution

I'm developing a game actually on phone and tablet. In libgdx I found that using camera.unproject api with vector3 can get the relative coordinate for differente screen resolution however I doesn't ...
0
votes
1answer
93 views

TiledMap not drawing completely

While attempting to constrain camera scrolling to within the TiledMap I discovered that it seems the renderer for the map is not drawing the entire map. The map is 1600x960px so one would assume the ...
0
votes
1answer
71 views

Array of map data

I'm looking for your thoughts on the best way to store map data. I need to store data for territory ownership for each pixel on the map. The data for each pixel is as such: Player 1 points: 24 ...
0
votes
3answers
105 views

What is the easiest way to make an object follow the edge of a sprite?

I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
0
votes
2answers
45 views

LibGDX Images not loading

Now my Image isn't loading to the screen. I tried to be decorative with the code but since it isn't working I made it just like the video I'm whatching. I don't get any exceptions, but the image ...
2
votes
1answer
66 views

How can I use imprecise accelerometer data for controls?

I want to rotate an object with respect to the phone's position. I use the accelerometer output to detect orientation: float roll = Gdx.input.getRoll(); float pitch = Gdx.input.getPitch(); float ...
0
votes
0answers
33 views

Experiencing weird effects with framebuffer

So I am trying to build a working flashlight in my game. I am using libgdx and the framebuffer class but there are some weird effects that I am experiencing and that may be due to my lack of ...
0
votes
1answer
46 views

Does LibGDX abstract OpenGL ES away or can I still use my OpenGL ES knowledge?

I've been learning OpenGL ES, and am now turning my attention to using LibGDX. My main concern with LibGDX is, if needed, will I be able to apply my OpenGL ES knowledge to something if needed and ...
1
vote
1answer
55 views

Touchable Hud with Actors in Libgdx

I am writing a Tower Defense for Android. Right now my LevelScreen contains a Background-Actor which is pan-able and some zones to buy Towers - after buying them you can upgrade them further. When you ...
1
vote
1answer
89 views

Problem to match font size to the screen resolution in libgdx

I'm having problems to show text on my game at same size on different screens, and I did a simple test. This test consists to show a text fitting at the screen, I want the text has the same size ...