LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and your WebGL enabled browser.

learn more… | top users | synonyms

0
votes
1answer
285 views

LibGDX make an object rotate around something

I need to rotate and object, which should be a circle made up with a ShaderRender, around a specified point. In LibGDX there is a method or something which allow me to do this? If it doesn't exist how ...
0
votes
0answers
2 views

libgdx box2d move object in bezier curv

I'm making a game and i need to move my game object in a bezier curv path i succeeded in doing it : //create Bezir curv .... path.valueAt(outMove, val); ...
2
votes
1answer
114 views

Get array from JSON in Libgdx?

I wanted to load in map information using JSON, is there a way to get String, Int, float etc lists or arrays from JSON in Libgdx? My structure looks like this { "data": [{ "name": ...
1
vote
1answer
2k views

Libgdx Do a fixed rotation for orthographic camera

I'm trying to rotate my OrthographicCamera in the render loop to a fixed angle, but I can only make the camera spin. This is the code that I have: in create(): OrthographicCamera camera = new ...
0
votes
1answer
2k views

Draw image layer in tmx map - libgdx

I created a map only with an image layer in tiled map editor. When I want to load the map the layer isn't shown. Only the background color. Followed the tutorial from ...
0
votes
0answers
6 views

libGDX GWT compile with “-style DETAILED”

So basicly my libgdx HTML5-gradle build doesn't work. When switching from state it gives the following error: __gwt$exception: <skipped>: Cannot read property 'tM' of null Of course I want to ...
0
votes
1answer
31 views

Random black screen when changing states

I'm making a game with LibGDX but I ran into a really odd problem. When I was working on the loading screen I delayed the loading process with an image of ~87MB. When the loading is finished, it ...
2
votes
5answers
271 views

How to make sure that when two bodies collide, there is only one collision detection on box2d?

I'm using LibGDX with Box2D and, when two bodies collide, the collision is detected multiple times. Here's the code: public void preSolve(Contact contact, Manifold oldManifold) { Body a = ...
0
votes
0answers
6 views

Is using Scene2d the best approach for creating a tetris like game using libgdx?

I would like to know if using Scene2d is the best approach for creating a tetris like game using libgdx ? If yes, what's the approach ? each block is an actor ? How can I achieve this easily ?
0
votes
1answer
111 views

Raycasting. Corner trap

In my top-down game character moves to target (pathfinding) also avoiding obstacles with Raycasting(Central ray with whiskers), but situation like on picture causes shiver and unneeded turning ...
2
votes
2answers
776 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

How can I have margins or padding around a texture in libgdx?

I am building a game using libgdx a 2048 like game and I draw the tiles of the board using textures (each texture represents a tile with the number 2 or 4 etc.) I would like tohave a small space ...
0
votes
0answers
10 views

Hotplugging LibGDX

Trying to find a work around to getting hotplugging to work with LibGDX (the latest version seems still like it doesn't support it). Anyone know of something I could do to get joystick hotplugging to ...
0
votes
1answer
18 views

LibGDX Rotate 2D image with touchDragged() event

Objective: to rotate an image in the center of the screen with movement equal to left or right touchDragged event. Right now I have a basic Stage that is created and adds an actor (centerMass.png) ...
0
votes
1answer
16 views

Level Selection libgdx

I'm following the Canyon Bunny example in making my own game and I'm at the point where I want to implement a level selection screen. The way the example code works is that there's a Level class whose ...
3
votes
1answer
394 views

How can I update a Stage-based HUD from another Stage's Actor in libGDX?

I feel like this is a simple problem, but I'm having issues finding the correct search terms. I have a Screen that includes two Stages. The first, stage, contains a number of objects deriving from ...
0
votes
0answers
4 views

LibGDX Box2D Body shape transformation

In the following method my player Body is created: public static Body createPlayer (World world) { BodyDef bodyDef = new BodyDef(); bodyDef.type = BodyDef.BodyType.DynamicBody; ...
6
votes
1answer
589 views

Word game - board implementation?

I'm working on a boggle type game for android, using libgdx. The user is presented with a 4x4 grid of letters and must find words by dragging their finger over the letters. Unlike boggle I want used ...
0
votes
1answer
20 views

InputProcessor without stage

I have a GameScreen where I'd like to have a pause button. I've tried using an Image with a listener, but since my GameScreen isn't a stage, I can't use that in the inputProcessor. So my question is ...
3
votes
2answers
125 views

Rotate sprite along the angle between two objects

Im trying to make flames follow my object, I set the direction for my moving object using the points between it and another object (using static destination for testing). No matter what I do I ...
0
votes
3answers
81 views

LibGDX - Trying to make a radar-like display

i have an interesting question about geometry. I have two or more moving objects outside of my stage's viewport (blue and red circle in the image below), which i want to point at with two arrows on ...
1
vote
1answer
54 views

Box2D fixed timestep updating is twitchy on constant FPS

I'm messing around with libgdx and box2d and I'm trying to implement sidescroller movement with fixed timestep logic according to the famous Fix Your Timestep! tutorial/guide. However, logic updating ...
3
votes
2answers
283 views

LibGDX - Can't read .ttf file when running Android configuration

when running or debugging my game on android device, i get this error in the logcat: com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: data/fonts/myFont.ttf (Internal) which is ...
1
vote
2answers
550 views

LibGDX particle emitter rotation

I have a libGDX game, in which I'd like to make some ice breath like effect using particles. So far we made a cone like effect. I can obtain and render it on the screen with this. ...
0
votes
2answers
349 views

How to fix overly blurred texture / image in unity?

so, I'm not sure what caused this, let image below do the explanation : How to fix the overly blurred texture in unity? It's so frustrating, since I can't get it right, because when I tried it in ...
0
votes
0answers
12 views

Box2d Body filled with a texture Libgdx

I have a simple triangular shape (obstacle) in my game and i would like to fill it with a texture repeatedly. I have looked at the other 2 topics but couldn't find a working solution. How can i fill ...
0
votes
1answer
29 views

LIBGDX: Translate grid drawn with ShapeRenderer with an OrthographicCamera

I am trying to draw a grid for my "world" that may or may not extend beyond the screen. What I would like to do right now is draw the entire world (which is relatively small) and then use the ...
1
vote
1answer
95 views

LibGDX Box2D texture on dynamic generated body

I'm creating a game that is similar to hill climb racing. I've generated the ground and now I want to add texture to the ground. Here is a screenshot of a game Here is my code (I create ground using ...
1
vote
1answer
159 views

LibGDX - how to detect touchUp with GestureListener?

I'm making a game and I have implemented GestureListener as my inputprocessor. It came with a bunch of methods such as fling, pan, tap etc etc including touchDown. However, there is no touchUp method! ...
0
votes
1answer
24 views

How to remove white background from an image using LibGdx?

I am fairly new to game development. I am developing an application(Aquarium) for windows which requires me to animate(move) fishes around the screen and user will be able to add new fishes drawn on ...
0
votes
0answers
48 views

How to apply Buoyant force to a Box2d body?

I have been following a formula to calculate the buoyant force needed to apply to a dynamic body to be able to simulate water. Fb = ρgV Fb - is the buoyant force ρ - density of the liquid g - ...
2
votes
1answer
61 views

Using LibGDX, is it necessary to clip what I'm rendering for efficiency?

So I am working on a game, and I've noticed that everything in the world is sent to be rendered. Of course with the camera, only some of the world is rendered. Does this mean there is there any ...
1
vote
1answer
129 views

Screenshot always returning as a white image on iOS using robovm and libgdx

I am trying to take a screenshot for sharing on social media. This code works on my Desktop project, but when I use it on iOS it always shows up as a white image, I am using the standard libgdx code ...
4
votes
1answer
162 views

OpenGL(Libgdx) - How to texture a 2D terrain surface?

I want to texture the surface of my terrain. I have created the ground mesh and surface mesh separately and everything is okay for ground mesh. But I couldn't texture the surface mesh correctly. As ...
2
votes
1answer
385 views

LibGDX Box2D Lights - Illuminate background

I have a box2D world made of tiles. I use a custom DirectionalLight for light up the scene from above (It shines through transparent blocks [eg.: the water] more deeply). The problem is (as expected), ...
3
votes
1answer
139 views

LibGDX - Show a minimap

I've started to develop a small roguelike game in LibGDX. I've also made a minimap class, which creates and updates the minimap as the player explores the dungeon, by using a Pixmap. The minimap class ...
0
votes
0answers
35 views

Collision LibGdx

Shape 1 is falling. I want Shape 2 to land on Shape 1. Shape 2's gravitational movement gets choppy after adding if(Shape1.collides(Shape2.getBounds())){ SHape2.Collide } and it ...
0
votes
3answers
82 views

libgdx(android) touchup triggers more than once?

I have a function I run inside the touchUp method but when I click with the mouse during emulation, it triggers my function multiple times. I don't think its an error with the called method itself ...
2
votes
1answer
228 views

Scene2d Stage Actor setup issues

I am creating a game using libgdx. In the same each level has a class. I have stage as a member variable of the class. To this stage, I add actors. Inside the levels class, I have attaced the input ...
0
votes
1answer
32 views

LibGDX Textfield - Text Overflow - Not Wrapping

In my app's registration screen, the textfield is not wrapping text as I expected. Notice in the above image, the email field is not containing the text. I have set the size of the textfield using ...
1
vote
1answer
2k views

Two pass blur shader using libgdx tile map renderer

I am trying to apply the following technique: blur effect using two pass shader to my libgdx game using the OrthogonalTiledMapRenderer. The idea is to blur the background wich is also a tilemap but ...
0
votes
1answer
88 views

Libgdx Fine Tune Megaman Movement

With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping. I believe I have managed to match moving on the X axis and the ...
0
votes
0answers
32 views

LibGDX works well on android 4 and very bad on android 5 and 6

I have a problem with my game. The game is made with libgdx, scene2d and box2d and it uses an AssetManager. I tested this app on all my devices and here it is the results: Galaxy S3, android 4 ...
0
votes
2answers
1k views

libgdx actors and instant actions

I'm having trouble with actors and actions. I have a list of actors, they all have either no action, or 1 sequence action This sequence action has either : a couple of actions (some are instant, ...
1
vote
1answer
62 views

Polygons and actionlisteners Libgdx

I've been browsing these forums for a while now and I nearly always am able to find an answer without having to ask my own question! Such a great community! This is the first time I've been stumped ...
0
votes
1answer
67 views

Positioning partials of character sprite animations

I'm not entirely sure how to best explain what I'm doing. Maybe I'm going about this completely the wrong way. If any of you find that that is in fact the case, I would appreciate it if you told me ...
0
votes
1answer
17 views

Scaling a single scalar using OrthographicCamera

I'm trying to convert a length (well, a radius) from world coordinates to screen coordinates using an OrthographicCamera. However, the only method I've figured out so far is to do a projection, with ...
0
votes
2answers
41 views

LibGDX game crash without errors (maybe AssetManager)

i have a problem with my game. It's a endless run shooter/platform made with LibGDX (Scene2d and box2D). I do tests with LG G2, LG G3, Galaxy s4, desktop and android emulator and i have no one ...
0
votes
1answer
116 views

libgdx FollowPath proper usage

I'm developing top-down rpg game and got some problems using https://libgdx.badlogicgames.com/gdx-ai/docs/com/badlogic/gdx/ai/steer/behaviors/FollowPath.html I have a path (picture 1), in this case 2 ...
3
votes
1answer
67 views

Just how expensive is it to bind textures in OpenGL? (LibGDX)

I'm using LibGDX on top of OpenGL and currently my game engine does something along the lines of the following per frame Bind a terrain texture sprite atlas and a set of transparency masks in ...