A game library which enables cross-platform game development in Java, with support for Android development and desktop development. It makes use of OpenGL for portability.

learn more… | top users | synonyms

1
vote
2answers
116 views

LibGDX - Rendering things in different classes

thanks for your time! I'm really new to LibGDX (and Java itself). Which approach should I use to render my different game parts? I want to show a background, the main character, a bunch of enemies ...
0
votes
0answers
14 views

DynamicBody diving into StaticBody

In my game I want a DynamicBody to dive down into a StaticBody. I set up both bodies. At the moment they are colliding. How can I get my DynamicBody to dive down? Is it going to work with this ...
0
votes
0answers
13 views

LibGDX - How can I write my own custom layout (E.g. table layout) [on hold]

I am currently developing a game and I got to a point where I realised I should use a layout for my screen, as it is going to get messy if I don't (both code and looks wise). Thing is, I do not want ...
0
votes
1answer
17 views

libgdx(android) touchup triggers more than once?

I have a function I run inside the touchUp method but when I click with the mouse during emulation, it triggers my function multiple times. I don't think its an error with the called method itself ...
0
votes
2answers
242 views

get View from LibGDX for Android

I am making a LibGDX app, and I need to get the view to put to an Android app. Here is the code to get the view: package jangkoo.game.shadowfiend.android; import ...
2
votes
2answers
161 views

Why do my Box2D bodies occasionally get stuck and separate forcibly?

I'm making a space game with LibGDX and Box2D. I made a video here to illustrate the issue. Verbal description: When objects collide, they sometimes get stuck together and are then suddenly separated ...
0
votes
1answer
13 views

Polygons and actionlisteners Libgdx

I've been browsing these forums for a while now and I nearly always am able to find an answer without having to ask my own question! Such a great community! This is the first time I've been stumped ...
0
votes
1answer
40 views

Libgdx Admob how to hide ad on specific screen?

I've recently started learning Java for android development. My first game is almost ready to publish in Google Play, but I'm affraid that google might say that on the one screen, the ad may be ...
2
votes
1answer
26 views

Libgdx how to add popup interaction

I am looking for someone to point me in the right direction. I am working in libgdx. I have a game where a player will approach an object on a map and then interact with it. On interaction a new ...
1
vote
0answers
17 views

LibGDX: How to detect remote button press for Android TV?

On Android TV, I need to be able to detect the remote control centre button to start the game. I tried: if (Gdx.input.justTouched() || Gdx.input.isKeyJustPressed(Input.Keys.SPACE) || ...
0
votes
1answer
118 views

Libgdx using Box2d with TiledMap to create collision detection

I'm fairly new to Libgdx and have some good basic knowledge on Java. Right now I am stuck on how to add collision to my TiledMap, I am using the Mapeditor to create the tilemap. I read so many ...
0
votes
0answers
16 views

Box2d Coordinate System

In the game I'm trying to code I got to have two bodies. One StaticBody and one DynamicBody. I want to have the DynamicBody on top of the StaticBody. Somehow all I get is this: Is it possible that ...
3
votes
2answers
362 views

How to setup libGDX project only for Android & iOS?

I have developed some applications on android.But now i want to learn game development in Android & iOS with libGDX. I want to only develop for Android & iPhone.I do not want a desktop ...
1
vote
1answer
25 views

LibGDX Deployment questions

A few questions from LibGDX newbie: How do you deploy a Mac/Windows app? If Mac app, can this be deployed to Mac App Store? Do you need to pay monthly (for RoboVM) for iOS development/deployment? ...
1
vote
1answer
55 views

Rendering Performance: num Draw Calls == num Texture Bindings

I'm making a game with Libgdx 1.6.4 and experience some lag issues on iPhone 4 and then discovered: // in the constructor GLProfiler.enable(); ... // in the render method Gdx.app.debug("draw ...
1
vote
0answers
23 views

LibGDX on Android TV

Anybody wrote games for Android TV using LibGDX? What is the mapping of the remote control? Can we use the game controller with LibGDX? Thanks!
0
votes
0answers
19 views

libgdx html part in browser only shows libgdx logo

I am trying to run HTML part of libgdx. I followed its official guide https://github.com/libgdx/libgdx/wiki/Project-setup,-running-&-debugging I have installed GWT plugin, I did GWT compile and ...
3
votes
1answer
1k views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
0
votes
1answer
171 views

LibGDX - Executing 2 different touchDown events in the same method

On the bottom left of my screen is a circle with an Arrow and on the bottom right is a circle with a gun. If the player is in jetpack mode and the Arrow "button" is clicked he flies like flappy bird ...
0
votes
2answers
61 views

Libgdx coordinate system

I just started with libgdx and I'm still figuring out how the coordinate system work.The code below would draw the image at [0,0] without the Orthographic camera What I can't understand is why the ...
1
vote
1answer
1k views

Deploying GWT application / LibGDX and TextureAtlas problem

I encountered with a little problem. After GWT (and LibGDX) deployment I got an error: GwtApplication: exception: Couldn't load image '/images/objects.png', file does not exist Couldn't load ...
1
vote
1answer
54 views

Box2d jetski on water

At the moment I am trying to code a 2d game in java, where a jetski is riding on water. If you press on the screen the jetski should dive down and jump back up on release. How do I have to do this in ...
1
vote
0answers
20 views

Model a helium balloon on Box2D + libgdx [closed]

I want to make so that the bigger the balloon is, the faster it goes upwards, and if it's not big enough it will fall down. I tried applying a force greater than the gravity but it doesn't work as I ...
2
votes
1answer
39 views

Viewport and Camera setting

For my first game in LibGDX and Android I got a Problem: I have a background picture which is 2560px * 720px. The screen is 1280 * 720. How do I have to set the viewport and camera in order to get ...
1
vote
3answers
72 views

Collision response and delta-time problems

I'm working on a 2d top-down shooter game. At the time, I am trying to get the movement and collision right, but I have a few problems with this. First of all, I am making my game frame independent ...
1
vote
1answer
274 views

LibGDX multiple enemies animations

Hello everyone i have a question about animating multiple enemies on the screen at the same time. Basically, i figured out how to use the Pool for creating enemies and dispose them after use etc.. ...
0
votes
1answer
48 views

Collision with player following mouse

I'm making a RPG with libGDX. I've loaded a TiledMap and now I'm implementing the player movement. The view is top-down. In my game I want two ways of input: one is using the ARROW keys to move the ...
0
votes
1answer
46 views

AssetManager proper usage in libgdx

I am a beginner in libgdx and I am coding a simple game. This game is like a word puzzle where each letter is a texture. Before loading the first level I need to load into memory 26 textures, one for ...
-1
votes
2answers
44 views

Removing default badlogic from desktop launcher [closed]

I'm making a game in java/libgdx. when I run the code in the desktop launcher it gives me a bunch of errors. All the errors are from the badlogic default package. My code: package ...
2
votes
1answer
49 views

Should I initialize a Box2D World per Level?

I'm using a LevelManager to load Tiled maps in my libGDX game, which stores: Static: final Size of map in Tiles final Size of map in Pixels final Size of an individual tile TiledMap ACTIVE_MAP ...
0
votes
0answers
46 views

Libgdx texture bleeding in tile map

So I am making a game in Libgdx using an isometric tiled map but when I set the texture filtering of the tiles to linear, black lines show up between all the tiles. This is caused because each tile ...
2
votes
1answer
138 views

What are the steps for creating level in Libgdx with Box2d? [closed]

I have been trying to learn game programming for a week, although I have a good knowledge of programming. I don't understand some steps of game design. I'm recently working to clone the iSlash ...
1
vote
1answer
20 views

Libgdx particle editor absorb effect

I am trying to achieve a certain kind of absorb effect within libgdx via the particle editor. To be more descriptive: I want particles to spawn in a circle and then move towards the center point of ...
0
votes
2answers
2k views

SpriteBatch being drawn outside of Stage?

Currently working on my first game, though running into some problems with libgx and screen aspect ratio. What I have is a Stage which contains things like menu buttons etc, and the rest of the game ...
2
votes
3answers
219 views

2D - Smooth lighting with shadows for a tile-based game

for the last week or so I have been completely stuck on trying to implement efficient lighting. I've been researching and experimenting and I've looked everywhere that I have been capable of finding, ...
2
votes
1answer
470 views

Black screen when switching from fullscreen to windowed mode with libgdx

I have just started working with libgdx, and have run into my first problem. I have a simple program that switches a desktop application from windowed mode to fullscreen and back again. If I start the ...
5
votes
6answers
6k views

Port libgdx application to iOS

I made my game using libgdx which is a cross-platform framework which supports desktop, Android and html5 (using Google Web Toolkit). What could be a possible route to port my game to iOS?
2
votes
1answer
60 views

LibGDX - Can't read .ttf file when running Android configuration

when running or debugging my game on android device, i get this error in the logcat: com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: data/fonts/myFont.ttf (Internal) which is ...
1
vote
1answer
83 views

How to use mipmap with TextureAtlas and AssetManager

I searched on the Internet but couldn't find the way to use mipmaps with libGDX TextureAtlas. I want atlas instead of normal textures because as far as I know mipmap supports only 2^n width and height ...
0
votes
1answer
157 views

LibGDX - Accelerometer Problems

I got some issues. I'm using LibGDX. When I hit an object, my Fighter is supposed to fall to the Ground. BUT, because of the Accelerometer, i can still move it up and down eventhough it died. The ...
0
votes
1answer
195 views

Mouse coordinate conversion Libgdx

I have a camera: //Map is a my object that wrapper of TiledMap class In the create method: this.renderer=new OrthogonalTiledMapRenderer(this.map.getMap(); this.camera=new OrthographicCamera(); ...
0
votes
1answer
148 views

How can I split my entity manager class into a gameworld class and gamerenderer class?

I currently have a libGDX game where I have an entity manager class which is called in the gamescreen. Instead, I would like to utilise it in a gameworld class and a gamerenderer class, but I cannot ...
1
vote
1answer
38 views

Running and Jumping using Box2d and libgdx

.this is my first trial on making a 2d game and currently struglling how to run and jump smoothly. My problem is when the player keep pressing on left or right botton then jump. the player won't jump, ...
1
vote
1answer
553 views

Multiple enemy array in LibGDX

I am trying to make a multiple enemy array, where every 30 secods a new bullet comes from a random point. And if the bullet is clicked it should disapear and a pop like an explosion should appear. And ...
3
votes
2answers
61 views

LIbgdx android app remove fullscreen and show titlebar

I am developing an app using libgdx and i dont want the app to go fullsceen and i also want to show the title bar but the app goes to full screen and hides title bar instead of all efforts. here is ...
0
votes
1answer
54 views

LibGDX: Colllisions between bullets and enemies in arrays

I am writing a "Gauntlet" style game. So far I have managed to successfully detect collisions between my player object and my ghost enemy objects, and when they collide they drain the player's energy. ...
0
votes
1answer
106 views

Loading TextureRegion with filter diff from that of texture it came from

I am using libgdx . While packing my texture atlas I have set the filter for mag and min to Nearest . But for just one region I wish to draw it with linear filter . Is it possible to have different ...
0
votes
2answers
84 views

How do I draw an object that I always want to appear in the same place on screen on a scrolling orthographic camera using lib gdx?

So I want to make an endless scroller game and the orthographinc camera is scrolling downward so i want the character to stay with the camera. I'm not sure how to aproach this i've been looking a lot ...
0
votes
1answer
592 views

How can I implement online high score in LibGDX?

I found some posts that said to use Google Play Services. What about other platforms? Is their some libgdx library that I can use to implement it in core section or do I need to write separate score ...
2
votes
1answer
53 views

[Libgdx]Screen not rendering after restarting game

I have a strange problem while using the libgdx library Game works fine on the initial launch on Android, but after that restarting game does not render the graphics on the screen properly. It is a ...