Tagged Questions

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

6
votes
3answers
956 views

Understanding how to create/use textures for games when limited by power of two sizes

I have some questions about the creating graphics for a game. As an example. I want to create a motorbike. (1pixel = 1centimeter) So my motorbike will have 200 width and 150 height. (200x150) But the ...
1
vote
1answer
323 views

Fixed texture size (Pixel) libgdx, java

If I resize the window (e.g. fullscreen) the texture size also changes! I want that behaviour: If I change to fullscreen you will see more of the game world. The size (Pixel) of the texture stay the ...
8
votes
2answers
3k views

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

2D game world creation (libGdx, java)

I'am starting to develop a 2D game with motorbikes. My Question now is: When my bike reaches the right edge the world should move. (Like in that game: Game example) My first thought was to implement ...
1
vote
2answers
735 views

strange behavior in Box2D+LibGDX when applying impulse

I have been playing around with Box2D and LibGDX and have been using a sample code from DecisionTreeGames as the testing ground. Now I have a screen with four walls and a rectangle shape, lets call it ...
1
vote
2answers
3k views

LibGdx drawing weird behaviour

I am finding strange behaviour while rendering TextureRegions in my game, only when pausing it. I am making a game for Android, in Java with LibGdx. When I comment out the line "drawLevelPaused()" ...
6
votes
1answer
4k views

Repeat texture in libgdx

How to fill region with repeated texture? Now I'm using next method: spriteBatch.begin(); final int tWidth = texture.getWidth(); final int tHeight = texture.getHeight(); for (int i = 0; i < ...
1
vote
2answers
2k views

How can I make a tile appear on top of another without completely blocking the tile below?

Making a small RPG with libdgx just for learning about how to draw tiled maps and move around in them. I've got the tiles drawn and OrthographicCamera stuff figured out so I can see my world. My ...
1
vote
3answers
2k views

How can I create a flexible system for tiling a 2D RPG map?

Using libgdx here. I've just finished learning some of the basics of creating a 2D environment and using an OrthographicCamera to view it. The tutorials I went through, however, hardcoded their ...
1
vote
4answers
3k views

Something like libgdx for C++ / cross-platform (with mobile) SDK [closed]

Is there an SDK like libgdx which allows me to code in C++? I really like the features libgdx has, but would prefer to code in C++. I've looked around but can't find anything. I found the commerical ...
2
votes
2answers
853 views

Change the scale-policy of OpenGL ES in Android?

I currently develop a game for Android in OpenGL ES 1.0, use libgdx library. I target the 720x480 screen size. For example, I design only one arts pack for 720x480. And what will happen in Android ...
1
vote
3answers
2k views

Pass a single boolean from an Android App to a libgdx game

I'm writing an Android application that needs to pass a single boolean into an Android game that I am also writing. The idea is that the user does something in the App which will affect how the game ...
6
votes
1answer
2k views

Weird error with opengl in Android using Libgdx : “EGL_BAD_ATTRIBUTE”

I am having a weird error when uploading my game in the phones. E/Adreno200-EGL(5128): qeglDrvAPI_eglGetConfigAttrib:484>: EGL_BAD_ATTRIBUTE I am uploading the textures with AssetManager. I am ...
2
votes
2answers
377 views

Ray Picking: how can I find which copy of model to pick, if they share the same vertices, but each one is translated before being drawn?

I have a scene, in which I am drawing few different objects - each one has the same vertices and each one is translated to proper place before being drawn. While using libgdx (but I think that this ...
0
votes
2answers
324 views

Project updates don't show up on mobile device

I've made a small application with libgdx framework, which works perfectly on desktop. It runs on Android too, however once I change something in my main project and try to recompile it on my phone, ...
0
votes
2answers
563 views

Help with Meshes, and Shading

In a game I'm making in LibGdx, I wish to incorporate a ripple effect. I'm confused as to how I get access to the individual pixels on the screen, or any way to influence them (apart from what I can ...
0
votes
2answers
543 views

Euler angles to Cartesian Coordinates for use with gluLookAt

I have searched all of the internet but just couldn't find the answer. I am using LibGDX and this is part of my code that loops over and over: public void render() { GL11 gl = Gdx.gl11; ...
0
votes
1answer
3k views

libgdx setOrigin and setPosition not working as expected?

I create a camera: camera = new OrthographicCamera(5.0f, 5.0f * h/w); Create a sprite: ballTexture = new Texture(Gdx.files.internal("data/ball.png")); ballTexture.setFilter(TextureFilter.Linear, ...
12
votes
4answers
9k views

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 ...
1
vote
0answers
178 views

Blending effect on textures

Hi i am trying to build screen animation like flickering, interlace, color separation similar to old style malfunctioning Amiga screens. The intended effects are shown in this video. I am using ...
2
votes
2answers
2k views

rotating menu with Actors in libgdx

I am intending to build a circular menu, with menu items equally distributed around the circle. When clicking on a menu item the circle should rotate so that the selected item is facing the top. I am ...
0
votes
1answer
3k views

Problem with AssetManager in libgdx

I started using the asset manager, so I could use a loading screen. Everything is working fine, but when the app enters a pause state, it unloads every asset and when it loads the screen all the ...
12
votes
2answers
4k views

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 :/
2
votes
6answers
4k 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
3answers
878 views

What's an efficient way to represent game state for networked games?

I've done a little bit of network coding for games before, but primarily with TCP for games that don't really need to simulate real-time interaction. I am working on a (somewhat) simple 2D Java game ...
0
votes
1answer
948 views

How to make a 2D Terrain with opengl?

I want to make a simple 2d terrain with just a few bumps and height changes: I thought about just using random numbers to describe the height of a certain vertex, but I don't see how I can make ...
0
votes
2answers
4k views

Handle Input Processor in Device Back Button and Button as Actor

How to handle a event for both key as well as actor added in the screen? My problem is that at a time only one input processor is available either for button or device back button. How can I set input ...
0
votes
2answers
2k views

Libgdx Animation Timing

I'm having a small issue with libgdx animation. I'm using getKeyFrame() to get the current frame of the animation and I'm updating the state time by adding on deltaTime in my update function for the ...
0
votes
2answers
3k views

How do I move a body using the hardware accelerometer?

I want to move the ball as I move the device but I can not able to find how to use accelerometer in libGDX. I know that Gdx.input.getAccelerometerX() returns x coordinate but I don't know how to apply ...
2
votes
3answers
7k views

Camera Coordinate To Screen Coordinate

I want to convert the camera coordinate to screen coordinate. I have asked this question because my camera is 48m wide and 32m high but my screen is 480x320 pixels. So whatever collision point I get ...
4
votes
1answer
2k views

Is there a way to use the facebook sdk with libgdx?

I have tried to use the facebook sdk in libgdx with callbacks, but it never enters the authetication listeners, so the user never is logged in, it permits the authorization for the facebook app but it ...
1
vote
1answer
2k views

Create apk from libgdx project

What is the basic procedure to create the signed apk for my libGDX project? I am new to libGDX so provide some guidance. I am talking about deploying apk to the Android market. I have to ask this ...
1
vote
1answer
448 views

Erasing part of lines in libgdx with ImmediateModeRenderer

Hi i'm using the ImmediateModeRenderer renderer = new ImmediateModeRenderer10(); to render a line with the next block renderer.begin(matrix, GL10.GL_LINES); renderer.color(color.r, color.g, ...
0
votes
5answers
2k views

Relationship between Desktop and Android on LibGDX

So I finished tweaking a tutorial called Rain Catcher and I ran the desktop application. It works fine. I then proceeded to run the application using the android emulator the game then crashes. I ...
1
vote
1answer
452 views

Random Sprite Speed

I followed the Rain Catcher tutorial from libGDX and I made some modifications to the code, allowing the rain drops to appear faster. But I cant figure out how to make the raindrops fall at random ...
1
vote
1answer
890 views

Android APK export duplicating libgdx assets folder

I'm developing a game using libgdx targetting Java desktop and Android. For the assets I have a "data" folder inside the "assets" folder in the Android project. Then, I link it from the desktop ...
1
vote
1answer
906 views

Errors on LibGDX tutorial

I get the following errors on the LibGDX tutorial "Simple App" Exception in thread "main" java.lang.UnsatisfiedLinkError: no gdx64 in java.library.path at ...
0
votes
2answers
2k views

libGDX application does not support 800x480 resolution

I have an application written with libGDX that does not run with a resolution of 800x480, whereas on devices with other resolutions (e.g. 480x320) it works perfectly. It also works perfectly as a ...
0
votes
1answer
1k views

Virtual screen size with libgdx and GLES 2

I've been trying to use a virtual screen size for my libgdx desktop-android game. I'd like to always use a 16:9 aspect ratio but with a virtual screen size so everything would adapt automatically ...
1
vote
0answers
150 views

Parenting Opengl with Groups in LibGDX

I am trying to make an object child of a Group, but this object has a draw method that calls opengl to draw in the screen. Its class its this public class OpenGLSquare extends Actor { private ...
3
votes
2answers
778 views

How do I show a minimap in a 3D world?

Got a really typical use-case here. I have large map made up of hexagons and at any given time only a small section of the map is visible. To provide an overview of the complete map, I want to show a ...
4
votes
5answers
11k views

What is the proper way to remove a box2d body from the world in libgdx?

I'm wondering how to remove the body from the world, because I found an error when I tried. I found following error. java: ...
1
vote
1answer
433 views

Removing the circle outline rendered on Box2d CircleShape

How can I remove the outline on the CircleShape below? CircleShape circle = new CircleShape(); circle.setRadius(1f); This is what I'm using to draw: batch.draw(textureRegion, position.x - 1, ...
1
vote
1answer
3k views

How does the rectangle bounds (x,y,width,height) in libgdx work?

I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2 or 3 examples with that are: <!--this is the pause button in the top right ...
4
votes
4answers
815 views

More efficient in range checking

I am going to use a specific example in my question, but overall it is pretty general. I use java and libgdx. I have a ship that moves through space. In space there is debris that the ship can ...
2
votes
3answers
4k views

On screen controller for libgdx games?

Does anyone know a better controller for 2D Games than a virtual on screen joystick? The pros of the joystick are: Easy to implement for developers Familiar interface for users But there is a ...
-3
votes
2answers
811 views

How to create Executable Jar [closed]

When I run a jar file I created, I get the following error, so please someone help me out of this: Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't ...
3
votes
1answer
452 views

Photon alongside LibGDX

Can anyone point me to a possible implementation of the Photon network engine along with LibGDX for Android? Or any multiplayer networking SDK for all that matters. From reading source code it ...
-3
votes
1answer
534 views

Different texture for multiple resolution

How to use different texture(image) for different resolution in libGDX? Also specify how to detect it from asset folder?
3
votes
1answer
3k views

How do I move the camera sideways in Libgdx?

I want to move the camera sideways (strafe). I had the following in mind, but it doesn't look like there are standard methods to achieve this in Libgdx. If I want to move the camera sideways by x, I ...