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.

learn more… | top users | synonyms

0
votes
0answers
22 views

Libgdx HexagonalTiledMapRenderer

How does the hexagonal tiled map renderer work in libgdx I'm trying to render a hexagonal tiled map and I can't quite get it to display correctly I've used the orthogonal tiled map renderer before and ...
0
votes
1answer
20 views

Setting resizable to false in LibGDX

I have a small working game prototype. I want to do something like LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); cfg.resizable = false; But I get ...
1
vote
1answer
96 views

LibGDX - Level management on a level-based game

I'm new to LibGDX and android development in general and am trying to do a puzzle game. Being a level-based game, i'm trying to make it so in every level a certain number of blocks (just rectangular ...
1
vote
1answer
64 views

Scoping my first project [closed]

So I'm writing my first game which is a RTS and one of my main ideas for it is multiplayer deception however I'm finding it hard to control the scope of my project. Yes im thinking pretty small but ...
3
votes
1answer
92 views

LibGdx 2d Free-Form Terrain

I have a query about how to create a 2d landscape level using libgdx/ box2d (Or possibly with Unity) for Android and iOs. Let me describe the goal and then the specific points I need help with. What ...
2
votes
2answers
86 views

create ipa without RoboVM in a project libgdx

I am creating an application with libgdx , and I wish I could produce an IPA without using RoboVM , because since version 1.9 became a fee . I saw on the original documentation that you can do with ...
2
votes
0answers
26 views

libGDX AppWarp integration problem

I have tried to use up AppWarp's old SuperJumper as a sample to create an up to date project from it with Gradle. Maybe it is good for learning. So, I have downloaded project from ...
1
vote
0answers
59 views

Overlap2d + LibGdx load large map

I've been wondering if it's possible to load a large map made with Overlap2d before I get started with my project. A large map for me is something equivalent to a map from recent open-world RPGs like ...
1
vote
1answer
66 views

Libgdx: Check collisions in Stage among actors

My goal is to check collisions among the actors that are in the Stage. My question is: is it necessary to maintain a list for each type of actor I have? Doing that I get 3 problems, 2 bad design ...
1
vote
0answers
38 views

Libgdx box2d - what is the best approach to spawn an actor on a stage dynamically?

I'm currently building a 2d sprite infinite runner game, but everytime I spawn new enemy(actor) and platform, I noticed that there's a delay on it. Any idea of what would cause this behavior? I'm ...
1
vote
0answers
16 views

LibGDX: Box2d hovering, rotating body

Hello I am working on a hovering triangle (equilateral triangle). The triangle should allways rotate at a constant speed and hover over the ground. The problem is if I setAngularVelocity it does rise ...
4
votes
1answer
71 views

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 ...
4
votes
0answers
121 views

Ledge climb animation and movement (2d platformer)

Struggling to make a decision on the implementation of a ledge climb mechanic for a physics driven 2d platformer. What is the best way to go about this without it getting overly complex? So far I ...
4
votes
1answer
74 views

Finding it difficult getting to grips with LibGDX [closed]

So I have spent about a week now learning libGDX and have made very little progress. I started small and wanted to make a strategy game where there is a tiled map of squares and you control a ship, ...
3
votes
0answers
43 views

Is it possible to use OpenCL in libgdx?

Been looking for a way to implement some OpenCL stuff in my libgdx project. It's possible via LWJGL which libgdx is based on, but it's only for the Desktop environment. Would like to have it cross ...
1
vote
0answers
42 views

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 ...
2
votes
1answer
32 views

Libgdx : surround sound

in libgdx there is a lot of audio classes but i haven't seem to of found anything relating to balancing sound in one speaker and or the other to get surround sound say you check if an object is more ...
3
votes
1answer
72 views

Shaperenderer circle line width

Is there any way to increase the width of the line that makes up the shaperenderers circle? shape.begin(ShapeRenderer.ShapeType.Line); shape.setProjectionMatrix(batch.getProjectionMatrix()); ...
2
votes
0answers
14 views

Eliminate an Actor dragged outside SlotTarget

As the title suggests, i would like to eliminate an Actor from the Stage when the player moves it outside my SourceTarget. The default behavior of DragAndDrop class doesn't allow to drag an Actor on a ...
1
vote
1answer
33 views

Getting an object to shoot directly towards click libgdx java

I am trying to get my player to shoot a spell and it travels to where ever the player clicked. I can easily accomplish this by doing the following. if(position.x >= destination.x - 1 ...
2
votes
1answer
41 views

Changing the direction of a particle in libgdx java

I have a particle the explodes upwards. This would work the way I want if the particle always hit the ground. However I want the particle to explode at a -90 degree angle if it hits a wall from the ...
1
vote
0answers
85 views

UE4 or Unity or Libgdx for VR project using Oculus rift and Novint falcon

I've to make a multiplayer game Air Hcokey using 2 Oculus rift and 2 novint falcon controllers , I know that these 3 engines support the Oculus Rift but have no Idea if they do support the Novint ...
2
votes
1answer
39 views

Libgdx - Viewport for Tetris-style game [duplicate]

I'm a beginner in libgdx, and I'm trying to create my first game. It's pretty simple, circles are falling from the top and sides of the screen, and the user needs to "blow" them before they touch the ...
1
vote
1answer
70 views

Switch beetween Screen on LibGdx application

i have set main class like this: public class MyClass extends Game { MenuClass menuClass; ActionGame actionGame; @Override public void create() { menuClass = new MenuClass(this); ...
1
vote
1answer
53 views

How to handle complex input

In my Libgdx project i need to handle several types of inputs. In particular these input events are needed in order to interact with the Actors that the user puts in the Stage. The possible ...
1
vote
1answer
85 views

Sprites are rendered as black rectangles in android 4.0.x only

I have some problems rendering sprites correctly on a LG optimus vu (android version 4.0) with libgdx. Basically sprites are black rectangles, while other images that i declare as Texture are correct. ...
2
votes
0answers
57 views

Get a body from TiledMap via MapBodyBuilder and draw a sprite on it in LibGDX?

I use a various of MapBodyBuilder in my Libgdx project. I created a body from map.tmx via my MapBodyBuilder and in my SpriteBuilder buildSprite method i created its sprite: sprite = new ...
3
votes
1answer
78 views

Rotate sprite along the angle between two objects

Im trying to make flames follow my object, I set the direction for my moving object using the points between it and another object (using static destination for testing). No matter what I do I ...
2
votes
0answers
35 views

Scene2d cyrillic font

I'm trying to use cyrillic(Russian) letters in libgdx Scene2d. I drop default.fnt and default_0.png (generated with BMfont) into folder assets of my Android project (other files such as ...
4
votes
2answers
232 views

Smooth 1D terrain generation

So I'm pretty happy with my terrain, and the progress on my game. I just want to figure out why the terrain is so steep sometimes. Right now to generate my random seed I use this: seed = ...
2
votes
2answers
102 views

Rows of coins in libgdx?

I have my coin image in the assetLoader class, then I import it into gameWorld. My question is, how can I draw() rows of coins without having to write out 15 different coins? i.e., coin1, coin2, ...
1
vote
0answers
54 views

How to disable static friction in Box2D?

I'm making a 2D platformer. One of the issues is that when the character hits the ground, there's an initial pause and then the character finally slows down to a halt. I believe the initial pause is ...
6
votes
3answers
231 views

Java and Steam JVM deployment

I am currently considering my options for game development and deploying to Steam Greenlight. I really like Java with libGDX, especially for its cross platform Android potential, and I understand that ...
1
vote
0answers
42 views

Getting screen coordinates of actor

I'm trying to tell if an actor exists at a screen position so I can do something if the actor is clicked on. To do this, I first need to get the screen coordinates of the actor so I can compare it to ...
5
votes
1answer
137 views

How do I implement tilt controls that work even when the device is not vertical?

I'm using libGDX to develop an Android game. The main character can be moved freely in the 2d plane by tilting the phone. The relevant part of my current implementation looks somewhat like this: ...
2
votes
2answers
53 views

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 ...
2
votes
0answers
63 views

Native vs Framework development for simple board game development [closed]

I have been working on a simple word game like Hangman Pro but for a different language and I have been using libgdx blindly. After a lot of hassle and unnecessary distractions, I am beginning to ...
2
votes
0answers
53 views

Creating a bitmapfont from images?

A bitmapfont consists of a image and a textfile that hold the position and size of each character on that image. Is there any way to create the text file with just a image? Or do I have to manually ...
2
votes
2answers
87 views

Android libGDX FreeTypeFontGenerator exception

I am working on a libGDX project for Android. Since I added the following code, running the game on my Android phone produces an exception: final FreeTypeFontGenerator generator = new ...
1
vote
1answer
156 views

How do I delete all saved preferences in my libgdx project?

I want to delete the preferences that saved my last highscore. How can I do this? Here's how I am saving preferences at the moment: prefs = Gdx.app.getPreferences("ZombieBird"); if ...
0
votes
0answers
53 views

Avoiding circular referencing using a Finite State Machine in a Component Based Architecture

While answering this question, I realised I had made the same mistake in my own code for a game I am writing using an Entity-Component System. The problem arose when I decided to use a Finite State ...
6
votes
1answer
130 views

How do I set an object's speed to arrive in X seconds?

I want to move an object to a point in the game world, I have the distance value which is far the player should move. I want to complete the movement in X seconds. I have tried many equations and ...
2
votes
2answers
91 views

libGDX Error loading font file - Netbeans

I'm trying to load a font in libGDX. But I can't figure out want I do wrong. Code: white = new BitmapFont(Gdx.files.internal("fonts/white.font"), false); Error: Exception in thread "LWJGL ...
3
votes
1answer
263 views

Steering behaviours: collision avoidance with rectangles

I'm trying to implement collision avoidance steering behaviour using rectangles. Most of the tutorials I've found are with circles, and there's a substantial difference. For example, I've been reading ...
1
vote
1answer
91 views

How to detect if two sprites are being touched at the same time?

I tried this: if(spr.getBoundingRectangles.contain(x,y)){ //do this } but how to detect if the other sprite is touched by the second pointer? Then I created two Vector3 for the pointer ...
0
votes
2answers
62 views

How do I properly load maps?

I'm trying to load my map properly, but it takes some time (after the games has been started) to be how it should. Am I doing something wrong? Why is this happening? AndroidStudio: Tiled (map ...
1
vote
1answer
22 views

Convert MathAtan2 angle to degrees

I use an angle to set the velocity (or direction if you prefer) of my sprite, however, I want the sprite to be heading in the same angle as I'm moving, rotating according to that angle. How I set ...
1
vote
1answer
131 views

Dynamic Events in an Entity Component System

My game makes extensive use of libGDX's Entity Component System Ashley, and my game world (including all levels and areas) is created with Tiled. In Tiled, I have an object layer where all of my ...
2
votes
1answer
161 views

How do I check for collision between an ellipse and a rectangle?

I am working on LibGdx framework for developing a 2D isometric tower defense game.All my sprites are drawn in 2D isometric view. I have used an array list to store 8 points at boundary in the ...
1
vote
0answers
31 views

Physics Body editor loader collision detect

In my game I use the Physics Body Editor to add custom shapes to my bodies. In my show() method I use the follownig code to create my Jetski Body: BodyDef jetskiDef = new BodyDef(); ...