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
1answer
34 views

Images not found in textureregion

Previously I was using simple Texture for sprite based animations, but that did not provide support for images which were not in the power of 2. TexturePacker provides with the ability to load all the ...
0
votes
0answers
23 views

Two almost similar Android projects having same project structure in eclipse not installing in my phone

I am trying to make a game using Libgdx. I am new to Android and LibGDX. I made a simple game skeleton that contains the Player with abilities to move and jump and an enemy. I did all using Scene2D ...
0
votes
1answer
33 views

LibGDX with Android UI

Hello I want to combine between android UI and libGDX. I want to have half of my screen with libgdx engine (animated sprite) and the other half of the screen with android UI buttons. Does anybody know ...
0
votes
0answers
15 views

Texture Region drawing issue with LibGDX

I am currently moving my old slick2d project to libgdx. I have created a custom AnimationExt class that extends Animation to which I added a draw method. The Animation's frames are actually ...
0
votes
0answers
18 views

Trouble Reading Image File and Directory from Assets Even if it's Correct

I was wondering, I used the right directory of the image file and name as well for the app. Strangely, I got an error on this result after I run the app and rendering an image whose image length and ...
0
votes
1answer
36 views

Input events not working simultaneously on android devices in libgdx

I am making a simple platform game in Libgdx... in which I have made the player to move left, move right and jump. The code works fine on Desktop but on Android devices, Jump is not fired when the ...
-2
votes
1answer
38 views

touch events in bottom of screen (movement and jumping) [closed]

Ok, I want to implement this screen . I want to make the buttons Right,Left and Jump. Right now , for movement (right and left) I use: public boolean touchDown(int x, int y, int pointer, int ...
0
votes
1answer
18 views

Problems implementing a Sign Sprite in Libgdx

I am making a tile based game in LibGdx. I am using the TiledMap in .tmx format. I want when my player reaches a tile whose property is set (tileType -> sign), he should see a Sign sprite and on ...
-2
votes
0answers
32 views

libGDX vs AndEngine vs any other game-engine? [closed]

i am going to make a game like 2D-ARCHERY for Android,iOS & Windows with world-wide scoreloop & in-purchase enabled. but right no i am not worried about windows & iOS.I have all knowledge ...
-4
votes
1answer
35 views

Add scores & display it at top left corner of the screen? [closed]

public class Drop implements ApplicationListener { Texture dropImage; Texture bucketImage; Sound dropSound; Music rainMusic; SpriteBatch batch; OrthographicCamera camera; Rectangle bucket; ...
0
votes
1answer
38 views

how to use texture atlas

I am trying to implement texture atlas. 1) I am using the texturepackerGUI and the result is taking 2 files , one png (whicj contains all the images and one .atlas (and not .pack). 2) Now , I want ...
0
votes
1answer
278 views

LibGDX Perspective Camera for 2D

I'm very new to LibGDX and I'm trying to use DecalBatch with PerspectiveCamera, simply to have z-coordinate for my sprites, as SpriteBatch does not offer that. However, I don't know how to calculate ...
1
vote
1answer
35 views

Recording and playing back sounds with LibGDX

How do I record a sound to PCM format and replay it from there?
1
vote
0answers
34 views

TIled map rendering in libgdx

Good day. First of all, some explanation of situation. Init tiled map code: map = new TmxMapLoader().load("maps/map.tmx"); mapRenderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); Rendering ...
0
votes
1answer
366 views

Gesture Detector not firing

So I'm trying to create a input class that implements a InputHandler & GestureListener in order to support both Android & Desktop. The problem is that not all the methods are being called ...
0
votes
1answer
34 views

how to get width and height of TiledMap in the latest Version of Libgdx

I am making a tiled based game, I want not to let the camera show places, where there is no map... this is a obvious solution I got from a tutorial if(camera.position.x<400){ ...
3
votes
1answer
43 views

How to setup libGDX project only for Android & iOS?

I have developed some applications on android.But now i want to learn game development in Android & iOS with libGDX. I want to only develop for Android & iPhone.I do not want a desktop ...
2
votes
2answers
307 views

How do I get the touch event on a body in Box2d(Java)

I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition of ...
0
votes
1answer
59 views

adding vertical scrolling to 2D platformer in libgdx

I am trying to make a two sided platform game in Libgdx. Where I am scrolling through the TiledMap. I was easily implementing the horizontal scrolling using.. camera.position.x = ...
1
vote
2answers
53 views

How do I use TextureRegion?

I can't understand how to use texture region. I have a png file which has images (sprite sheet) and I must "extract" every image I want. From here it just says TextureRegion(texture, 20, 20, 50, ...
-1
votes
1answer
54 views

no custom background - touchdragged method? [closed]

I am beginner in libgdx and trying to experiment .I am using the simple example here .So, I have 2 questions: 1) I want to use my background picture.So, I have a class Assets where I have all the ...
5
votes
1answer
160 views

Generating a physics body for 2D Worms-like Terrain

I wrote a processing sketch that generates hills for a scorched earth clone, like this: I'm trying to figure out how to make this a physics object in libgdx, but I'm having problems figuring out ...
2
votes
3answers
787 views

Hide collision layer in libgdx with TiledMap?

I'm making a 2D game with libgdx, and I'm using its TileMapRenderer to render my map which I have made in the map editor Tiled. In Tiled I have a dedicated collision layer. However, I can't figure out ...
0
votes
0answers
23 views

Collisions using Tide editor and libgdx [duplicate]

Im starting using libgdx and the tide editor for maps. I have a doubt about defining the collisions of the tiles I draw on the editor. I would like to create tiled maps for a top down perspective ...
-2
votes
2answers
106 views

What parts of my RPG should I develop first? [closed]

I'm developing an RPG, using java + libgdx, and I've got box2d, basic scene2d, tiled maps, and tablelayout/menu set up. However, I'm not sure what to develop in what order, I always just developed ...
1
vote
2answers
104 views

Libgdx: Am I abusing Vector2? Is there a better way to do my position updates and rendering?

I'm simulating hair in a game. Currently I have a HairField object, which has a position defined by a Vector2. Each HairField has multiple Hair objects in a list, each with a position defined by a ...
0
votes
1answer
136 views

Libgdx import bin/xml/json from physics editor

I'm using Libgdx. I did a simple json file in Physics Body Editor and I don't have any idea how could I import it into my physic world in libgdx. Any idea will be appreciated. P.S: Sorry if there ...
0
votes
0answers
24 views

Problem Implementing Texture on Libgdx Mesh of Randomized Terrain

I'm having problems understanding how to apply a texture to a non-rectangular object. The following code creates textures such as this: from the debug renderer I think I've got the physical shape ...
0
votes
1answer
131 views

Pick and Drop the Ball Testing Without Replicating the Physics Frame

I am making a program that pick, drag, and drop the ball. In real life, once you pick the ball and drop it, whenever the available object is (what you see is what you get) will only be picked and ...
0
votes
0answers
19 views

AdMob integration on iOS with libgdx

Using libgdx is quite simple to embed AdMob banners on Android, following this guide. I would like to know if it is possible to embed the same banners in the app while compiling the project with ...
-2
votes
0answers
138 views

AI movement crashes program? [closed]

I'm working on some simple AI in a 2D platformer in libgdx. I'm trying to make it so the AI will patrol between two predetermined points. I've created a basic move and patrol methods here public ...
0
votes
1answer
30 views

Moving a Box2D object in the direction it is facing using applyForce [duplicate]

I'm trying to apply force to a polygon physics object to move it. Whilst I can get it to move upwards easily enough, I'm trying to get it to move in the direction in which it is pointing. Here's my ...
2
votes
1answer
285 views

Change the scale-policy of OpenGL ES in Android?

I currently develop a game for Android in OpenGL ES 1.0, use libgdx library. I target the 720x480 screen size. For example, I design only one arts pack for 720x480. And what will happen in Android ...
0
votes
0answers
33 views

Box2D physics object rotating for no reason? [closed]

I have a physics object in LibGdx (Using Box2D). I'm applying an impulse of (new Vector2(0, 18f * MetersToPixels) (MetersToPixels is = 15f). The gravity in the world is equal to (0, -9.8f). My ...
5
votes
1answer
134 views

What files of libgdx can I ignore on git?

In libgdx auto created project, What files can I ignore on Git (or another revision control system)? E.g Should I ignore: *-android/.settings/ *-android/bin/ *-desktop/.settings/ *-desktop/bin/ ...
0
votes
1answer
74 views

Dealing with “jumping” sprites: badly centered?

Thing is, I've used darkFunction Editor as a way to get all the spriteCoordinates off a spriteSheet for each individual sprite, and parse the .xml it generates inside my game. It all works fine, ...
0
votes
1answer
42 views

Libgdx: setting windows's icon

When I export my game as runnable .jar file with custom window's icon - it doesn't run. It runs only in debug mode and when I try to launch .jar with console it says that it cannot load icon file. ...
-2
votes
1answer
93 views

How do I make a button that can only be pressed once / you can't hold it [duplicate]

I've created a button by checking if the left mouse button is being pressed and the cursor x/y are in the boundaries of the button but the issue is that if you even hold it down for longer than a ...
4
votes
0answers
85 views

How can I achieve smooth shading / glow from one tile to another?

I've been working on a tile-based game in which some areas may be lit (currently seen), some may be black (never seen) and some may be dark (previously seen, but not currently seen). Looking at the ...
0
votes
0answers
27 views

libGDX TileMapRenderer not doing anything

I was using this tutorial and tried to make the TileMapRenderer work, but I can't. It never renders anything, no matter what i do. EDIT: I found out that the problem has nothing to do with the code. ...
1
vote
0answers
828 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
votes
0answers
32 views

Libgdx ball game [closed]

I'm really new to Libgdx engine. I've been trying to make a ball move randomly and bounce of the edges. It took me two days and I couldn't do it. I only have the ball bouncing up and down. There is a ...
0
votes
1answer
55 views

questions about position and size

I am new to game development and I wanted to ask a question. I am reading the simple game example from here. 1) I want to ask why we define bucket.x = 800 / 2 - 48 / 2 ? How is that? Why not just ...
1
vote
1answer
37 views

Black areas on different screen sizes

I'm currently facing some problems with sprites/images on different screen sizes. For now the game stage is stretched to maximum width and height of the screen. In Samsung Galaxy S2, SGS3 and SGS4 ...
0
votes
2answers
104 views

What is the better way of generating levels in android game using LibGDX

I downloaded the source code of metagun for android from https://github.com/libgdx/libgdx/tree/master/demos/metagun/metagun-android The game uses a png image to create the level. It uses the ...
0
votes
1answer
46 views

libgdx keyboard input

I'm trying to figure it out how to check if keyboard key was released. I tried messing around with InputMultiplexer, InputProcessor, etc. Nothing helped. Not enough documentation from lib developers ...
2
votes
1answer
109 views

libgdx collision/picking

I am trying to make something with java libgdx (2D). One thing that I can't figure it out is how to check mouse intersection with (fore example) isometric textures that are not rectangle shaped ...
2
votes
2answers
331 views

How to detect a touch on transparent area of an image in a (libgdx) stage?

Can some one please help to detect a touch on an image which I am using as an actor in a stage. The image is actually a long diagnol brush which has plenty of transparent area. The problem is when I ...
3
votes
0answers
54 views

2.5d with box2d - approaches from the top and bottom

So, I'm using box2d for my 2.5d game (think double dragon, tmnt arcade, castle crashers) where you can move around on the z-axis (faked as y-axis movement). Basically, I have box2d only doing ...
-2
votes
1answer
128 views

How does the Goomba know it has been jumped on?

I'm developing a 2D tile game engine in LibGDX and I'm asking myself how to structure the whole thing. One of the key questions right now is how to implement Player-Tile interaction similar to this ...

1 2 3 4 5 6