Skip to main content

Questions tagged [libgdx]

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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
57 views

I've started a libgdx game using scene2d and box2d. It's a 2D top down game, in which you can walk through the world, enter houses, etc. (think of Stardew ...). I'm wondering, what is the best ...
Nothing232334's user avatar
1 vote
1 answer
111 views

I was making a 2d top-down game, but when I tested it on two devices (Samsung M31 and Samsung S25) there was a problem with player speed - it was faster on S25 and slower on M31. I tried using some ...
andrew's user avatar
  • 31
0 votes
0 answers
67 views

fire (Event event) method throws the NullPointerException. Trace: ...
erekle barvenashvili's user avatar
0 votes
1 answer
113 views

I have a game object with a Kinematic body and a sprite. The object's "draw" method will always position the sprite to match a position of actual body, so the sprite is completely passive. ...
guest86's user avatar
  • 113
0 votes
1 answer
86 views

I'm thinking of making a game where using the phone accelerometer, the player would apply an appropriate force (adding velocity) to a Box2D body. Now, I know technically how to implement that, but I ...
guest86's user avatar
  • 113
1 vote
1 answer
127 views

I'm trying to ray-cast mouse clicks to the surface of a sphere (from which point, I'm going to get the coordinates of the vertex of the sphere's mesh that are closest to the click). The following ...
Jax's user avatar
  • 474
1 vote
1 answer
146 views

I'm trying to create an icosahedron (I've been trying to figure this out for about a week). Basically, I followed this article to create an Icosahedron mesh in code, and the positions of the vertices ...
Jax's user avatar
  • 474
0 votes
1 answer
105 views

I'm currently trying to rotate a sprite around its own axis to make it "face" the mouse, but I'm having weird results. This is my code: ...
Jax's user avatar
  • 474
1 vote
1 answer
200 views

I am currently using libgdx and IntelliJ to develop a real-time space 4x game. I ran into an issue, where I am trying to include lua scripts in my project (for the sake of allowing players to mod new ...
Jax's user avatar
  • 474
1 vote
1 answer
75 views

Is there a way of getting embedded objects defined within Tiled's collision editor from TextureMapObjects? It'd be great if I could place texture objects around on an object layer and also include ...
Silas Hayes-Williams's user avatar
1 vote
2 answers
145 views

Bullet physics tunneling problem: yellow box(dimensions: 2f, 2f, 2f) that falls under gravity. Its Bullet Physics are set as such: ...
i_o's user avatar
  • 131
0 votes
1 answer
73 views

I am trying to understand the camera API (applicable to perspective camera ONLY) of LiBGDX. It really does not make sense that you can call rotate and translate on many different properties of the ...
i_o's user avatar
  • 131
0 votes
1 answer
93 views

I am trying to rotate the node of a modelinstance as follows: Note: the node and modelinstance are rotating BUT not about their own center Y axis! ...
i_o's user avatar
  • 131
1 vote
1 answer
225 views

I am aware that a common approach in game development for attack animations is to separate the player from the weapon and 'stitch' them together at runtime, depending on the weapon equipped. This ...
Silas Hayes-Williams's user avatar
1 vote
0 answers
62 views

I have loaded a 3d scene from Maya into Libgdx: It has two polygonal objects(meshes) One object is labeled as: chamber The other object: it has another name I load the Maya scene as such: ...
i_o's user avatar
  • 131
0 votes
1 answer
69 views

Using libgdx I need to move back and forth by a very small amount a soldier head: I do the following: But the soldier head is flying up into the y axis out of the screen: ...
i_o's user avatar
  • 131
0 votes
1 answer
120 views

I am trying to understand why in the following code the programmer user vector2.set() ? ...
i_o's user avatar
  • 131
0 votes
1 answer
99 views

I'm currently working on a LibGDX Java Game Project inspired by the Space Invaders game where I have created 2 Scene Classes: LevelScene and ...
TechGeek49's user avatar
1 vote
1 answer
141 views

I'm using this library to connect to websocket server: https://github.com/czyzby/gdx-lml/tree/master/websocket It's working on android/desktop applications, but when compiling to html gwt app with ...
Часть Пустоты's user avatar
1 vote
0 answers
50 views

Let's say I have a game screen with a game world stage and UI stage. UI has a build button in the corner which should open a full screen build menu window/panel while hiding game world and the ...
eek's user avatar
  • 11
0 votes
0 answers
60 views

I create text buttons, add every image and font, but it's still disabled when I want to add button in scene composer. I'm probably doing something wrong.
p3tition's user avatar
0 votes
1 answer
81 views

I'm a bit baffled by a specific bit of behaviour in LibGDX. The resize method of my screens is as simple as can be, because right now I don't need anything more: ...
UncleBob's user avatar
  • 111
0 votes
1 answer
90 views

I have a piece of code similar to this: Vector2 test = new Vector2().setLength(20).setAngleDeg(45); But when I'm trying to print its contents (such as ...
big papa's user avatar
0 votes
1 answer
208 views

I'm launching a ballistic projectile similar to this sample. The projectile moves from the launch point to the target point, but it's too slow. When I try to increase the speed without changing the ...
QuestionAndroid's user avatar
0 votes
1 answer
286 views

After creating a few bodies and a map with collisions, the app performance clearly goes down. However, RAM and CPU don't seem fully stuck, but the game experience is horrible nonetheless. GameScreen ...
ognevo's user avatar
  • 1
1 vote
0 answers
138 views

I am developing my first libGDX game. I want to animate the buttons on the stage, so they transition into view instead of just popping into appearance. For example, each button should slide in from ...
Zerg's user avatar
  • 11
1 vote
1 answer
176 views

libGDX cameras are mostly used for layered rendering with different "world unit size," but I wonder is there a way of showing the view of for example a libGDX Orthographic camera in the ...
CallOfVoid's user avatar
0 votes
1 answer
702 views

I have a function class that implements Screen with a bitmapFont variable in it ...
Aspect Karlos's user avatar
0 votes
1 answer
165 views

I am diving into libgdx and used their sample game as a starting point. I also added a touchpad to move the bucket. That was kind of easy and worked flawless. My additional idea was to make the ...
WarrenFaith's user avatar
0 votes
0 answers
242 views

I am trying to fix my stuttering by using a fixed time step, but I seem to be missing something because it is not working. Can someone look at this and see what is missing? ...
wtcl's user avatar
  • 1
0 votes
1 answer
279 views

I was able to do the zoom logic and pan logic, but like in google maps, I want to be able to zoom to the map and at the same time pan the map near to it. Example starting position: zoom to kennedy ...
Vokail's user avatar
  • 436
1 vote
0 answers
166 views

I have a libgdx table that initially looks like this... And I'd like the last cell to expand so that the logical bounds fill the widget bounds. As soon as I set the last cell to expandX it looks like ...
The Shoe Shiner's user avatar
0 votes
1 answer
116 views

I am creating a strategy game in LibGDX with a tile system and destructible tiles. I am using an array of enums to represent the different types of tile, eg: ...
John's user avatar
  • 101
1 vote
1 answer
132 views

I have a problem with the animation when setting the actor's rotation. Every now and then the server sends an updated actor's rotation position. The client uses interpolation to smoothly update the ...
Adixe's user avatar
  • 13
0 votes
0 answers
249 views

I want to make the selected enemy increase position.y by 1.0 and after 1.5 seconds return to the original position. I already use a timer of 2 seconds because I need to select a random enemy every 2 ...
witsel's user avatar
  • 25
1 vote
2 answers
348 views

It seems like converting a screen point to a world point is easy in libgdx but going from the world point to a screen point is quite tricky. So How do I convert a world point into a screen point?
Jackson Hurt's user avatar
-1 votes
1 answer
160 views

I have a array of sprite in a class "Enemy", I want to draw enemies in some positions, but when I draw one, the previous one disappears. ...
witsel's user avatar
  • 25
0 votes
1 answer
277 views

I would like to insert random enemies in the map in different positions. It's possible? This is how i load image of enemy: Enemy.java: ...
witsel's user avatar
  • 25
1 vote
1 answer
133 views

As you can see on the image, I have a p1 and p2 objects with (x,y) coordinates which I know the values, and I know radius of all these circle objects. However, I want to calculate new position x,y ...
Kapparino's user avatar
  • 115
1 vote
1 answer
111 views

i use a stage on my background but the fadein doens't work. This is my code: ...
witsel's user avatar
  • 25
1 vote
1 answer
764 views

How can i create a fade out in libgdx? I have a class "Menu" and with a fade, i want to change class to "Game". This is how i change class, from "Menu" to "Game"...
witsel's user avatar
  • 25
3 votes
1 answer
1k views

My player sprite glitches when it moves across the screen. I've tried multiplying movements by delta time. I've tried rounding. It seems to do this completely at random. Sometimes I can move it all ...
DawnShard's user avatar
-1 votes
1 answer
224 views

I created my first game using Libgdx and Android Studio. The game runs smoothly on my Android phone. How can I run it on an Apple phone with IOS or a computer with Linux etc.?
Luca Leone's user avatar
0 votes
1 answer
169 views

I'm creating a game for Android using libgdx and Google Firebase for storage. In my Loading screen I download a file from Google Firebase Storage and store it in a temp file. After the dowload ends ...
Pablo Ajo's user avatar
0 votes
0 answers
74 views

I have added buttons to my code, but when I go to "resize", they get bigger or wider and it looks very bad. How can I resize the window and keep the button aspect ratio? This is my code: 1)...
witsel's user avatar
  • 25
0 votes
1 answer
116 views

I am playing around with LibGdx and its OrthographicCamera and notice something, what is really strange for me. I mean if you look into the code below you will see that I am initialising ...
noname's user avatar
  • 103
0 votes
0 answers
210 views

In my game, which implements the network functionality with Kryonet, I would like to send a class ("MyBox2DComponent") over the network which e.g. contains a field of type Body (Box2D). Of ...
EchtFettigerKeks's user avatar
0 votes
0 answers
78 views

In my project I use an ECS system. I have a SpriteComponent that contains a map of animations. ...
EchtFettigerKeks's user avatar
0 votes
1 answer
172 views

I will simply leave a clip of it as it's easier than describing the problem. https://i.sstatic.net/bBAVC.jpg This is All the code that i have ...
random person's user avatar
0 votes
1 answer
135 views

I need to be able to get the given input's distance inside the joystick, bounded within -100% and 100% and an unbounded version of it, get the position of where the mouse's position projects to the ...
random person's user avatar

1
2 3 4 5
46