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

How to specify core project path in Libgdx Project Generator?

I am following a tutorial on making a flappy bird with the Libgdx framework. -http://www.kilobolt.com/day-11-supporting-iosandroid--splashscreen-menus-and-tweening.html I am currently on the step of ...
0
votes
0answers
22 views

implement paper folding (origami) on android

i'm working on a game, i have been working with game engines like UDK and Unity for many years, now I come into Android and eclipse, i have a question and im really confused, lets describe. i want to ...
0
votes
0answers
8 views

Libgdx box2d crashing

im making a game in libgdx which i having a bunch of circle bodies floating around in space and when the player's body crashes into another body, that body deletes and creates two smaller bodies ...
-1
votes
0answers
37 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
32 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
2answers
42 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 ...
0
votes
1answer
40 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
54 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
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
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
1answer
28 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 ...
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
0answers
20 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
1answer
27 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 ...
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
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 ...
2
votes
1answer
41 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
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
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
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.
0
votes
0answers
54 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
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
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
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
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
2answers
38 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
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 ...
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
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
37 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 ...
0
votes
0answers
84 views

Implementing a game loop with interpolation

I am trying to implement the Game Loop interpolated found in this website http://www.gameprogblog.com/generic-game-loop/. Here is my implementation: long frameRate = 50000000; int maxUpdates = 3; ...
0
votes
1answer
41 views

Sprites and Box2d

I'm starting to see how box2d works now, except I dont know how to scale the screen to diffrent screen sizes and how i can convert Sprite sizes to box2d units. I know box2d uses meters and such, but ...
1
vote
1answer
63 views

How can I make this shader background more efficient?

I want to use a shader as a background for a mobile game. I'm using libgdx for my project. I've never written glsl before, but here's my attempt so far: http://glslsandbox.com/e#22332.13 On desktop ...
1
vote
0answers
18 views

Play videos via 3rd party library or as animation in libGDX?

I want to add an animated splash screen to my desktop game, which I develop using libGDX. Now I see there is no native support for videos in libGDX, so I guess I have two options: Include a 3rd ...
0
votes
1answer
27 views

LibGDX multiple enemies animations

Hello everyone i have a question about animating multiple enemies on the screen at the same time. Basically, i figured out how to use the Pool for creating enemies and dispose them after use etc.. ...
0
votes
0answers
26 views

Can't work with universal tween engine while having added it to gradle

I'm actually developing a game with libgdx and I'd like to create a splash screen. To do this, I must use the Universal Tween Engine. To add the Universal Tween Engine, I followed the instructions of ...
2
votes
3answers
197 views

Generating 3D-like effect

I'm making a 2D sidescroller game and want to give the blocks a 3D like effect. This way it looks like the player is walking on 3D blocks while walking on a 2D plane (thus having only x,y ...
0
votes
1answer
43 views

How can I draw things just in an area that can have a shape such as the shape of the letter B and not draw outside this form?

I want to draw stuff on an image, for Example, if I have a letter, as an image and I want to draw on the letter it is necessary that this image is touchable. This is what I did: Image.addListener ...
0
votes
1answer
42 views

Why table in libgdx game give wrong position

Can anybody guide me, I am creating a table in libgdx game on menu screen to set different buttons on my screen. here is the code for table draw table.setBounds(0, 0, Gdx.graphics.getWidth(), ...
7
votes
5answers
2k views

How can I mark levels as “complete” in a way that prevents cheating?

My first thoughts about marking levels complete is to just write the information to a file upon level completion and load that in once the app is opened up again. But how could I keep this safe from ...
2
votes
1answer
48 views

Libgdx Actions interpolation Fadeout

In libGDX there is a simple fade Interpolation that speeds up towards the end of the action animation. But what I am looking for is the reversed of it, it needs to start fast and slow down near the ...
0
votes
1answer
55 views

Move Box2D body towards mouse click

In a top down game using Box2D, I would like the player's Box2D body to rotate towards the mouse click, and then move to a point on mouse click (move, not teleport). I have worked out the rotation ...
-1
votes
0answers
37 views

libGDX sprite disappears after 5seconds

I`m learning java for some time and decided that I want to make a game using libGDX. Everything goes well except gravity and jumping. Im not using Box2D so i found tutorial where jumping was solved ...
1
vote
1answer
44 views

Why is the Hiero font not coordinated to fit neatly in the display window?

I imported a font with Hiero and I draw the font like: font.draw(batch, "1", 0, 48); This is the resultant image: So the font it moved up to hit the bottom perfectly, but it doesn't touch the ...
0
votes
0answers
20 views

Rendering a trail after an object as it moves [duplicate]

I'm struggling with implementing a "trail" effect after a vehicle - a rocket for example. I would like to have some control over it (erase a part of the path or possibly detect it's collision with the ...
0
votes
1answer
38 views

how can I split the screen into two screens and make Gdx.input.setInputProcessor () accept two processors?

I want to draw in the first screen portion, and manipulate the buttons in the second part. This is what I tried: if (mouse.x <600) { Gdx.input.setInputProcessor (new InputProcessor () { ...
0
votes
1answer
52 views

Libgdx, how do i get the translation and rotation of a node from a model instance?

I have a model instance of a character, and a model instance of a sword weapon. THe character has a node on his right hand so he can "carry" the sword. Right now I use this code so the sword's ...
0
votes
1answer
38 views

Make continuos movements with controllers in LibGDX

I've been trying to make the OUYA controlers work with a LibGDX Framework Practice Game. Everything is working perfectly expected for one thing : The movements are not continuos. The problem is, ...
0
votes
0answers
34 views

Choosing assets for different screen densities and sizes? (libGDX)

I am making a 2D game. As I understand it we typically have maybe 4 sets of assets (xxhdpi, xhdpi, hdpi, and mdpi) so that our game runs well on all devices. These are just scaled versions of the same ...