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
0 votes
0 answers
6 views

In LibGdx, how to add another music format?

I would like to add multiple music formats to the LibGdx library, like .vgm, .mod, .s3m, .xm and so on. I already have the Java code to do so, but it's hard to integrate it with LibGdx code. I know ...
Chaotic's user avatar
  • 113
0 votes
0 answers
17 views

I use skin composer, I want to create scene in scene composer, I can't add text buttons even though I created text buttons

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
12 views

libgdx resize works fine, except on setWinowedMode

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
0 answers
26 views

Why is my font not found?

Trying to follow this tutorial with using toasts in LIBGDX: Libgdx - notification popup (something like Toast) - on both Desktop and Android But i get this error when compiling: ...
Jonasoos's user avatar
0 votes
1 answer
39 views

Modifying LibGDX vector2's seems to do nothing

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
0 answers
67 views

How do I move a camera around a tiledmap in Libgdx?

I have the following code for rendering a TiledMap and moving around a Texture representing the player on top of it and the camera is setup to follow the texture around. However, when I try to move ...
Sagnik Dutta's user avatar
0 votes
1 answer
110 views

How to adjust parabolic trajectory to hit the same point with the same launch angle, but faster speed?

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
119 views

How to improve performance of LiBGDX Android app?

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
0 votes
0 answers
38 views

How can I change the color of a BitMapFont that is already generated by FreeTypeFontGenerator in render

I'm trying to make a start loading screen with Fade In effect. I've made a simple Animation generator and it works fine when I apply the alpha value for the sprite ,but when I try to apply the same ...
CallOfVoid's user avatar
0 votes
0 answers
20 views

Put two images on table in the opposite corners

I want to put my two images on the opposite corners of my table: one on bottom left, the second on the bottom right. How to achieve that? I have tried align() and <...
mnietuniema's user avatar
0 votes
0 answers
34 views

Position buttons near selected building in zoomed view

I am developing my first libGDX game. There is a TextureRegion (map) on which buildings are drawn. There is an implementation of camera movement and a zoom ...
Zerg's user avatar
  • 11
1 vote
0 answers
70 views

Animate buttons sliding in

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
0 votes
0 answers
30 views

Box2D issue with setLimits on a RevoluteJoint

I have a top down 2d view, a revolute join and a "wheel" attached to the joint. I'm setting the limits of the joint to follow the angle direction of the mouse gradually. I'm also trying to ...
Matsor Browncoat's user avatar
0 votes
0 answers
36 views

libGDX incorrect face rendering order

I want to ask why is libGDX rendering faces incorrectly. The faces are procedurally generated ModelInstances. The code which renders the models is here: ...
Dominicentek Gaming's user avatar
1 vote
1 answer
88 views

How to render picture-in-picture effect with libGDX camera

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
227 views

How to add text on screen using bitmapfont in libgdx?

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

Pass input event from stage to added actor

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
136 views

Fix stuttering with fixed time step and interpolation

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
158 views

Libgdx zoom and pan the map at the same time

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
  • 437
1 vote
0 answers
100 views

Libgdx table contents are expanding beyond widget bounds

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
57 views

Tile system Meta data

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
68 views

LibGDX Invalid animation during actor rotation

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
197 views

Timer for enemy up and down java/libgdx

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
185 views

Libgdx World point to screen point

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?
GabeTheApe's user avatar
-1 votes
1 answer
114 views

Draw more sprite but they disappear

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
163 views

Drawn enemy random on different position

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
84 views

reposition object in circle

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
63 views

Fade in with stage libgdx doesn't work

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
323 views

Create a transition fade out in libgdx

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
950 views

LibGDX - My sprite glitches when it moves

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
115 views

Can I use Libgdx to create a game that runs on multiple platforms?

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
91 views

Error using Asset Manager for loading files from Android temp directory (libgdx)

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
48 views

How to not resize but move widgets when screen resized?

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
73 views

Orthographic camera in libgdx does not work with constructor when passing viewports size

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
110 views

Box2D Body cannot be serialized. How to ignore or serialize it successfully?

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
49 views

HashMaps with String keys as animation keys okay?

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
112 views

Libgdx OrthogonalTiledMapRenderer doesn't render properly

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

Is there an algorithm for a Joystick class that happens to be engine/framework independent?

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
0 votes
1 answer
90 views

Vector2.Zero unexpected behaviour when used to initialize Vector2

I have base class which contains a Vector2 velocity field, which I was initializing in the constructor with Vector2.Zero. But ...
noname's user avatar
  • 103
1 vote
0 answers
59 views

Libgdx sidebar like in Tibia

I'm new to LibGDX and I'm trying to make a simple RPG game. I've implemented a basic movement & combat system. Now I would like to add a sidebar with inventory, character information etc. (like in ...
gamefreak's user avatar
0 votes
1 answer
63 views

Needs help on actually making the trigonometric function work as intended

...
random person's user avatar
-1 votes
1 answer
48 views

Need help on finding the algorithm for getting the FlipX, Y and TextureRotation of my DirectionalAnimation class

I've created a class called DegreeAnimation, which is basically an implementation of my CustomAnimation class, but works with other directions, there are 2 constructors for this class, one where the ...
random person's user avatar
0 votes
1 answer
180 views

Libgdx pre-rendering Bitmap font to pixmap texture causes slow in-game rendering

Im using libgdx scene2d to render 2d actors. Some of these actor groups originally included scene2d Label actors for rendering static text. The Labels work fine but drawing ~20 of them on the screen ...
The Shoe Shiner's user avatar
-1 votes
1 answer
182 views

Extracting cell center and corner points from rasterized Voronoi diagram

I currently have this code which I copied from Rosetta code: ...
random person's user avatar
1 vote
1 answer
107 views

ParticleEffect using TextureAtlas in libGDX

I am using ParticleEffect with a texture stored inside TextureAtlas. The code below shows how I load a particle: ...
matej-m's user avatar
  • 13
1 vote
2 answers
755 views

Shooting from Gun in LibGDX

I'm trying to shoot a bullet from the tip of a gun. This gun is a Sprite object and it is constantly being rotated to point towards the mouse. The issue is that the point to shoot the bullet from is ...
Albert Beaupre's user avatar
2 votes
1 answer
79 views

How to dim the device backlight using libGDX?

I have an idea for a very minimalistic game. To fit in with this theme. I want no explicit messages or tutorials etc. I want to experiment with ways to very gently, implicitly prompt the player to ...
andrew hughes's user avatar
0 votes
1 answer
153 views

Libgdx changing animation during runtime?

I've made an animation class that creates an animation for a player. However, I'm wondering how I can change the animation depending on where the player is currently moving? Heres my animation class: <...
Knightyy's user avatar
0 votes
1 answer
138 views

How to interact with inventory only and not the game

I have created an inventory in which you can select some objects that you can spawn. This is a button in a table in a inventory class. Spawning is done via left mouse button (just click on some ...
mirzak's user avatar
  • 101
1 vote
1 answer
53 views

How can I assign a World.createBody to a variable after initialization, `var` and `val` don't work?

...
random person's user avatar

1
2 3 4 5
46