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.
0
votes
2answers
45 views
Should I accumulate state time based on a global or a parameter?
Generally, we associate a "state time" with our sprites. Libgdx provides a method to do so:
float deltaTime = Gdx.graphics.getDeltaTime();
However, in the main game loop, we have a delta time as a ...
-1
votes
0answers
27 views
Two almost similar Android projects having same project structure in eclipse not installing in my phone [migrated]
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 ...
1
vote
1answer
40 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 ...
1
vote
1answer
37 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 ...
1
vote
0answers
17 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
20 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
37 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
40 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 ...
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 ...
1
vote
1answer
36 views
Recording and playing back sounds with LibGDX
How do I record a sound to PCM format and replay it from there?
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 ...
0
votes
1answer
35 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){
...
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, ...
0
votes
1answer
61 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
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 ...
-2
votes
2answers
107 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 ...
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 ...
0
votes
0answers
25 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 ...
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 ...
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 ...
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 ...
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 ...
0
votes
1answer
43 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 ...
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. ...
4
votes
0answers
87 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 ...
-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 ...
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, ...
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
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
110 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 ...
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 ...
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 ...
-1
votes
1answer
57 views
Android TCG structural design [closed]
I started developing tcg for android, using ADT bundle.
What is the right approach/way for making/storing cards/game info, local sqlite, some kind of data file? some service? or something else?
1
vote
1answer
44 views
How can I implement an asset update/download in a libgdx application?
I am building a game based on libGdx and I want to be able to check for and download updated assets at some point before the player starts playing. The game is being built for PC and for Android.
I ...
0
votes
1answer
25 views
Problem with Widget Event Reporting in Libgdx
So I'm trying to test an ImageButton on an Android device. I can get the button to appear on the screen, but when I press it nothing happens or appears on the log. Here is what I have in the Show() ...
2
votes
1answer
84 views
Confusion with Libgdx UI
I've started with Libgdx and am currently stumbling about trying to understand how to set up the interface. I have generated the base projects in Eclipse ( < proj-name >,< proj-name >-android, ...
0
votes
0answers
50 views
Libgdx project port to Html5 using GWT - Assets not being found?
So I have a Libgdx project done, and have been trying to get it to port it to html5 for awhile using GWT. Thing is, none of the application's assets are being found because (I discovered just now), ...
1
vote
1answer
72 views
How do you implement Libgdx touchDragged?
I'm a beginner in Java and in Game Development too. I was following some tutorials, but now I'm stuck on implementing a touchDragged listener using libgdx,
Can anyone suggest how to drag the image ...
-1
votes
0answers
52 views
Skins for libGDX user interface [closed]
I am making a user interface in libGDX using the scene2d.ui portion of the library. To make a button, however, I need to have a skin. I was wondering if there is some sample premade skins available by ...
-1
votes
0answers
33 views
How to unbind a sprite in an updating vector? LIBGDX framework [closed]
How to unbind an updating vector to a sprite? I am using Libgdx framework. here is my code
public class VectorSample extends GDX_TEST implements InputProcessor {
Texture ball,bullet,guider;
...
-1
votes
1answer
92 views
Get distance between the edge of screen and a moving sprite
How to get the distance between the edge of the screen and a vector moving sprite? I want to get the distance between my moving sprite and the edge of the screen so that when my sprite touches the ...

