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

Jumping Cube, should I use box2d or just speed and acceleration? [on hold]

I'm completely new to the game development world. I come from the web and mobile (iOS) development, but I want to start making games! I chose LibGDX, it's free, seems to be good and multiplatform. ...
0
votes
2answers
38 views

Mysql database reading and writing [on hold]

In my Libgdx application I would like to be able to connect to a mysql server securely and read and write data from it without other users injecting, or changing information. I've found this: ...
0
votes
0answers
30 views

Draw image layer in tmx map - libgdx

I created a map only with an image layer in tiled map editor. When I want to load the map the layer isn't shown. Only the background color. Followed the tutorial from ...
0
votes
0answers
13 views

LibGDX , Scale button with animation when it is pressed

I am developing game using LibGDX . I want to create beautiful menu and to scale buttons when they are pressed but not in this way , when it is pressed scale it 1.5f , I want to scale it with ...
0
votes
0answers
12 views

LibGDX ImageButton not scaling properly on table?

I'm facing the same problem like in this link: question and I think the problem is in the skin passed in a table like this skin = new Skin(); skin.add("pausebuttonup", AssetLoader.pauseButtonUp); ...
0
votes
1answer
18 views

Typing text animation (dialogue) libGDX or in general

Can anyone think of an efficient way to animate the typing dialogue text as found in pokemon? I have a vague idea of using string.length, and having a new letter drawn every .2 seconds or so, but ...
1
vote
1answer
35 views

LibGDX Touch Delay

So I'm trying to make a game in which you have to tap things fast, but the thing is - after you touch something (the area I chose), it takes like 2 more seconds to register another touch. Now, I think ...
8
votes
1answer
222 views

Creating a glitch effect similar to Watch Dogs

I'm currently working on a LibGDX game. When a user does something wrong, I would like all the graphics on the screen to jitter very similar to the glitch/distort effect seen in the game Watch Dogs ...
0
votes
3answers
51 views

(LibGdx) Get mouse position in ENTIRE game [closed]

I'm trying to get the mouse position IN GAME. By that I mean not the position on the screen, but inside the window. I've been using Gdx.input.getX(), but that's not INGAME. How do I do this?
0
votes
0answers
14 views

LibGDX, Screens , Animation [closed]

I want to know is there a way to make beautiful animation between two screens , for example 1st screen will start fading animation and under that second screen well be displayed ?
0
votes
1answer
42 views

Is it possible to create sqlite database only for android in LIBGDX game? [closed]

I want to know if I can just implement sqlite database for android in libgdx game? Also if this is not possible then may I know the simple way to integrate libgdx game to just store scores in sqlite ...
0
votes
1answer
21 views

Making dialog “clips” in libGDX or in general?

I'm new to libGDX (I just released my first game), and I've started thinking about things I'd like to do next time. One thing I really want to do is, have those story type movies, where you tap the ...
0
votes
0answers
8 views

Issues displaying images behind an inactive scrollpane [closed]

SOLVED using scroller.setFadeScrollBars(false); scroller is a ScrollPane object. The background texture is only displayed when the scrollpane is scrolling, then it fades out to black. The text that ...
0
votes
0answers
12 views

How to loop through tiles in libGDX [duplicate]

I just need a for loop to show me all of the tiles in a tiled map. for(Tiles t: thetilemap) { }
0
votes
0answers
16 views

NullPointer calling scrollpane draw from a libgdx application [closed]

Solved: Using Stage to display rather than calling the ScrollPane draw method. I get this error when opening the GameScreen and calling the render method. Exception in thread "LWJGL Application" ...
0
votes
0answers
22 views

How to loop through all of the tiles in LibGDX [closed]

I need to loop through all the tiles and use my personal collision class. How do I loop through them?
0
votes
1answer
34 views

Event handling for Pressing only 4 keys on desktop

I want to poll only 4 keys i.e. Keys.LEFT, Keys.RIGHT, Keys.Up and Keys.Down in libGDX strictly. That means, I want to call render method, only when above 4 keys are pressed. I followed below link ...
1
vote
1answer
35 views

how to remove game objects after on overlap in LIBGDX game

I have gold stars in my game that give score to game hero if the hero overlap with the star. What I want is to remove star once it overlap with hero object. I give score by checking overlap with this ...
1
vote
1answer
26 views

Drawing shapes and images in libgdx dialog

I am currently working on a dialog window for my android game using libgdx. This dialog window contains a collection of labels and buttons, but should also contain an image. The image represents the ...
2
votes
3answers
77 views

Using Delta for a stopwatch, delta too fast than real time seconds

I search for methods to create a stopwatch on libgdx and came across with this: public void trigger(float delta){ playTime += delta; playTimeRounded = ((double)Math.round(playTime * 100) / ...
1
vote
1answer
21 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' ...
2
votes
0answers
23 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
1answer
55 views

How do I detect a line collison in LIBGDX?

I am drawing a continuous line using Pixmap. I want to check for a collision / intersection of my line with the already drawn line.
0
votes
0answers
24 views

rotate to movement direction [duplicate]

If I have a player character that can move 8-directionally, I can set the rotation of the player to face the direction of movement. But if I want to smoothly rotate to a direction, sometimes the ...
2
votes
1answer
63 views

Why do my Box2D collisions fail when I have multiple fixtures on one body?

I'm creating my first libgdx / Box2D game where a player moves around using a mouseJoint. My player has two fixtures, "main" and "question". For some reason when I have these two fixtures, my player ...
1
vote
1answer
41 views

Texture Packer - Any way to make it combine intelligently

I am making a Pokemon Clone, using libgdx. I have the different types of sprites: e.g. Back, front, back shiny, and front shiny. The current way the Texture Packer combines the textures seems to be ...
1
vote
1answer
40 views

How can my entities avoid walking on certain tiles?

In my tile map, created with 'Tiled', I placed some tiles that need to be avoided by my mobiles. Tiles like water or obstacles. The entities "wander" in the map, choosing random directions, and their ...
2
votes
2answers
79 views

box2d rendering performance degrading extremely even with sleeping bodies?

I'm working on my first smartphone game, a simple 2D platformer built with libgdx. Game maps use the Tiled level format, so a map is just a bunch of blocks. I recently started using box2d to implement ...
1
vote
0answers
46 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
42 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 ...
0
votes
2answers
92 views

Optimizing Collision Detection in a 2D Game

I am optimizing my "little" Java (LibGDX) shooter game, and perhaps unsurprisingly, collision detection is a "bottleneck"; I've kind of reached my performance goals already, but I want to tweak the ...
0
votes
1answer
50 views

Dealing with multiple 2d sprite animations for the same object

I am using libGDX for a 2d game. Some of my in-game objects have animations, for example a soldier in top-down view that has a walking animation. That is working fine. Now, while walking, this ...
1
vote
0answers
30 views

Lag when drawing single Texture multiple times in libGDX [closed]

I am building a game where you are basically drawing little dots on the screen with the help of the accelerometer. I am using a single instance of an Actor where I store the coordinates that needs to ...
0
votes
1answer
62 views

Make camera move constantly upwards in box2d world

Im using libGdx to develop a 2d game, which has the following: The world moves in an upward direction by having a camera follow the player's y position. The user only controls player's x movement, ...
0
votes
0answers
31 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
1answer
36 views

Why isn't my aspect ratio calculation working on Android platforms?

I have this method: public final float aspectRatioHeight(float originalW, float originalH) { float newHeight = (originalH / originalW) * (Gdx.graphics.getWidth()-20); return newHeight; } To ...
2
votes
2answers
94 views

Entity/Component System - Unique Behaviour

So, I decided to see what the Entity/Component system of game development was all about. I really liked it. So, I decided to implement my current game with it. My problem: Unique Behaviour with the ...
1
vote
2answers
49 views

How can I attach a libGDX actor to a box2D body?

I'm creating game like hill climb racing. I created my car with the help of shapes and joints but I don't know how to attach graphics to it. I used actors and sprites before for the sake of learning, ...
0
votes
1answer
44 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
33 views

Libgdx: Android Facebook login with pure java code

I am integrating Facebook with my LIBGDX project and have everything setup (Facebook SDK, generated HashKeys, Facade pattern for platform specific Facebook API's, etc.). The Facebook dev tutorials ...
0
votes
1answer
25 views

Libgdx screen keeping text on screen from main Game class

In my libGDX app I have some text running on the main Game class, and when I switch to a different screen the text is still there? Can anyone explain this please. Also in my main class it is changing ...
1
vote
1answer
31 views

LibGDX change screen after 2 seconds

Ive tried using a timer in the render method but that just crashes my game, so how do I change screens after a certain amount of time after rendering.
0
votes
1answer
42 views

Sprite rotation LibGDX

I'am using the current mouse position to aim the player sprite, but I am not getting the best results. I want my sprite to have the direction pointed wherever my cursor is in the screen. Here's my ...
0
votes
0answers
17 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
1answer
41 views

How do I split a button graphic into a 9 patch?

I understand what a nine patch is but I don't understand how to create one with code. I've made an image with a 1-pixel black border, but how do I turn that into a nine patch? How do I make a nine ...
0
votes
1answer
25 views

Game info file? LibGDX android

In my app I need a file that I can keep settings like: TutorialSkip: True or AppDev: False and other info. How can I make this file and prevent users editing it? This has to work in the Core folder ...
0
votes
0answers
15 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
2answers
44 views

Help Understanding libgdx create animations example game

I am trying to understand the example game, cuboc. GitHub is https://github.com/libgdx/libgdx-demo-cuboc. I have generated my texture atlas but I do not understand the code that uses this texture ...
0
votes
3answers
47 views

LibGDX: Making an object move correctly based on real time

Below is an image of my gameworld. As we can see, the player starts at position 0. each cell represents 1 game world unit. My goal is to get the player to move 1 unit (the red cell) in 1 second in ...