Questions tagged [libgdx]
'libGDX' is an open-source cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and WebGL enabled browsers.
12,633
questions
0
votes
0
answers
24
views
Reactor flux with replay not always working
I'm currently working on a game in which the user can run spells, these spells can both require and supply input of certain POJO types, these I have depicted by ArgType<T>. Rather than storing ...
-1
votes
0
answers
23
views
EXCEPTION_ACCESS_VIOLATION libgdx java [closed]
I am having issue with creating higher body count in box2d using libgdx. Issue arise around 700 body count. It seems I run out of memory somewhere when new body is created but I dont know exactly how ...
0
votes
0
answers
25
views
Get gdx game to draw below the notch on android devices
I generated a new game using the gdx project generator (gdx-setup.jar), which uses gdx 1.12.1. The android version of the app doesn't draw below the notch on my test devices, it leaves a black strip ...
0
votes
0
answers
11
views
sync of body and sprites for animation?
First, made an Animation object for rendering character moving.
And, I want to make body for animation.
In this case, how can I change actual fixture for animation frames?
Or, should I use box2d ...
0
votes
1
answer
21
views
libGDX Project Generator showing "Build Failed" everytime I try Generating a project
I am trying to install libGDX on my machine using the libGDX Project Setup and have set the location to everything it needs.But everytime I click "Generate",I get this Error:
Generating app ...
0
votes
1
answer
14
views
How can touch off keyDown() or keyUp() in ClickListener (Libgdx)
I write a demo to test button, but I have a little problem. the keyDown and keyUp was not work. the code like that.
I create a button join stage and add ClickListener to button, the listener is work,...
0
votes
0
answers
13
views
Libgdx multiple viewports, cameras and properly sizing tiled map
I am having a hard times to connect the dots between camera, viewports and my tiled map on android app.
So I am having a Screen in which I want to have two separate parts of game. Top which would be 1/...
0
votes
0
answers
61
views
Hiero not opening in IntelliJ with libGDX
I'm trying to run Hiero in my java libGDX project but it won't open.
I tried to run Hiero with the desktop modules (desktop and desktop.main). I also tried changing the dependency in build.gradle. It ...
1
vote
2
answers
18
views
Debug grid for libgdx
Can I somehow draw a 3d grid in my libgdx app, so I can zoom in and out of this grid in order to see what is going on with my application?
For example, I'm trying to create a simple sphere, that ...
0
votes
0
answers
7
views
How to correctly pass scroll position from Android into Libgdx?
I'm making some sort of a game and I have RecyclerView with several TextViews that I can scroll or move around inside my Android.
Then, above that I have Libgdx game running inside transparent ...
0
votes
1
answer
17
views
How to know which side of a ChainShape is being collided with?
I'm learning LibGDX and trying to use Box2D for collision and movement. I'm making a simple Pong game. When the ball hits the left or right wall (i.e. the other side scores), I want the ball's body to ...
0
votes
1
answer
102
views
LibGDX iOS error on new project when running launchIOSDevice
I was trying to update an old LibGDX game to use the latest versions of various 3rd party libraries and couldn't get it to run on the device. I thought I'd go back to basics and create a new LibGDX ...
0
votes
0
answers
12
views
Trying to import a LibGDX program into NetBeans, but for some reason I can't
So, as stated, I'm trying to import a libGDX project into Netbeans but it keeps saying that it cannot load either the desktop and core parts of the projectAs stated:
I have tried most things I knew ...
0
votes
0
answers
18
views
libgdx-bullet btGImpactMeshShape doesn't work for Rigidbody
I am new to bullet physics and already facing annoying problem with shapes,...I have this java class that extends ModelInstance:
public class CustomModel extends ModelInstance implements Disposable {
...
0
votes
0
answers
15
views
Build IOS project with GDX library
I have a Gradle project. It's written in Java 17. I have the Java 17 JDK installed. I tried running the project on Gdx's DesktopLauncher and it worked fine. But when using the build on IOS, I get an ...
0
votes
1
answer
38
views
How to find out whch graphcs card my libgdx/lwjgl game is running on?
Using an laptop that has multiple graphics cards, I wonder which one is being used by my libGDX / LWJGL game. How can I find out? Are there any built-in functions?
There seem to be some information ...
1
vote
2
answers
33
views
LibGDX - How to draw a texture using camera and viewport
I am new to LibGDX and I'm trying to understand how to use the Camera and Viewport to draw images in different parts of the screen. I'm trying a very simple example based on the base project, but I ...
0
votes
1
answer
39
views
How to draw debug lines and shapes in LibGDX
Is there a helper system to make drawing debug lines and rectangles easier?
I have looked through related answers to similar questions but I only see answers showing how to draw individual shapes.
1
vote
1
answer
28
views
LibGDX app cannot load TTF fonts due to "invalid padding"
I am new to LibGDX and trying to make a very simple game. But I soon ran into an issue when using BitmapFont. In my Game class, I load a BitmapFont like so:
private SpriteBatch batch;
private ...
0
votes
0
answers
23
views
Actor events do not work when instantiating it before calling stage.addActor(actor) libgdx
I am newber
Actor events do not work when instantiating it before calling stage.addActor(actor). It works when i Actor events do not work when instantiating it before calling stage.addActor(actor). It ...
0
votes
1
answer
72
views
The application crashes in the APK file but does not crash in emulators
I created a project in LibGdx. The program launches and works perfectly both in Android Studio emulators and on real devices. When I tried to publish the application on Google Play, Google refused and ...
0
votes
1
answer
37
views
Exception in libgdx TextureRegion class
I was following a tutorial to create a pokemon like game with libgdx library in java.
I am stuck on making the walking animation part because of the libgdx update on Animation , so the animation ...
-2
votes
1
answer
34
views
how to ignore Actor methods and use static import of Actions?
when I use static import of import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;
import com.badlogic.gdx.scenes.scene2d.Actor;
...
1
vote
1
answer
43
views
how to change fontsize using gdx BitmapFont
I created a font in java with BitmapFont
private BitmapFont font = new BitmapFont(Gdx.files.internal("HARLOWSI.TTF"));
now, I want to change the size of the font,
I tried the method font....
-2
votes
1
answer
36
views
Using Junit4 for game tests based on libgdx/ECS. Tests failing if executed together
Long story short: I am developing a small game with libgdx/ECS (Entity-Component-System) and had now mutiple times the issue that I changed the code and afterwards some other behavior was not working ...
0
votes
0
answers
18
views
Using libGdx, nothing is shown after calling stage.draw() which stage has extendViewport
game screen is:
public class GameScreen implements Screen {
final Test1 game;
private Stage stage;
private TrafficGame trafficGame;
public GameScreen(Test1 _game) {
...
0
votes
1
answer
29
views
TMX map not starting at x = 0. Android studio,
Im trying to move the map to x = 0. the player is spawning correctly at x = 0, and the camera as well but the map is not.
this is the map tmx (untitled.tmx):
<?xml version="1.0" encoding=&...
0
votes
0
answers
22
views
Interface not working Libgdx + Non-Libgdx activity
I want to implement Firebase into my LIBGDX part of my project and need an interface as said in the Tutorial: https://libgdx.com/wiki/app/interfacing-with-platform-specific-code .
I followed the ...
0
votes
0
answers
33
views
Render object with offset in libGDX
During learning libGDX I encountered a problem with rendering mountains on background. In book I have folowing part of code:
private void init () {
dimension.set(10, 2);
regMountainLeft =
Assets....
0
votes
2
answers
33
views
Shape Drawer draws nothing in lib gdx
Simple, the shape drawer renders nothing and its just a black screen. Why is this so overly complicated to use? I can't figure this out like it just simply doesn't render anything and why is stack ...
0
votes
0
answers
35
views
How to set up antialiasing in LibGDX 2D mode?
I create a videogame using LibGDX.
I want to switch on antialiasing because my game is very pixelarted.
Field:
int samples = 0;
in the class
Lwjgl3ApplicationConfiguration
is not more public and can ...
0
votes
0
answers
38
views
Libgdx Sound occasionally occurs twice
When playing a Sound in Android with Libgdx, the sound occasionally occurs twice. It plays twice when the game is first loaded or when it doesn't play for ~5 seconds. So for instance, don't play the ...
1
vote
1
answer
31
views
How to create a proper tick method in a lib gdx game
I just started with lib gdx and essentially gave up on using lwgjl for making a game as it is ridicoulosy overcomplicated. The problem is that lib gdx has a built in create() method run once at ...
1
vote
2
answers
45
views
Texture Packer full path to the subimage
In the book I found during reading next text:
"If the TexturePacker cannot fit all the subimages into a single texture, it will automatically split them up into several texture atlases. However, ...
0
votes
1
answer
37
views
Where can i change the color of objects in LIBGDX
I am just getting to know LIBGDX library and need to change the color of all objects to different shades of purple. I thought that by putting all objects of the same type e.g Pegs, Walls, catchers ...
0
votes
1
answer
62
views
How do I include JVM dependencies along with an iOS KMM target when deploying to iOS using RoboVM?
Currently writing a LibGDX app that has KMM and JVM sub-projects. They currently compile and run on desktop and Android. Now I'm trying to get it working on iOS, which will use RoboVM.
Since the app ...
2
votes
1
answer
76
views
Enable code hot swapping in Android Studio
I'm currently learning LibGDX using Android Studio as my IDE, and I have a question regarding the code hot swapping feature in the context of a project created with LibGDX.
I've noticed that when ...
0
votes
0
answers
36
views
Java libGDX: How to change Music speed?
I am developing a game using libGDX and want to control the speed multiplier of Music, such as accelerating playback by 5 times and 10 times, similar to the function of holding down the space in the ...
0
votes
1
answer
31
views
The Y axis is inverted libgdx
I am trying to print the coordinates in libgdx of the PLAY button that I touch
Everything works well towards the X
But the Y is upside down and not in the right direction either, it says it is between ...
0
votes
0
answers
23
views
Setting individual pixel of a pixmap. LibGdx,
How do I set individual pixel of a Pixmap in LibGdx.
I want to make only the alpha channel to be zero whererever there is a particular color.
Now I create a pixmap with a backrgound color with very ...
0
votes
0
answers
56
views
Why this label is rendered twice?
I use ktx.
I have the code below:
abstract class BaseScreen(val game: PKGame) : KtxScreen {
val stage: Stage
init {
stage = PStage(ScreenViewport())
Gdx.input.inputProcessor = ...
0
votes
1
answer
29
views
Android Studio: libgdx scene2d: InputMultiplexer not working in release mode. Application crashes
I have put together a framework for a game that also works (several apps have already been created with this framework).
Up to Gradle version 7.4.2, both build variants (debug - release) work ...
0
votes
1
answer
25
views
LibGdx black boxes on top and right where textures don't render
I just started to create a Game with LibGdx, but when I render a Texture on the top or on the right side of the Window it won't show on up the Screen. It's like there are two black boxes that are ...
0
votes
0
answers
20
views
LibGDX texture distortion issue
Whatever reason if windows size different than default 512x384 every texture is distorted i tried other viewports but it didn't help.
random pixels larger than others and etc
public class PartyScreen ...
0
votes
1
answer
41
views
ChaCha20 IOS usage problems
Stack: LibGDX, robovm, java(kotlin)
Platform: IOS
Algo: ChaCha
Task: encrypt/decrypt byte arrays
I've tried Cipher.getInstance(), but got NoSuchAlgorithmException on IOS (same code on Android build ...
0
votes
1
answer
25
views
Ground Box doesn't work in LibGdx and Box2D with Scene2d
I've read so much about "pixel meters", viewports, etc.
I got it to some extent, I think.
Have now created a scene2d to test.
But something is wrong with the conversion of the ground box, I ...
0
votes
0
answers
29
views
Libgdx: GLFW may only be used on the main thread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0
Running maven command on terminal to execute my Libgdx application, I get the error: GLFW may only be used on the main thread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0. The ...
1
vote
1
answer
50
views
LibGDX Displaying UI elements in game world
I'm making a game in LibGDX. I use Box2d to manage my game world. I'm thinking of a way I can display things like a health bar or nickname related to the body. I'm currently converting world ...
0
votes
2
answers
35
views
Moving of Actor LibGDX to dynamic coordinates of another Actor
Please, help me with my issue. I need to move an Actor to dynamic coordinates of another Actor. If I use MoveToAction, the Actor moves to the given GetX() and GetY() coordinates of another Actor, but ...
0
votes
0
answers
35
views
What are the use cases for the TiledMap class?
Old title: How do I prevent Tiles from moving with the camera? TiledMapRenderer
I have a world made up of tiles, an OrtographicCamera which follows the player and a ExtendViewport that manages the ...