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

0
votes
0answers
10 views

Box2D pixel to meter conversion

I have a game that was written in pixels and now I want to change it to meters like(box2D do). How I need to do that. I have wached a lot of tutorials and all they have some SCALING FACTOR but when I ...
0
votes
1answer
14 views

Predicting circle-circle bounce vector when aiming one at another

I am making a game with libGDX (with box2d) in which you drag and aim one circle body at another then release to fire. I would like to be able to predict the path of the second circle based on the aim ...
0
votes
0answers
16 views

Bullet Physics for Collision Detection and Smooth Response

I'm creating a game using LibGDX, and to prevent the need to spend lots of time writing collision detection code I've decided to make use of Bullet Physics, simply for collision detection and not for ...
0
votes
0answers
5 views

Problem with the method unproject of the class OrthographicCamera of LibGdx [on hold]

cam is a object of OrthographicCamera v3 is a object of Vector 3 in the next line the play closes in android, in the PC it works good, I don´t which is the problem cam.unproject(v3); Thanks very ...
0
votes
0answers
13 views

Android LibGdx Assets Sizes/Newbie Questions [on hold]

I'm trying to get started with a game idea for Android. I've got everything planned out, yet I don't know where to begin. I know what the player, and enemies will look like, as well as the ...
0
votes
0answers
10 views

Leaderboard in game, android, LibGDX [on hold]

I am developing android game using LibGDX engine (java) , I want to put leaderboard (top scores) in it . I can't find any tutorial that explains how to do it using Google play services , any ...
0
votes
0answers
4 views

GdxRuntimeException uiskin.atlas

I have problem when trying to use the uiskin.atlas from github/libgdx. I've downloaded(cloned) it from libgdx.git but it just doesnt work. I get the following error: ...
0
votes
1answer
22 views

Why does my libgdx app just display the badlogic.jpg instead of my start screen?

I have been looking at example libgdx games. It looks like https://github.com/libgdx/libgdx-demo-cuboc is the closest thing to a game I would like to make. I am able to download, compile and execute ...
0
votes
1answer
22 views

LibGDX Bounding Rectangles

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate ...
0
votes
0answers
13 views

libgdx y axis rotation (card flip)

I am a complete new user to libgdx and am looking to use it to write a simple card game. I want to be able to flip my cards over to reveal them, in the same way as this example from Google shows. ...
0
votes
0answers
11 views

Using fonts in Scene2D GUI

I'm learning how to use Box2D and Scene2D together. I'm trying to create a Sprite class that combines a Box2D body with a Scene2D actor. Before I can do this I need to set up the environment I plan to ...
0
votes
0answers
37 views

Make a smooth curved terrain from chain shape [on hold]

what have i tried: Vector2[] vs = new Vector2[6]; vs[0] = (new Vector2(-50, 7.3f)); vs[1] = (new Vector2(-18, 7.3f)); vs[2] = (new Vector2(-10, 2)); vs[3] = (new Vector2(-5, 4)); vs[4] = (new ...
0
votes
0answers
25 views

Problem with changing font color in libgdx

I recently noticed that my version of libgdx was way out of date, so I updated from version .9.something to 1.4.1. I copied files for the project I'm working on over into a new project generated with ...
-1
votes
0answers
28 views

libgdx or unity for 2d game running on smartphones [closed]

I'd like to make a 2d game such as an arcade game like pac man who will be running on ios, android, blackberry and windows phone devices. To do this, I need a game engine, but I'm puzzled between two ...
0
votes
0answers
19 views

Change a vertices and display corner of a polygon

I'm currently building a level editor for my game and i'm having some trouble on how to change vertices of a polygon. Basicly i searched the web trying to figure out how to update the vertices of a ...
-1
votes
0answers
20 views

Java rendering to android [closed]

How can I render a java code in android? I know that Java codes are working under android, but I do not know how to give some fancy visualization to my graphical objects.
0
votes
0answers
14 views

Cant Set Image Origin in Table Cell - LibGDX

I am having real issues with my Actors when placed in table cells. I would like to set center Origin to allow me to tween the scale around the center. I am aware that the Table is responsible for ...
2
votes
0answers
21 views

Drag And Drop in libGDX (Target and Source)

I'm trying to put together a drag and drop system in libGDX with the help of DragAndDrop class. I have the typical system in which you can drag something into a box. So far it is working all dough I ...
1
vote
1answer
75 views

How can I implement a camera like the one in RotMG?

RotMG, an MMO top-down shooter, takes on a unique 2d-3d style, and has an intriguing camera; The game is obviously 3d, not simply isometric, and if you play the game and turn on camera rotation you ...
0
votes
0answers
44 views

What is the best framework for 2d side scrolling game (with physics support like box2d) [closed]

I have previous knowledge in Libgdx since I developed a game in it. So the learning curve will be a bit less. Still, if there is a better platform for side scroller (preferably Java), then I would ...
0
votes
1answer
33 views

Card game - creating card Listener

I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand. I am new on game development and I'm following the ...
0
votes
0answers
12 views

In libgdx, how do I get the intersection of a ray with a model instance?

I am using LibGDX trying to use raypicking to pick a point on a Mesh. I have two methods for this that don't seem to work quite right: /** * @param ray * @param intersection The vector to store ...
-2
votes
0answers
23 views

Libgdx how Coverflow animation [closed]

Please see this link and suggest me how to make this animation in libgdx.. http://code4app.net/ios/Infinite-Scroll-Picker/51ecb20a6803fa7b31000000 Suggest me any idea ya link. I don't know how to ...
2
votes
1answer
52 views

How can I get the instantaneous volume level of a sound at a particular playback point?

How can I go about getting the current volume output of an audio file in libGDX? By that I mean of the actual file at its current play position. Essentially I want to write my own version of a plugin ...
0
votes
1answer
36 views

Throwing a bomb LibGDX Box2D

I am trying to create game where somenone throw a bomb. I am wondering how I can have an bomb react in a way that is represented by the following picture : Is there are any tools in Box2D that can ...
1
vote
1answer
48 views

Libgdx - gesture dection

I have made a card game, and have two methods that sort the players hand. sortHandBySuit(); sortHandByValue(); I would like one method to be called when the user slides their finger from left to ...
0
votes
0answers
19 views

Lighting shadow casting sprites with box2Dlights

I currently have something like this using box2Dlights Ideally, I would like objects casting shadows to be lit, so the object is lit but there is still a shadow cast around it. Right now the object ...
0
votes
0answers
28 views

Tap responsiveness on mobile

My question is quite simple but I hope someone can help me here. My problem is the delay when the screen is tapped. In my game there are fast moving images that need to be tapped. I have the touch ...
0
votes
0answers
15 views

Move body LibGDX Box2D

Hello I have a body and I want to move it. When I press the mouse button my body should move at that position (on the const speed)on the screen. I have override two methods(x1, y1 - point where my ...
0
votes
1answer
44 views

Ram usage , libGDX game development

I am developing android game using LibGDX . The game data (images , sounds etc.) are maximum 25mb . But when the game is running on Android device it places 110mb there (look at the image) 110mb is ...
0
votes
1answer
26 views

Box2D pixels to meters , LibGDX

I am confused . what shall I set the orthographic camera viewport in libGDX when I use box2d , in one tutorial I saw that he divided his viewport numbers to 32 because 1meter =32 pixel , but I think ...
6
votes
1answer
2k views

Why do my images take 200 MB of RAM when they are ~20KB on disk?

I am creating an Android game using libGDX. When I load my nine images it takes 200 MB of RAM. But the images are 10 to 17 KB each. Why the discrepancy? Here is where I create textures from those ...
0
votes
1answer
47 views

Box2D Body creation causing performance issues

I have at max 10 dynamic bodies in my world at any time. they are created at random and fired up from below they screen. when a new body is being created, the fps falls from 59 - 61 to about 35- 40 ...
1
vote
1answer
93 views

Making sprite rotate smoothly

I have a sprite that I want to rotate smoothly and face the opposite direction: This is my render function: public void render() { // Game Loop Gdx.gl.glClearColor(0.7f, 0.7f, 0.2f, 1); ...
0
votes
1answer
31 views

Making sprites move in oppsite direction of vector

I have a sprite that moves from the bottom left of the screen to the top right. What I want to know is how would i make it turn around and go in the opposite direction, and continue this loop. I ...
0
votes
0answers
35 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 ...
0
votes
1answer
54 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
45 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
24 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 = ...
1
vote
1answer
29 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
30 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
69 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
41 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 ...
1
vote
2answers
72 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
39 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
1answer
42 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
134 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
48 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 ...
-1
votes
1answer
38 views

How to mirror a texture 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
41 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 ...