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

Understanding vector2 set in Libgdx

I am trying to understand why in the following code the programmer user vector2.set() ? ...
i_o's user avatar
  • 101
0 votes
0 answers
15 views

How to setup position of an image overlayed another in a stack libgdx

I have tried to change the position of the image bagitem[i]( which items are covered by a green border square; it only used method debug() to appear the border) to center in many ways but have not ...
hansolo's user avatar
0 votes
1 answer
55 views

How to save score without resetting to 0 between Game Scene and Pause Scene?

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

libGdx Box2d Sword

Is there a good way to use libGdx Box2D as the main library for a rogue-like game? I want so items could be picked, dropped, and when they are picked to be a separate part of character (I tried ...
Mrblazer's user avatar
1 vote
1 answer
68 views

LibGDX websockets GWT html app cant find source to WebSocket class

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

LibGdx switching between multiple UI panels

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

LibGDX Table rendering order draw calls

I'm using LibGDX Table for drawing some simple structure but I am having problem with draw calls and texture binding handling. For clarification, I have a ...
glz's user avatar
  • 31
0 votes
0 answers
22 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
29 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
20 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
39 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
51 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
101 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
154 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
184 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
1 vote
0 answers
104 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
1 vote
1 answer
126 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
422 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
94 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
162 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
221 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
  • 436
1 vote
0 answers
119 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
72 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
77 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
214 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
255 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?
Jackson Hurt's user avatar
-1 votes
1 answer
123 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
213 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
86 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
70 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
507 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
1k 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
139 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
124 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
92 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
128 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
51 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
132 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.sstatic.net/bBAVC.jpg This is All the code that i have ...
random person's user avatar
0 votes
1 answer
102 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
112 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
65 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
49 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
225 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
210 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
116 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
912 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
85 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
179 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

1
2 3 4 5
46