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

-1
votes
0answers
18 views

I am starting to program with LIBGDX and I can not display a Texture [on hold]

So I have just started to learn Libgdx game development. I am trying to add a texture to the screen but it is not appearing when I run the program. I will post my code below. Please help. Class 1: ...
2
votes
1answer
21 views

Libgdx : point that scrolls on the edge of a circle

I'm not very familiar with libgdx vectors. I want to create my own joystick-controller and I want to know how can I find the coordinates of B by using Vectors. I can calculate the radius and I have ...
0
votes
0answers
68 views

How can I make a swinging rope?

Base question: How can I make a swinging rope in box2d? Context: The idea is to have a rope where the player can grab it, swing a little bit to get more "momentum" and reach the next platform. Like ...
-2
votes
0answers
31 views

Support tools for game developing to use with LibGDX [on hold]

I'm starting to develop a 2D video-game and I choose LibGDX as game engine. It will be an android game, but later I think that I will use other platform too. I started to read some tutorials and till ...
-1
votes
1answer
24 views

How do you install Gradle in NetBeans so as to use LibGDX [on hold]

I'm following a tutorial for setting up LibGDX for use with NetBeans. Link to tutorial: ...
1
vote
1answer
81 views

When Libgdx says “for Desktop”, do they mean native executables?

I want to clarify whether the Java Framework "LibGDX" can be used to compile games to native executables. The description/strap-line says "Desktop/Android/HTML5/iOS Java game development framework". ...
0
votes
1answer
23 views

Why can't I reference a sprite loading variable in a separate class?

When I reference a sprite I declared in a separate class that I am using to load images and rectangles, I get an error. Here's how I reference the image in the render method: ...
0
votes
1answer
38 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 ...
1
vote
1answer
97 views

Why is there a huge update-delay in my client/server code?

I'm working on my Java game with Libgdx and having trouble with the network code. I can create a server, make multiple clients connect to it, but there is a huge delay between the player's input and ...
0
votes
0answers
19 views

LibGDX Box2D TileGame Efficiency

I am trying to implement Box2D into my top down tile game in LibGDX. Each world consists of a set of chunks, and each chunk is 16 tiles wide/long. The maximum/minimum chunks loaded at one time is 9 (a ...
1
vote
1answer
45 views

How to properly change resolution

I'm trying to understand how LibGDX handles screen size / resolution, etc. Coming from XNA this seems very confusing to me. Basically I want to support 480x800 for my game. If the screen size is ...
1
vote
2answers
71 views

How to create Whirlpool/Vortex effect?

Im trying to make a Vortex effect on a Circle Body that is a Sensor. I've been looking for this and all examples i look for are in C++ or Objective C and i dont seem to translate them well. when my ...
2
votes
3answers
58 views

Box2d bodies that are really close together, are getting “stuck”

I'm using a tiled tmx map, and I created a class that adds bodies to each tile within a certain layer. This has been working great so far except for when a character or an enemy moves around on the ...
-1
votes
0answers
18 views

TextureAtlas issue get texture

I have a texture atlas and I want to get a specific texture in it by name, but I get all textureAtlas with all texture. Why? This is the code: this.textureLeft= ...
-2
votes
1answer
63 views

libGDX How to make camera follow the player? [closed]

I'm having some trouble getting the camera to even work at times. Thankfully, its some-what working now. I'm trying to get the camera to follow the players movement but nothing happens. (cut out the ...
1
vote
0answers
27 views

LibgGDX drawing two seperate Textures in FrameBuffer

So I am trying to combine multiple TextureRegions in to one by using a FrameBuffer. This works extremely well when the TextureRegions originate from the same Texture object/file but as soon as I try ...
0
votes
1answer
33 views

Set uniform per sprite using libGDX SpriteBatch

I am using a SpriteBatch to render large amounts of sprites very fast. Now I want to modify the sprites with shaders to tint them in a color. Problem 1: Altering an uniform by getting the shader and ...
0
votes
1answer
10 views

Libgdx with Scala: Overwrite listener

I try to learn Scala the fun way, with a little libgdx project. Now I'm somewhat stuck: val go = new TextButton("Go", style) go.addListener(new ClickListener() { override def isPressed() : ...
0
votes
0answers
23 views

How to get the amount of bytes received from KryoNet server?

I'm using KryoNet and I wanted to see how many bytes were were received from a server, could anyone tell me how could I achieve that? Please provide sample code or an example for how to do it.
0
votes
0answers
39 views

LibGDX MainMenu with ScrollPane - Select Level and press Play

In my level Menu, I am using tables that have images and text to identify each game level. Those tables are in a table that is inside a ScrollPane so the player can browse the levels available. Here ...
0
votes
0answers
46 views

Handling in-game events/scripts in LibGDX? [closed]

I'm testing some RPG-like features in LibGDX, and having difficulty handling events (such as a sign that opens a text box with specific text). I have a basic prototype method to handle events, ...
0
votes
1answer
51 views

Cant center screen between black bars

As I was trying to adapt my game to different device resolutions I ran into a problem when adjusting the game screen between the "black bars." In my case I am using the FitViewport class from the ...
0
votes
1answer
29 views

Mouse coordinate conversion Libgdx

I have a camera: //Map is a my object that wrapper of TiledMap class In the create method: this.renderer=new OrthogonalTiledMapRenderer(this.map.getMap(); this.camera=new OrthographicCamera(); ...
0
votes
0answers
49 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
20 views

LibGDX ShapeRenderer graphical glitches

So drawing something static on the screen with the ShapeRenderer is fine but whenever I try to move something it starts glitching out. Here's a vine to show what I mean: https://vine.co/v/OBxFi1P2IO9 ...
0
votes
1answer
42 views

Only render/calculate the chunks in frustum!

I have a 2D world in form of a Block[][]-Array that holds all the blocks of the world. Every block has it's own Box2D Body (I want a "minecraft"-like 2D world for this project). Naturally I don't want ...
0
votes
0answers
28 views

Camera rotation issue Libgdx

I have a OrthographicCamera and I want to rotate 90° it, but when I rotate it seems to be shifted more to the right. Before rotation: http://postimg.org/image/tc9jpq9zr/ After ...
-1
votes
0answers
22 views

AdMob Libgdx Full Screen Ad

favorite How can I make an AdMob ad in libGDX game ? For example I want to put small add at the bottom of some screens. but when the user loses I want to show a full screen add . any suggestions ?
0
votes
1answer
62 views

Enemy spawning problem [closed]

I've been trying to get my characters to spawn at random points through out the map. I have a camera which is following my main character (2D RPG Style) around the screen, but I want these "enemies" ...
0
votes
1answer
51 views

Coordinates issue vertical scroll Libgdx

I'm going crazy with this problem. I'll explain: I have a camera that falls down (flowing along the y-axis) which displays a TiledMap and declare the whole in this way: In the create method: ...
0
votes
0answers
32 views

Use LibGDX 2d particle editor with text? [closed]

Is there an easy way to use text in the LibGDX 2d particle editor. I want to show a score with an animation. Or must I create for each text an image (and a ParticleEffect instance)?
1
vote
0answers
53 views

libGdx Window .pack() not working

I'm trying to make a window, then use the pack method to get the right size, but the window maximizes instead. Here's my code: private Table buildOptionsWindowLayer() { winOptions = new ...
0
votes
1answer
79 views

Combining pathfinding with global AI objectives

I'm making a turn-based strategy game using Java and LibGDX. Now I want to code the AI. I haven't written the AI code yet. I've simply designed it. The AI will have two components, one focused in ...
1
vote
0answers
35 views

LibGDX: Why look BitmapFont pixelated on a scene2d.ui.Dialog?

When I use BitmapFonts directly on the stage table, the fonts looks normal (not pixelated). But when I use the same BitmapFont with the same size on a scene2d.ui.Dialog, the font looks pixelated. ...
0
votes
2answers
50 views

Libgdx, find Vector3 direction

I am using Libgdx along with Bullet physics. I have a vehicle moving. I would like to use a ray from the vehicles origin and in the vehicles forward direction. How can I create the forward Vector3 ...
1
vote
2answers
40 views

LibGDX . draw multiline text

I am trying to write a big text using BitmapFont in libGDX . But it shows on one line and the user can see only the first part of the text . How can I make that bitmapFont made new line automatically ...
1
vote
1answer
71 views

Box2D body rotation with setTransform

I' having a problem rotating a body with setTransform(), The body has multiple sensors that should rotate with the player. The rotation works but it rotates around the bodys local 0,0 position instead ...
2
votes
2answers
81 views

How to increase the acceleration of an object on the Y axis? [duplicate]

So far I am able to make the character fall at a constant rate but I am unsure how to make the character accelerate while falling. When the character is falling I have a line of code as such: ...
1
vote
0answers
25 views

Manage Admob Between Classes [closed]

I have a problem with ads because i want to disable the banner of ads in the game activity. I tried to use this guide https://github.com/libgdx/libgdx/wiki/Admob-in-libgdx#control but application ...
0
votes
0answers
29 views

Parabolic throw with set Height and range (libgdx) [duplicate]

Currently i'm working on a minigame for android where you have a rotating ball in the center of the display which jumps when touched in the direction of his current angle. I'm simply using a gravity ...
1
vote
0answers
75 views

2d libgdx: runtime level generation

I have encountered a problem during my first game development: I thought of a Array<Ground> groundArray that does groundArray.add when a new ground will appear on the screen, and removes oldest ...
1
vote
3answers
187 views

What datastructure would you use for a collision-detection in a tilemap?

Currently I save those blocks in my map that could be colliding with the player in a HashMap (Vector2, Block). So the Vector2 represents the coordinates of the blog. Whenever the player moves I then ...
1
vote
1answer
99 views

Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates?

I'm a noob and English is not my mothertongue, so please bear with me! I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based ...
0
votes
1answer
27 views

How to initiate a TCP secure connection using LibGdx to a remote server?

Can anyone point to a link or share with me a piece of code which does: - Base on LibGdx (Gdx.net package) - Use a TCP secure connection to connect to a remote server Many thanks
-1
votes
1answer
49 views

LibGDX Json not parsing full file

I'm trying to load a World with different Objects (World Objects and Entities). For that, I want to use Json. For less than two elements this works like a charm. But as I add more elements, some ...
0
votes
0answers
43 views

LibGDX - How to move Actor with fingers Code?

I am completely new to Game Development. I See all these Questions and Answers and Codes and I have no clue what to do with them. I need some Guidance. My Plan: I want my Actor to move up and down, ...
1
vote
1answer
75 views

Does scaling affect performance in OpenGL? [closed]

I've never been able to understand the best practice in this context. I usually want to ship my game with as minimum size as possible. So whereever possible, I try to use scaling of my graphics. Let's ...
0
votes
4answers
99 views

Accurate sprite rotation with mouse movement

I am using the current mouse position to aim the player sprite, but I am not getting the best results. It will often by off by a noticeable amount, or even a complete ~180 off if I go from one side, ...
0
votes
1answer
87 views

How can I create a button with an image in libGDX?

I am new to LibGDX. I am trying to develop a game for Android (so it will support different screen sizes), but I don't know how to put a button with an image. I tried ImageButton but I can't resize ...
0
votes
0answers
29 views

Cannot draw around the screen after zooming out with LibGDX projection coordinate

I've just started developing game in android using LibGDX. I've follow some samples and now my simple game can draw path when user move their finger around the screen. now problems appear when i add ...