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

Sprite transparency not effected libGDX

I am making a game using libGDX and Tween Universal Engine. My problem is as follows: I have 2 screens so fars, a splash screen with the logo, and a second one which is the main menu. In the splash ...
2
votes
1answer
40 views

How to create groups in libGdx?

Can any of you please demonstrate a simple example on how to use groups in libGdx ? so if i move the parent, then all the children will move with it and same goes for rotation and scaling. I looked ...
-1
votes
3answers
133 views

how to design transparent screen in libgdx

this question is for LibGdx geeks. I want to make transparent screen in my game. For example, when level completes I want a new transparent screen pop up and show player's high score, buttons to ...
0
votes
2answers
119 views

Libgdx detect when player is outside of screen

Im trying to learn libGDX (coming from XNA/MonoDevelop), and I'm making a super simple test game to get to know it better. I was wondering how to detect if the player sprite is outside of the screen ...
0
votes
1answer
631 views

Textures quality issues with Libgdx

I have drawn several vector objets and characters ( in Adobe Illustrator ) for my game on Android. They are all scalable at any size without any quality losses ( of course it's vector ^^ ). I have ...
0
votes
1answer
199 views

LibGdx efficient data saving/loading?

Currently, my LibGDX game consists of a 512 x 512 map of Tiles and entities such as players and monsters. I am wondering how to efficiently save and load the data of my levels. At the moment I am ...
1
vote
1answer
248 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
0answers
48 views

box2dlights conelight rotation is off

I'm using libgdx/box2dlights for my game~ I have a conelight set up as such: ConeLight cl = new ConeLight(rh, 32, new Color(0f, 0.0f, 0.0f, 1.0f), 3, 0, 0, 0, 1); where "rh" is a RayHandler set to ...
0
votes
1answer
29 views

revolutejoint doesn't seem to rotate

I have a revolute joint set up as such in libgdx + box2d: RevoluteJointDef rjd = new RevoluteJointDef(); rjd.initialize(body1, body2, arm.getWorldCenter()); rjd.motorSpeed ...
1
vote
1answer
126 views

Most efficient way of brighten and darken sprites with OpenGL > 2.0

So I have been shading (brighten/darken +adding color) my sprites by using glTexEnvf with GL_MODULATE and GL_ADD and a vertex color. I only had to rebind the batch every time I needed to change from ...
0
votes
1answer
153 views

Cover Screen with Snowing Effect in Libgdx

Oddly enough I cant find clear instructions on this theme (I only found rain and the method is very particular) so I ask, how do I implement a whole-screen snow-falling effect? The methods i can ...
0
votes
2answers
194 views

Libgdx: movement of scrolling background is not smooth even at 60fps

I'm developing a game and I want to make a sliding background. The background is not scrolling smoothly. I logged the fps, but it was ok. This is my code, I don't know what I'm doing wrong, any ideas? ...
1
vote
0answers
71 views

html5 libgdx project: war to be deployed in a servlet container or only part of the contents to a web server

I am new to compiling games with libgdx to be played on the web and I have some doubts perhaps someone can point me in the right direction: Using the new gradle setup I wrote a simple game to learn ...
0
votes
2answers
211 views

How do you create fnt (angelcode format) files from existing bitmaps?

I often gets the same problem: Someones creates a nice bitmap font for me in form of a sheet nicely formated into a png, like this: ...and i need to create the angelcode .fnt atlas for using it ...
0
votes
1answer
98 views

Create 2D sprites with libGdx using a shape and a texture separately

I am creating a 2D game with LibGdx that will have creatures that are generated from dozens of characteristics with potentially millions of unique combinations. For each segment of each creature, I ...
0
votes
1answer
51 views

TiledMap resizing and aspect ratio with LibGDX

I'm making a game and I don't know how to resize my TiledMap when the window is bigger but keeping its squared shape. Here is a screen: When I change window size, here's what happens: I want ...
0
votes
2answers
6k views

How to rotate a sprite on circle in android using Libgdx

Dear Fellow Game Developers i am newbie to Android Game Development,i like to know how we can develop a sprite rotate in circle on android,with help of libgdx, i do have a image in assets ...
1
vote
1answer
191 views

Android LibGDX game: Choosing starting activity

I am making a Android game with LibGDX (using ADT eclipse bundle). How do I choose the default activity to launch when the user opens the app. I set the project up with the LibGDX setup GUI, and I ...
0
votes
1answer
86 views

libGDX SpriteBatch reuse

Using libGDX, sprites or simply texture regions must be inserted into the batch for drawing: void render() { batch.begin(); batch.draw(...); batch.end(); } Is the VBO being uploaded ...
2
votes
1answer
211 views

Conceptual - What is the optimal way to combine steering behaviors with rigid body physics?

I am working on a simple 3D space simulator that makes use of the Bullet physics engine. The spaceships are rigid bodies that have a mass and hitbox so that they can be considered for collisions. At ...
0
votes
1answer
52 views

Resizing the window moves and stretches the texture

I have a basic screen with 3 TextureRegions rendered on the screen rendered with this code(Ignore the hardcoded numbers, bad decision I know will be replaced later): Gdx.gl.glClearColor(0, 0, 0, 0); ...
2
votes
2answers
127 views

how do I create a moving type of block like in Mario[box2d]

I want to create a block which only moves up and only when hit from below. I am trying out a distance joint and I read it can be used as a spring, is this the correct solution? the way I have tried ...
3
votes
1answer
1k views

How do I generate mipmap .png and model .obj files for LibGDX?

I'm playing a bit with LibGDX (OpenGL ES 2.0 wrapper for Android). I found some sample code which used prepared files to load models and mipmap textures for them, e.g., at ...
1
vote
1answer
209 views

How do I combine images into a single entity in libgdx?

I've googled this but can't seem to find anything on "concatenating" two images, especially with libgdx. Any ideas?
0
votes
2answers
124 views

Smooth camera movement between followed objects

I have 2d game where my camera follows the player. Simplified, it copies the player position as its own. Now I have some other object in the game, that I want to camera to follow. This is easy enough ...
0
votes
0answers
45 views

Box2D and randomly generated tilemaps

I am making a 2D Terraria-style sidescrolling game. I want to use box2d for the physics. However, I am using tilemaps for the maps, and I do not know of a processor-efficient way to use Box2D bodies ...
7
votes
2answers
638 views

How can I make a snake's tail follow the head?

Following an assignment and just getting started with libGDX by building a small Snake clone I've run into an issue that I'll probably be ashamed for in a little while. I currently have a snake's ...
2
votes
1answer
876 views

2D game world creation (libGdx, java)

I'am starting to develop a 2D game with motorbikes. My Question now is: When my bike reaches the right edge the world should move. (Like in that game: Game example) My first thought was to implement ...
-1
votes
2answers
79 views

How to implement “move to touch location” function?

What is the formula/logic to implement moving an object towards a TOUCHED location. I want character A to move to my finger and it must be accurate. Here is what I have tried so far: @Override ...
1
vote
1answer
170 views

LibGDX keep camera within bounds of TiledMap

I have a simple TiledMap which I can render fine. I have a player hopping (with Box2D) around and my camera follows the player around: cam.position.set( player.position().x * Game.PPM + ...
0
votes
2answers
115 views

Conditionally use java or android classes

I'm using bezier curves in my libgdx project. I was testing the desktop version using java.awt.geom with GeneralPath but when I went to test on android, it raised an error saying that I can't import ...
1
vote
2answers
83 views

libgdx: How do you remove a cell from TiledMap?

I am making a Terraria-style sidescrolling game with an open world. I am using a TiledMap to render all of the tiles. If I want to remove a tile, like if it is broken, how would I stop it from being ...
-1
votes
1answer
52 views

Game slow with older phone [closed]

I've made a game using libgdx. On m'y HTC One X, the game works good, even if there are some lags but only at the beginning. I wanted to try it on an older phone (well a less powerfull phone), a ...
3
votes
1answer
227 views

How can I create a fade effect between scenes in Libgdx?

I have implemented a screen fade with Scene2D. It currently fades fades out of one screen to black, then then from that black into the next screen. It would be really awesome if I could fade ...
0
votes
1answer
154 views

How to start an animation just once on an event in libGDX

I am trying to show an explosion animation which i created using a few textureregions and created Animation missileblastAnimation from those textureregion like this -- > TextureRegion[] explosion = ...
0
votes
1answer
88 views

Parse and iterate over SVG path

I need to parse a SVG path expression like m8,295c-4,-292 441,-291 446,-26c5,265 440,263 442,-9 and have a way of iterating over it in [0 ... 1]. I looked into Apache Batik but it doesn't seem to ...
1
vote
1answer
85 views

Why is my text is too large even when scaled to .05f in libGDX?

I'm trying to scale down my fonts as my game objects are also small. I'd like to scale them down the same way as my sprites. However, if I scale them below .05, the font disappears! My attempt at ...
0
votes
0answers
36 views

libGDX Tilemap spritesheet size requirements?

I'm having an odd problem with libGDX. I have two spritesheets: http://postimg.org/image/iqj2w03sn/ and http://postimg.org/image/ofzbgb9yv/ [These sheets are from the Pokemon essentials builder ...
2
votes
2answers
183 views

How do I make a puzzle piece move smoothly between locations?

I'm building a 2048 clone to sharpen my Libgdx skills, but I don't know how to ease a tiles between board locations. When I slide my finger, the tile moves rather swiftly. How I can make the movement ...
5
votes
3answers
324 views

Creating Platform game with Inclined Levels

Till now I have developed platform games in which a player can only move and detect tiles linearly. I wonder on how to implement games in which a player can move on an inclined or irregular surface. ...
2
votes
1answer
48 views

RGBA values not coming as intended | LibGDX

As it states, my RGBA values aren't coming out the way I want it to be. My RBGBA values are As it states, I am trying to create a orange tinted color on my game. 221, 189, 98, 0.7 I am using a ...
1
vote
1answer
213 views

Libgdx collision detection and response

I am trying to create a simple platformer game with libgdx. I implemented a collision detection for the player's bounding box with the map's tiles using the Rectangle.overlaps method. In response I ...
1
vote
0answers
281 views

How to correctly set window size in Libgdx scene2d.ui dialog

In my libGDX application I am using the scene2d.ui classes to render my game's GUI. One of the things I render via these classes is a dialog window with a background image set. I have created the ...
2
votes
1answer
85 views

Using Box2d to model rotating turret

I would like to model a rotating "turret" on top of a tank-like object in 2D from the side view like pictured here: Notice the faint outline of a gun protruding to the upper left courtesy of ...
1
vote
0answers
1k 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 ...
7
votes
3answers
5k views

Advantages and disadvantages of libgdx [closed]

I've been an android developer for a while and am thinking about getting into gaming. While looking for a game dev framework, I thought libgdx provides very friendly documentation and functionality. ...
0
votes
0answers
245 views

Libgdx and ParticleEffect with scene2d not showing the same way as in the Particle Editor

I am developing a new game with libgdx and trying to implement ParticleEffect in scene2d (using actor). I am creating a ParticleEffect with Particle Editor in which I would like to add to a stage. ...
0
votes
1answer
67 views

my movement is working good on keyboard but on android its not

So basically here is what my movement is like for keys: key down if (keycode == Keys.LEFT) { mishi.getAcceleration().x = -13; } key up if (keycode == Keys.LEFT) { ...
6
votes
3answers
2k views

How do I render a PNG with transparency in LibGDX?

I'm building a simple tic-tac-toe example with LibGDX. I have simple images: cross, circle and board, all pngs created with GIMP with a transparent background. How can I render them as a Texture with ...
0
votes
0answers
58 views

Using libgdx to display different textures above and below generated terrain

I'm working on a Scorched Earth clone using libgdx. So far I've been able to dynamically generate the terrain as seen in the screenshot below: The polygons below the terrain surface are currently ...