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,...
View ArticleLibgdx incredibly high RAM usage! [closed]
Alright so I’m new to Libgdx and Game programming in general, and I’ve got a huge problem. If I leave my game on, it will start to eat memory, pretty fast at that, until it reaches a point my PC hasn’t...
View ArticleLibGDX hexagonal tilemap getting adjacent tiles
How do I get all adjacent tiles to a hexagonal tile, my tile map is using a staggered co ordinate system with an odd stagger index and I am using libgdx java. if (x % 2 == 0) { hexAdj[0] = new...
View ArticleMethod keyTyped in ClickListener is not working
When im click my SelectBox and press some key, nothing happens. sbNationality.addListener(new ClickListener() { @Override public boolean keyTyped(InputEvent event, char character) {...
View ArticleProblems managing collision filtering
I have my character fixture and body(is a tank), so when I press the screen it throws a rocket(which also has a body and a fixture) that the player can controlll touching the screen. My game also has...
View ArticleHow to make a ball hit many tiled circular objects in LibGDX
Hey guys I’ve been learning to make games with LibGDX. I did a tiled map in Tiled and the rest of code in java using Android Studio. I could make a ball bounce on the flour using Box2D, but I can’t...
View ArticleCollision works except for when coming from right side
I am trying to make a bomberman clone. I’m having problems with the collision on the walls that is not on the sides of the map (see image). When I come from the right (going left), the red square...
View ArticleHow To generate spiky terrain in 2D?
I am learning game design, and wanted to know how one can automatically generate spiky terrain (something like this: Cavernaut, notice, the terrain at the sides?). I have heard about midpoint...
View Articlehow to accelerate and stop a sprite(car) using isTouched() in libgdx
I am working on Android libgdx project. I want to accelerate and stop a sprite using isTouched(). Plz help me and give me a answer with example
View ArticleHow to set cursor position to middle of screen while still being able to...
I have this code: @Override public boolean mouseMoved(int screenX, int screenY) { float deltaX = Gdx.input.getDeltaX(); camera.rotate(Vector3.Y, deltaX * -0.3f);...
View ArticleLibGDX – How to draw a filled rectangle behind a text?
I’m new in LibGDX and I want to create a grid based game. Every square will have a rectangle and a text and the background color of the rectangles can change during the game. The problem is when I draw...
View Articlemaking an object follow a path libgdx [duplicate]
This question already has an answer here: How to make a gui button follow a path after a touch? 2 answers
View Articlelibgdx: 2nd var of myClass()'s values saving to/overriding 1st var of myClass()
I’m using libgdx with Eclipse. PROBLEM: In the class inputHandler I have a list of buttons, menuButtons, composed of 2 buttons: playButton and retryButton. They both belong to the class simpleButton:...
View Articlelibgdx: SpriteBatch and ShapeRenderer projection wrong
I’m using LibGDX and the SpriteBatch and ShapeRenderer are having a perspective problem or something… When I draw something with both (code below), the planet texture is smaller than it should be. I...
View Articlelibgdx: 2nd var of myClass()'s values saving to/overriding 1st var of myClass()
I’m using libgdx with Eclipse. PROBLEM: In the class inputHandler I have a list of buttons, menuButtons, composed of 2 buttons: playButton and retryButton. They both belong to the class simpleButton:...
View ArticleWorldController won't update in Libgdx
I am trying to refactor the code from the superkoalio. If I take out the updateKoala() and I put it in the new class, name it WorldController, it simply won’t update the game when I call it from...
View ArticleScene2D viewport affects all other cameras despite having a separate one
I have two cameras initialized as such: val mainCamera: OrthographicCamera by lazy { OrthographicCamera(WIDTH * ZOOM, HEIGHT * ZOOM) } val guiCamera: OrthographicCamera by lazy {...
View ArticleSetting delay when switching from one screen to another in LibGdx
How can I add a delay when switching from one screen to another. Example:Screen1 class extends Game class and screen2 implements Screen implementation. Screen1 uses setScreen() method to switch to next...
View ArticleCircle to Polygon collision response
I’m working for collision response for my 2d game. Character is represented by circle and obstacles are represented by Polygons(in my example it would be rotated rectangle for simlification). The...
View ArticleHow can I automatically fit elements in libGDX layouts?
Recently I wanted to use libGDX’s Table to show four buttons. But my table doesn’t fit on the stage: Here is the code I used: table.add(new GameButton("1")); table.add(new GameButton("2"));...
View Article