Quantcast
Channel: Question and Answer » libgdx
Browsing all 434 articles
Browse latest View live

Enable multi touch for Scene2d UI widgets?

I’m using scene2d for my on-screen controls. I have 3 buttons and each one has it’s own listener which sets the entities current action on touchUp and touchDown events. However when I hold one button...

View Article


How to stop Follow Path steering behavior when reached target?

I’m using libgdx Follow Path Steering Behavior in my top-down game. When unit reaches the end of the path, it goes to the start (not directly, but following path), then to the end and so on. How to...

View Article


Unable to load Blender animation into libgdx

I am trying to load an blender animation into libGDX for an android app. So I created an animation using Blenders action editor, I exported this into .fbx format. I then ran the fbx-conv tool to create...

View Article

How to use Java 8 with Lib GDX in IntelliJ?

I have set the jdk to Java 8 and I have modified all the build.gradle files in my project to have sourceCompatibility = 1.8 instead of 1.6. My problem is that while it does work on Desktop it doesn’t...

View Article

Image may be NSFW.
Clik here to view.

Create a Polygon on sprite – libGDX

Can you guys help me by telling how I create the two polygons, I need one for the yellow side and one for the black side of this sprite please. Sprite: I would like to make it so that neither of the...

View Article


Image may be NSFW.
Clik here to view.

Desktop launcher Error in Java & LibGDX

What’s my problem: It says there is a null pointer exception in my desktop launcher class even though I haven’t really touched it other than add a title and change the width & height. The weird...

View Article

Make game camera stay inside of tiled map boundaries [LibGDX]

I am creating a little 2D platform game, with the LibGDX framework. So far I have created a simple prototype level in Tiled, and loaded this map into my LibGDX game. I can use mouse and keyboard...

View Article

libgdx-using more than one class [closed]

Hi i am very new to programming and in this community,so im recently studying on how to develop games with libgdx and all the tutorials only have one class and do all the things in that class,but is it...

View Article


Image may be NSFW.
Clik here to view.

LibGDX – Getting Tile Map Layers Problem

While following a tutorial with LibGDX, I am working with tile maps. This is the method that I’m using: tilemap.getLayers().get("Collision Layer"); or tilemap.getLayers().get(1); //1 is the second...

View Article


Move/Rotate 3d multiple objects w.r.t. to one another in libgdx

I have two blender objects in .g3dj format. Below is the code : private void createBaseArm1(){ // Now load the model by name from asset folder baseArm1 =...

View Article

How to spawn Chunks in Libgdx?

I’m currently working on a 2D platforming game with an infinite map. I did my research and I discovered that I can use chunks. Based on my understanding chunks is about spawning terrain at the right...

View Article

Libgdx problem while converting TextureRegion to Pixmap

I’m developping a Tile base game where I have to generate transition tiles. To do so, I have a method that generate those tiles from 2 existing one and 1 “filter tile”. I use this method to make a...

View Article

Is it possible to use a Unity 3d Model with libGDX?

Can I use a 3d model like https://www.assetstore.unity3d.com/en/#!/content/36951 in a libGDX 3d game?

View Article


Creating tunnel of points in LIBGDX

I have been wandering in the Internet lately to find the best possible solution for creating a 2d tunnel/cave in my game in LIBGDX. My game in short: One player can control a shape in tunnel, the other...

View Article

LibGDX: drag and drop in a vertical group

I need to mode with a drag and drop a cell/row in a vertical group and change its position, before or after another cell/row. Is there something that can help me to implement this? Thankyou

View Article


Libgdx change to other screen and dispose current one

I am trying to switch to a GameScreen when the LinearVelocity of a Box2D – Object is x = 0. If it is so, I am using the setScreen() – Method by calling the main class. This works perfekt, but when the...

View Article

Image may be NSFW.
Clik here to view.

Creation of a tiled map editor polyline in box2d is not working correctly

I’m currently trying to create a box2d polyline object in my libgdx game, but it’s not working as expected. To get a better picture of my subject, have a look at how it should look like, and how it...

View Article


Referencing individual cells of a tilemap and changing texture

I have a tilemap and am trying to proceduraly generate islands on it by changing the texture of the tiles and marking it as land ( I want to do this without texture atlas for now). How do you change...

View Article

Image may be NSFW.
Clik here to view.

Problem merging vertices of two polygonial bodies

SUMMARY I need help to create a weld joint that fixes the two bodies together in a way as illustrated in the first image. ISSUE I am having an issue where I cannot find out how to weld vertices of two...

View Article

Simple UI components in a game

How are simple UI inputs typically handled in 2D mobile games? For example, text input boxes and keyboards. It seems that many game engines do always have simple UI components. There are obvious...

View Article
Browsing all 434 articles
Browse latest View live