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
17 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
121 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
78 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
52 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
279 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
546 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
0answers
5 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 ...
0
votes
2answers
340 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
11 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
0answers
11 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
27 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
94 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
19 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
46 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
60 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
126 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
159 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
383 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
34 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
31 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
87 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
29 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
66 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
115 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
61 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 ...
0
votes
1answer
20 views

Color aura around object in libGDXs actor

my question is, if there is some easy mechanism to create color aura around actor in libGDX? Thanks for all tips
4
votes
1answer
112 views

On Android, How can I avoid FPS drops during sensor listener setup/tear down?

When I open my Android app after 5 or 10 seconds it sets up the sensor listener, during which I see clear stuttering and the FPS drops for a second to 40 instead of 60. Is there a way to avoid this? ...
1
vote
1answer
235 views

LibGDX - Tilemap Wall Collision Detection Issues

I cribbed some code from another web tutorial (SuperKoalio - https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/superkoalio/SuperKoalio.java) about detecting a ...
0
votes
2answers
54 views

A single libgdx gamescreen with pop-up menu, getting ready, hud and game over?

Is it possible and practical to have only one screen, like a GameScreen class, where the menu, getting ready (plus instructions), hud (only score) and game-over screens can pop-up when needed. Can I ...
1
vote
1answer
640 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
1answer
50 views

Google Games Services Display Orientation

I'm developing a game using LibGDX and I'm using BaseGameUtils to implement Play Games Services in it. It's working very well. But my game is in landscape mode, so when I call leaderboard or ...
2
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
1
vote
2answers
183 views

How do mobile games create simple UI components?

How are simple UI inputs typically handled in 2D mobile games? For example, text input boxes and keyboards. It seems that many game engines do always have simple UI components. There are obvious ...
8
votes
2answers
7k views

Repeat texture in libgdx

How to fill region with repeated texture? Now I'm using next method: spriteBatch.begin(); final int tWidth = texture.getWidth(); final int tHeight = texture.getHeight(); for (int i = 0; i < ...
4
votes
2answers
159 views

Poor performance wth custom particle system in LibGDX

I'm using a custom particle system for my LibGDX / Java based game project (because I used Slick2D earlier on, need more parameters so I made my own and then ported). The system is fairly standard as ...
0
votes
1answer
383 views

Handling Back Button in Android without implementing InputProcessor

Please advice/clarifyon below issue in libgdx while handling back button in Screens. I have already gone through these 2 threads, ...
0
votes
1answer
41 views

LibGDX: how to implement 2 cameras in a unique stage

I am quite new to LibGDX. I am trying to make a game, where the character is an Actor, and it's controlled by a Touchpad(included in the main Stage as an Actor too). My problem is that I am trying to ...
1
vote
2answers
31 views

LibGDX Gravity and Jumping

I'm trying to implement gravity and the ability for the player to jump in my 2D LibGDX game. At the moment, I have two handlers: One for gravity and one for keyboard input @Override public boolean ...
1
vote
1answer
45 views

How to dispose in Newest Java/LibGDX ApplicationListener?

Am I new? yes What I'm wondering: How do you dispose of textures / spritebatches and the things you normally need to dispose of now? Why I'm asking: Because theirs no automatic dispose() function ...
1
vote
1answer
135 views

Cant write/read to/from external storage with LibGDX

My create method looks like this: @Override public void create () { batch = new SpriteBatch(); FileHandle file = Gdx.files.external("file.txt"); file.writeString("My god, it's full of ...
0
votes
0answers
23 views

Blur shader decals

Im trying to implement custom shader for decal GroupStrategy in libgdx, and I'm having some noob GLSL and OpenGL problems. I have implemented shader looking at this: ...