Unanswered Questions
697 questions with no upvoted or accepted answers
9
votes
1
answer
2k
views
How do I draw a name above monsters head?
My player HUD works perfect, but when I move, the monster name moves with me instead of getting attached to the monster.
Player has a HUD and I'm using Scene2D.ui ...
8
votes
1
answer
2k
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), ...
7
votes
0
answers
844
views
How to correctly implement 'layered lighting' with Box2D-Lights
How does one only allow Box2D-Lights to affect one and only one OrthographicCamera.
After researching, I found the following answer. This answer goes into detail ...
7
votes
1
answer
609
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? ...
7
votes
1
answer
4k
views
Drawing fonts with LWJGL3 with OpenGL
I'm very sorry if this question has already been answered, but since I've been struggling with this for many days I thought I'd give it a shot here.
My goal is to somehow render some text on the ...
6
votes
0
answers
325
views
LibGDX Rectangle not Scaling to ImageButton Instance as Expected
below is the class I wrote for a GameButtoninstance:
...
6
votes
1
answer
503
views
LibGdx animation sequence
In my game the character movement animations work fine
but now I'm trying to do a sequence of programmatic animations,
for an enemy character, and it's proving to be a pain.
I'm just doing it on ...
6
votes
1
answer
740
views
Spawning enemies in four different positions with a fixed trajectory in android game
This is my first android game, I appreciate all the help. I want to define 4 spawning zones starting from out of the screen (left, right, up and down). Enemies coming from this areas have a fixed ...
6
votes
0
answers
161
views
balloon ligher than air with libgdx, impementation of FixtureDef.density, gravityScale, linearDamping?
I use libGdx/box2d's physic. My intention is to create a balloon filled with helium (a body, what hovers above a surface, if we apply a little force to it - it moves fast but not far, if we push ...
6
votes
0
answers
195
views
Why is my OpenGL enabled Java game not detected by Fraps?
Recently I found out that I could enable OpenGL hardware acceleration in my Java game with the line
System.setProperty("sun.java2d.opengl", "True");
Initial ...
5
votes
3
answers
949
views
How do I handle Game Screens in LibGDX?
In my game the main screen is the playscreen. But because I want to draw the menu and the gameover screen on top of the playscreen, I don't create separate screens for them. But if I want to replay, I ...
5
votes
0
answers
257
views
Implementing rubber rope
I'm using LibGDX to implement rubber rope in which player can fly and launch. I know I could use Box2D as physics engine and I'm going to one day, but I'd like to learn it myself for now.
I've ...
5
votes
1
answer
2k
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 ...
5
votes
1
answer
2k
views
Making a pixel-perfect viewport in LibGDX
My game that uses LibGDX as the graphics library, should be playable with every display. Here's the problem: It have to be pixel-perfect. That means, the scale factor must be an integer value, so that ...
5
votes
1
answer
230
views
Fixing the size?
My app isn't compatible with all screen sizes. When testing on a small size, my textview overlaps with my button. So, as suggested on the Android Documentation, and many stack overflow pages, I ...