Questions tagged [libgdx]

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.

The libgdx project is a cross-platform (Windows, Mac OS X, Linux, Android, BlackBerry, HTML5, and iOS) game development library written in Java with some JNI code. It abstracts away the differences between the different platforms, and enables easier development of OpenGL-based games on them.

Libgdx is an open-source effort (LibGDX Github page), started by Mario Zechner in late 2009/early 2010. In its original form it was an attempt at a rapid prototyping library which avoids the slow development cycle usually encountered when creating pure Android applications. The goal was to be able to work mostly on the desktop, and only deploy to the emulator/a device when absolutely necessary.

Libgdx now is a multi-backend, cross-platform game development library which is not only targeting Android but can also be considered a viable framework for desktop applications (stand-alone, applets, Webstart).

Includes a wrapper to work directly with box2d (2d Physics). And one for bullet (3d Physics).

Please note that there's a rich community on the official forum, and an official wiki.

2300 questions
41
votes
5 answers

How can I give the illusion of height to a ball in 2D?

In 2D top down soccer games, sometimes a ball is given the illusion of being in the air, like below: How can I achieve this?
Donald
  • 524
  • 1
  • 4
  • 8
26
votes
5 answers

How do I make an on-screen HUD in libgdx?

I'm new to libgdx, and I am finding I am getting stumped by the simplest of things. It seems to want me to do things a specific way, but the documentation won't tell me what that is. I want to make a very simple 2d game in which the player controls…
Devin Carless
  • 261
  • 1
  • 3
  • 3
24
votes
4 answers

How to animate abstract 2d top down water texture?

I currently implement a game with a top down view of the ocean. I use the following, a little abstract texture: The actual texture is transparent, I added the green-like color for clarity. The problem I now have is, that I don't know how to animate…
morpheus05
  • 383
  • 1
  • 2
  • 9
22
votes
3 answers

Play videos with LibGDX

Is there a way to play videos with LibGDX? I want to put a video as my splash screen in Android, but I dont want to use the Android SDK, because I am using LibGDX and I am almost finished :/
Rudy_TM
  • 1,422
  • 4
  • 22
  • 32
22
votes
4 answers

Resolution Independence in libGDX

How do I make my libGDX game resolution/density independent? Is there a way to specify image sizes as "absolute" regardless of the underlying density? I'm making a very simple kids game; just a bunch of sprites displayed on-screen, and some text for…
ashes999
  • 11,292
  • 10
  • 64
  • 99
20
votes
2 answers

Where are all the tutorials for libGDX?

I've searched online for help and tutorials on LibGDX but I couldn't really find any, except and the wiki for asking questions on stackexchange. Besides the source (demos) and wiki , is there any other tutorials online that's hidden or indirect?…
Blue
  • 621
  • 4
  • 13
  • 26
19
votes
3 answers

What libgdx project files can I ignore from version control?

In an automatically created libgdx project, what files can I safely tell Git (or other revision control systems) to ignore? I'm considering these: *-android/.settings/ *-android/bin/ *-desktop/.settings/ *-desktop/bin/ *-html/.settings/…
Zhen
  • 1,316
  • 1
  • 13
  • 30
18
votes
2 answers

LibGDX - Check if currently on Android/Desktop

I'm using LibGDX and flixel-android to build a Desktop/Android game. It feels like there should be a way of checking to see if you're currently being run on an Android device, the Desktop, and so on, but I can't find it anywhere. Am I supposed to…
mtrc
  • 301
  • 1
  • 3
  • 7
17
votes
2 answers

Why doesn't my android application rotate when I rotate my screen

I am building a game in LibGDX and the game screen orientation is in landscape. I want it to stay in landscape but I still want the user to be able to flip the device onto the other side and the screen will rotate with it. My application refuses to…
G3tinmybelly
  • 503
  • 2
  • 6
  • 19
16
votes
3 answers

How do I move the camera in full pixel intervals?

Basically I want to stop the camera from moving in subpixels, as I think this leads to sprites visibly changing their dimensions if just ever so slightly. (Is there a better term for that?) Note that this is a pixel-art game where I want to have…
Joschua
  • 245
  • 3
  • 16
15
votes
3 answers

LibGDX Game vs ApplicationAdapter

When I create a new LibGDX project the main class of Core project extends ApplicationAdapter . Here is how it looks like. package com.marimba.apptest; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import…
Vahe Muradyan
  • 606
  • 2
  • 7
  • 18
14
votes
1 answer

How to match font size with screen resolution?

So I'm working on a game using LibGDX, and I have a problem. To make my game fit most resolutions, I created a base asset for each aspect ratio, for example, a main menu background image, I made it in 800X600 for 4:3, 1280X720 for 16:9 etc. Now I am…
Aon GoltzCrank
  • 489
  • 1
  • 4
  • 16
14
votes
2 answers

How would I implement procedurally generated tiles in libgdx?

I'm creating a simple top down Zelda-esque game in libgdx, and I want to implement tile-based dungeons that are procedurally generated, similar to this. Libgdx does have a class called TiledMap which would seem to fit my needs, however documentation…
camden
  • 261
  • 1
  • 2
  • 6
14
votes
1 answer

What are the differences betwen Texture, TextureRegion, TextureAtlas, Sprite and Image in libgdx?

I've searched around for tutorials. I've seen people using the above classes to load images. As according to my understanding, all of the classes can read in a non-power of two images, TextureRegion/TextureAtlas are usually used to load sprite…
user15783
  • 357
  • 1
  • 3
  • 9
14
votes
2 answers

Graphics not being displayed on OUYA

I hope its not too early to be asking OUYA dev questions, but I just got my dev kit and I want to get my game running ASAP! I am using LibGDX as my framework for my game and launching the Android backend on the OUYA. Everything seems fine except…
Amplify91
  • 1,217
  • 2
  • 10
  • 21
1
2 3
…
99 100