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
2answers
56 views

Downscaling an asset, still pixellated?

I created a rounded rectangle in photoshop, and I rasterized the rectangle before I saved it. Yet, when I try to use the rectangle in libGDX, it looks pixelated. How can I make it so that it's smooth? ...
-1
votes
0answers
32 views

Any Way to Optimize My A* [on hold]

Does anyone have any ideas for optimizing my A* Pathfinding method? It works, but creates some unusual behaviors and is not exactly efficient. Pathfinding Method: public void ...
-1
votes
0answers
30 views

Why is my animation not happening? libgdx / java [on hold]

public class Animator extends Player implements ApplicationListener { private static final int FRAME_COLS = 7; private static final int FRAME_ROWS = 1; ...
0
votes
1answer
34 views

Draw a line/curve for the path an object has taken

Hello I am making a game in libgdx. I want to draw a line/curve of the path a object have taken. First a thought I could save all positions of the objects each iteration and draw line between them ...
0
votes
1answer
52 views

Java, Crashing with a Shader on Intel HD Graphics

I just got a new computer (Acer Aspire ES1-311) which has an integrated Intel HD Graphics card, and I noticed that this fisheye shader crashes my game (LibGDX game, VM Crash): varying vec2 ...
0
votes
1answer
27 views

how to fix the character flip when using orthographic camer libgdx

i used orthographic camera to follow the character(player) but the problem that is my character is flipped there is no tutorials on how to fix this please help as fast as possible here is my create ...
0
votes
1answer
150 views

Using SVN with Libgdx

I decided to give LibGDX a try and am planning to use SVN for my code repository. I created my LibGDX project via the Gradle build as outlined in the book "Learning LibGDX Game Development". I'm not ...
0
votes
2answers
41 views

Why does this simple if-statement that checks my main characters state never get called (Java/LibGDX)?

Been working on this for a while - basically I want my player to perform a front flip when he jumps (screen tap -> player jumps). I wrote the animation class Animator (extends Player implements ...
1
vote
2answers
513 views

Matrix rotation wrong orientation LibGDX

I'm having a problem with matrix rotation in libgdx. I rotate it using the method matrix.rotate(Vector3 axis, float angle) but the rotation happens in the model orientation and I need it happens in ...
0
votes
1answer
51 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 ...
1
vote
2answers
102 views

How do I limit the rotation speed of a mouse-following object?

I am trying to make a 2D top-down game where player controls a spaceship. The spaceship (a rocket) is just a sprite following the mouse cursor with a fixed speed and is always pointing toward the ...
0
votes
2answers
30 views

Simple LibGDX Pong game drag player instead of getting x position

I got a working pong game in LibGDX but when I touch the screen the player x automaticly jumps to the coordinates I touched. I wan't my game to detect I touched and then move the player to the ...
0
votes
0answers
10 views

Libgdx LiveWallpaper [on hold]

I am working on Live wallpaper application, and this is my first libgdx application. my code is working but my problem is that more objects are coming.. how to reduce the amount of objects (Hearts) ...
0
votes
2answers
111 views

Card game - creating card Listener

I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand. I am new on game development and I'm following the ...
0
votes
2answers
56 views

How do I derive an appropriate acceleration value for my game?

I am creating a Flappy Bird clone from this tutorial. I have a question about acceleration in libgdx. The author assigned the bird a constant acceleration vector in the constructor of the bird ...
0
votes
1answer
410 views

How to follow object on CatmullRomSplines at constant speed (e.g. train and train carriage)?

I have a CatmullRomSpline, and using the very good example at https://github.com/libgdx/libgdx/wiki/Path-interface-%26-Splines I have my object moving at an even pace over the spline. Using a simple ...
1
vote
1answer
227 views

Word game - board implementation?

I'm working on a boggle type game for android, using libgdx. The user is presented with a 4x4 grid of letters and must find words by dragging their finger over the letters. Unlike boggle I want used ...
2
votes
1answer
40 views

How to save file in assets so it can be properly loaded in Android Studio?

I am following a guide on creating a replica of Flappy Bird. - http://www.kilobolt.com/day-6-adding-graphics---welcome-to-the-necropolis.html The step I am having trouble is loading the texture from ...
1
vote
1answer
76 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
1answer
869 views

LibGDX: Smooth movement on a grid based game

I'm making a game with LibGDX where the player is on a grid (like a Chess board). For now, I'm moving the player by teleporting him 16px in a direction. I'd like to use the delta time to make smooth ...
0
votes
1answer
26 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
51 views

Why does this impulse not affect the body?

I'm just getting started with Box2d and I'm trying to apply an impulse to a circle but nothing really happens. First I define ball: BodyDef bodyDef = new BodyDef(); bodyDef.type = ...
0
votes
1answer
594 views

Communication between Box2D and libGDX Stage (Scene2D) running in separate threads

I'm making a physics based 2D game using libGDX and Box2D. I want to move the execution of the simulation out of render thread. I use immutable messages and the BlockingQueue to pass the information ...
0
votes
0answers
18 views

How to determine the pixel coordinate values of regions in an image? [closed]

I am following a tutorial on how to make a flappy bird clone from http://www.kilobolt.com/day-6-adding-graphics---welcome-to-the-necropolis.html. I am on the part where the actual graphics of the ...
0
votes
0answers
12 views

How to experiment for the value of gravity in Libgdx? [duplicate]

I am following a guide on how to play a flappy bird clone in the LibGdx framework. -http://www.kilobolt.com/day-5-the-flight-of-the-dead---adding-the-bird.html I am currently on the part where the ...
0
votes
0answers
165 views

Libgdx/Box2D PolygonShape has no position… well, what now?

As my prototype works perfectly fine I want to advance to more fun areas of the project and add a more complex player-character body. So for Box2D I figured I'd need multiple fixtures, like one for ...
0
votes
0answers
30 views

Good practice/pattern to create and draw high resolution 2D fish [closed]

i simply want to create/draw a 2D fish with animation and implement it in my android application. For drawing i use gimp and the gameengine is libgdx. Why gimp? Because it is free and mighty and ...
0
votes
2answers
51 views

libgdx texture edge blending problem

I have two completely white bitmaps here: They're there, trust me. When I put one on top of the other and scale them down with TextureFilter.Linear I get this: How do I get rid of the dark ...
0
votes
2answers
160 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
31 views

Libgdx getting random position on screen is null?

So, I want to get the random position on my screen to spawn enemies on them. but here's problem. int randX = r.nextInt(screenWidth); int randY = r.nextInt(screenHeight); Apparently these are null, ...
0
votes
1answer
78 views

Box2D pixel to meter conversion

I have a game that was written in pixels and now I want to change it to meters like(box2D do). How I need to do that. I have wached a lot of tutorials and all they have some SCALING FACTOR but when I ...
0
votes
0answers
15 views

There is any nosql database for libgdx? [duplicate]

my question is simple. There is any nosql database compatible with libgdx? , I have googled it but I didnt find anything. I only found that libgdx iplements sqlite.
1
vote
1answer
91 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
1answer
960 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 ...
2
votes
1answer
647 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 ...
0
votes
1answer
50 views

Desktop and Android diference in rendering [closed]

I have my game setup and working on Desktop and Android. Once I create my core screen class, it stops responding on Android. I tested it on my phone too. It runs Android 4.0.3. Is there a special ...
0
votes
0answers
52 views

Create a Minimap of a Tiled Map with LIBGDX

thanks for stopping by to help! Having a little trouble with OrthogonalTiledMapRenderer. I've got a Tiled map that is 250x250 tiles, each 16x16 pixels. Trying to use a separate camera to draw a ...
0
votes
1answer
68 views

Multiplying by delta not giving smooth movement

I started working on my first proper game but reached a problem straight away. In short I have a game that runs most of the time at 60 fps. ( I am using Libgdx a popular Java framework) but my game ...
0
votes
2answers
126 views

get View from LibGDX for Android

I am making a LibGDX app, and I need to get the view to put to an Android app. Here is the code to get the view: package jangkoo.game.shadowfiend.android; import ...
0
votes
1answer
39 views

How can I test if the mouse draw on the active tiles?

I want to draw some sprites in a tiledmap where the tiles are active. I want to draw with the mouse, so how could I compare the position of the mouse, the sprite position and the position of active ...
0
votes
2answers
37 views

Libgdx getting screen size

I'm working on libgdx project. I basically recreate my game which I coded in xna to make it available for android. Here's the problem android has many screen resolutions, and I want to know how to get ...
0
votes
0answers
7 views

Cut parts off a nine patch LibGDX

As you can see in the image i would like to cut off a few of the boxes when rendering teh nine- patch: Bits to cut off: Are there any LibGDX methods to cut off those bits?
0
votes
0answers
55 views

Reading a file with unknown encoding [migrated]

I use libGDX for developing a game for Android platform. In my game, I'll have to parse some file that contain some settings (skin customisation, user map reader). My current code works for, at ...
0
votes
0answers
25 views

How to properly import a .tmx file with the image used to create it?

I tried to create some maps with tield map, and the image I use to create this map(tielset texture) is stored in the desktop. But after the map generation, I copied the file (map.tmx) and ...
2
votes
1answer
362 views

Setting uniform value of a vertex shader for different sprites in a SpriteBatch

I'm using libGDX and currently have a simple shader that does a passthrough, except for randomly shifting the vertex positions. This shift is a vec2 uniform that I set within my code's render() loop. ...
0
votes
1answer
76 views

LibGDX Bounding Rectangles

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate ...
3
votes
1answer
861 views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
0
votes
1answer
80 views

Why does my libgdx app just display the badlogic.jpg instead of my start screen?

I have been looking at example libgdx games. It looks like https://github.com/libgdx/libgdx-demo-cuboc is the closest thing to a game I would like to make. I am able to download, compile and execute ...
0
votes
0answers
31 views

Maximum tile and texture size for tiled maps

I'm currently making a game using libGDX and Tiled. Everything was running fine until I changed the tile size from 96x96 to 300x300. Most layers are still displayed correctly but the tiles of a ...
0
votes
0answers
36 views

How to use offline gradle for libgdx projects?

I use Android studio 1.0 and this version has offline gradle 2.2.1 . When I create a libgdx project, it starts to download gradle 2.2 but I have slow download speed and can't download it. How can I ...