Tagged Questions

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

Libgdx- Translate animation is not work [on hold]

In the libgdx how to scale animation.. this code has been not work. ScaleAnimation scal=new ScaleAnimation(0, 1f, 0, 1f, Animation.RELATIVE_TO_SELF,(float)0.5,Animation.RELATIVE_TO_SELF, ...
0
votes
0answers
47 views

Maze game 2D - simple solution [on hold]

I want create simple game for Android using Java in my app where user using his finger moves his hero from top to bottom of the screen, and have to avoid enemies moving from left to right randomly. ...
-2
votes
0answers
26 views

libgdx; how to slide the image ya popup

I want to slide the image foe Example any Car Racing game when choose any car than slide the car popup. thats my problem how to slide the popup in the libgdx. Ya how to use Translate animation ya any ...
0
votes
0answers
10 views

Stage renders for a couple frames and then never renders again [on hold]

I am trying to use a stage for buttons in a screen in my game. The first main menu screen renders the stage fine. But any screen with a stage that becomes the screen has this problem. I am using a ...
0
votes
0answers
31 views

LibGDX - Tiled Map Layer Collision [duplicate]

I'm currently using LibGDX for a Atari 2600 style dungeon exploring game. I use the Tiled map editor as my editor of choice. Plus it's the best in my opinion for mac. I'm using LibGDX because of it's ...
-1
votes
0answers
25 views

box2d bouncing ball [on hold]

I'm trying to make a program with Box2D that make a ball bounce, but its not working. I don't get any warnings or errors before running it. Here is the code: package com.project.test; import ...
0
votes
1answer
27 views

How can I change the appearance of the mouse cursor in libGDX?

How can I change the mouse a cursor to a picture using libGDX?
0
votes
0answers
12 views

Box2D shape/fixture position vs. body position

I load my rectangular shapes from a simple Tiled level into libGDX and want to create a physics world out of it via Box2D and attach sprite assets for rendering. I get the tiled object layer and ...
0
votes
0answers
17 views

(libgdx) how to make an actor transmits the events it receives to its children?

I use the following class : public class InGameMenu extends Actor{ /** VARIABLES **/ private boolean debug= true; private float x,y,width,height, margin; private static final String TAG = ...
0
votes
0answers
20 views

libGDX differences/advantages of GL30 over GL20? [closed]

So the question is pretty straightforward, what are the advantages and differences between using GL20 and GL30? I know that GL20 supports deferred shading and other nice lighting effects, what about ...
1
vote
1answer
13 views

How do I find the shape of Tiled's circles or ellipses in libGDX?

I created a level in the 'Tiled Map Editor' and loaded it into my libGDX game. I can easily transform almost all objects into Box2D objects (although this problem is not Box2D specific), but I have ...
1
vote
0answers
21 views

Changing Box2D Body from Kinematic to Dynamic after contact

What is the correct way to change a Kinematic body into a dynamic body? context - I have a dynamic body as a projectile which has to be fired at a kinematic body (it is kinematic because i am ...
1
vote
1answer
57 views

How would you declare a Texture object in the libgdx skin json file, using a region from a texture atlas?

I have a texture atlas that is linked to my skin.json file. The atlas contains a region named "game-title". I would like to declare a com.badlogic.gdx.graphics.Texture object in the json file, to ...
0
votes
1answer
24 views

Libgdx desktop windows resize

I have tried to make game with libgdx I want to create 3x3 grid in the middle of screen I ran the desktop project, it seems that not much problem at all, but if I resize the windows the 3x3 grid move ...
0
votes
2answers
50 views

Random undirected graph generation

I would like to generate graphs randomly, like this: I have found that Box2d maybe can do it to me. But I do not know, how to use it, so how can I generate bobies after world initialization?
0
votes
0answers
30 views

libGDX fixed object and camera do movement

I develop game to andorid and there is moving object with arrows - simple movement like in RPG games. I did: camera.position.x = PIXELS_PER_METER*man.body.getPosition().x; camera.position.y = ...
0
votes
0answers
19 views

libGDX new TextureAtlas(filename) and new Texture(filename) drawing stale image data

I'm trying to draw an image using libgdx but no matter what I do, libgdx seems to insist on drawing a portion of an image I had loaded and used in an earlier game screen. In my current game screen ...
0
votes
0answers
79 views

libgdx building 3D terrain

I've been spending a lot of my time working with libgdx scene 2d & have become very familiar with it. I've decided I want to move over to 3D & take a couple of weeks to learn & better ...
1
vote
0answers
39 views

Why does my texture-based object picking detect the wrong object?

I am a LibGDX beginner implementing a RISK-like game. I want to let the player select territories by clicking on them, but for some reason, the wrong territory is sometimes detected. The clicked ...
0
votes
1answer
21 views

Sprite rotation in libgdx

Is it possible to rotate my sprite in LibGDX? public class Flame { private static final int FRAME_COLS = 6; private static final int FRAME_ROWS = 1; private Animation flameAnimation; private ...
2
votes
0answers
36 views

Why do my Box2D bodies occasionally get stuck and separate forcibly?

I'm making a space game with LibGDX and Box2D. I made a video here to illustrate the issue. Verbal description: When objects collide, they sometimes get stuck together and are then suddenly separated ...
0
votes
2answers
69 views

How do I handle game lag due to background apps

I'm developing a game using libgdx and have noticed on several occasions that other background apps running can cause lag in my game - especially when those apps are being updated in the background. ...
0
votes
0answers
21 views

Box2D - create object with different physic parts

I have object with physic: BodyDef bodyDef = new BodyDef(); bodyDef.type = BodyDef.BodyType.DynamicBody; bodyDef.position.set(position); bodyDef.angle = angle; ...
0
votes
0answers
17 views

How can I rumble/vibrate my controller with libGDX?

The API in the extension in com.badlogic.gdx.controllers.Controllers only supports getting the input data (works fine). Is there a way to make my controller rumble/vibrate using some other ...
0
votes
1answer
67 views

Box2D object wont move until tons of force is used

Im making a game for android im using LibGDX and Jbox2D it is a space flying exploration game controlled with the accelerometer. so I have set the world to no have no gravity. the objects in Box2D ...
0
votes
1answer
29 views

libgdx universal tween engine how to control the tweening speed?

How can i control the speed of a tweening sprite? Here is the code: in create () /*try tween*/ w = Gdx.graphics.getWidth(); h = Gdx.graphics.getHeight(); ...
1
vote
1answer
85 views

libgdx glClearColor not setting right color?

i just new to libgdx and trying to understand the example code, the following code sets the bg color Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl.glClearColor(60,181,00,0f); my ...
1
vote
1answer
67 views

Smooth anmiation with LibGDX

I want to move a enemy from its current position toward the mouse position in LibGDX. x, y - enemy position saveX, saveY - position where my enemy need to go(or mouse position saved at specific ...
-1
votes
0answers
42 views

LibGDX Texture width and height must be powers of two

public class Game implements ApplicationListener{ public static int WIDTH; public static int HEIGTH; private Texture texture; private SpriteBatch batch; public static ...
0
votes
1answer
32 views

Steering in top-down racer with Libgdx

I'm a beginner in game development and as a little project I thought I should try to do a top-down racer game much like the good old Slicks n Slide. I've seen several tutorials and questions about ...
1
vote
1answer
23 views

Is there a Box2d b2World::ShiftOrigin function in Libgdx?

Is there an equivalent Box2d b2World::ShiftOrigin function in Libgdx? I can't seem to find it.
1
vote
1answer
17 views

box2D and libgdx: Attach ParticleEffect to Body

Hello I am a newbie with libgdx, my question is: how could I add a Particleeffect to a Body that is moving? I searched about the matter and I didnt find anything related to it. I have the following ...
1
vote
0answers
42 views

JBox2D Objects moving slowly (pixel to meter conversion) (SOLVED) [closed]

This problem is solved When trying to program a game using Box2D, I ran into a problem with Box2D. I filled in pixel numbers for the lengths of the the textures and sprites to create a box around it. ...
1
vote
2answers
59 views

How do I make a pop-up window with Scene2D?

I have a main-menu screen with a logo and a bunch of buttons. When the Login-button is pressed, I pop up a dialogue asking for a username and password. This works fine, other than the "popping up". ...
0
votes
1answer
35 views

Using SVN with Libgdx

I decided to give LibGDX a try and am planning to use SVN for my code repository. I created my LibGDX project via the Gradle build as outlined in the book "Learning LibGDX Game Development". I'm not ...
0
votes
0answers
30 views

FPS drop after moved from Textures to TextureAtlas in LibGDX

I've started using LibGDX some time ago and I was making a test project to get used to this library. I've created some images and added them to the assets folder and loaded each image as a Texture ...
2
votes
1answer
37 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
87 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 ...
1
vote
1answer
108 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
30 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
2answers
67 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
107 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
29 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
60 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
94 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
77 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 ...
-2
votes
1answer
96 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
29 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
59 views

Set color by 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
18 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() : ...