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

0
votes
0answers
28 views

PolygonRegion creating anr

I'm try create mask for cut texture. User moving finger on the screen and when he will up finger mask will created. My problem in, after user has long time moved on screen and up finger, mask start ...
0
votes
1answer
65 views

How can I adjust the UVs of my quad so my texture isn't flipped?

My sprite geometry is reversed using matrix so that it is in the XZ plane. This results in the image used for the sprite to also be reversed, which I don't want: (source : ...
1
vote
1answer
1k views

LibGDX Drawing sprites when moving orthographic camera

I've been having this problem for a long time and I just can't seem to find the exact problem. I have a game where the map is 480x1600 and my camera has a view of 480x800. I have a button that when ...
0
votes
1answer
234 views

Why does resizing my game window move and distort my rendering?

I'm starting to make a game, and the first screen I've made is a very simple loading screen with some centered text. On starting it up, the text is nicely centered: Then I resize the window, and I ...
0
votes
1answer
135 views

How do you do FlashPunk-style animation in libGDX?

In FlashPunk, you can have multiple animations set, and then choose which one to play at any time, and it'll do it. Example: animatedSprite.add("running", [0, 1, 2, 3], 50); ...
-1
votes
1answer
58 views

Loading TextureAtlases using AssetManager in LibGdx

I want to use AssetManager in LibGDX to load my TextureAtlas. But I am not getting it. I have actually one large 2048 x 2048 px image, that I am creating in Predator. and then I am using the regions. ...
2
votes
1answer
308 views

Recording and playing back sounds with LibGDX

How do I record a sound to PCM format and replay it from there?
0
votes
1answer
156 views

libgdx game process dies on loading texture atlases

I try to load a lot of texture atlases (10) with approximately 5 (~2048x~2048)(not using PoT) .pngs each. I'm using AssetManager and there is no trouble with it on my pc but when I try it on my tablet ...
1
vote
1answer
160 views

libgdx default saving mechanism for box2d world

I want to save my game in libgdx, and I have no problem using Kryo to save everything, except the box2d Worlds and the RayHandlers from box2dlights - these are not Serializable and do not have default ...
2
votes
2answers
386 views

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

Libgdx project port to Html5 using GWT - Assets not being found?

So I have a Libgdx project done, and have been trying to get it to port it to html5 for awhile using GWT. Thing is, none of the application's assets are being found because (I discovered just now), ...
2
votes
1answer
97 views

Collision detection in libgdx

I am currently writing a little zelda like game and have a little bit of a problem with collision detection. It works but the the character stands to far away from the object. Here is my player ...
2
votes
0answers
63 views

LibGDX controllers: how to fix crashes in JRuby?

I'm using JRuby with LibGDX and it's been going quite swimmingly, save for a crash I experience every time I try to use the controllers extension. Here's a basic rundown: I've required all the ...
3
votes
2answers
308 views

2.5d with box2d - approaches from the top and bottom

So, I'm using box2d for my 2.5d game (think double dragon, tmnt arcade, castle crashers) where you can move around on the z-axis (faked as y-axis movement). Basically, I have box2d only doing ...
3
votes
1answer
1k views

Libgdx sprite rotation (image quality)

This one is probably really simple but I didn't find a solution. I'm trying to create a widget (speedometer) with libgdx. For the arrows I'm using the setRotation() function. But when the image is ...
0
votes
1answer
351 views

Top-Down Tilemap Rendering and Collisions in Libgdx

I'm sorry if this question has been previously answered, but I was unable to find an answer here or through google. I'm trying to make a simple roguelike-like that would feature a top-down tile map, a ...
1
vote
1answer
185 views

How is a splash screen that is disposed upon user input meant to be implemented?

I'm going through Gustavo Steigert's tutorials on libgdx, but I have a feeling that this is more of a design question, rather than specifically regarding libgdx. My question is regarding the splash ...
0
votes
0answers
116 views

Cave generation problem in LibGDX

I have been reading this article: http://roguebasin.roguelikedevelopment.org/index.php?title=Basic_directional_dungeon_generation, but I can't understand what I am supposed to do: I don't even know ...
2
votes
1answer
107 views

Using latest TiledMap, how do you get a specific tile from x and y index?

Seems basic enough, but I can't seem to find the answer: I am trying to implement collission detecton and for that I need the properties of the tile the player is currently entering. I am using ...
0
votes
2answers
178 views

How can I make my sprite jump up and move forward at the same time?

I'm trying to make a sprite's movements work. For some reason, he can only jump and then move, or move and then jump, but never at the same time. I'm using InputProcessor and a TiledMap system. ...
1
vote
2answers
502 views

LibGDX with Android UI

Hello I want to combine between android UI and libGDX. I want to have half of my screen with libgdx engine (animated sprite) and the other half of the screen with android UI buttons. Does anybody know ...
7
votes
2answers
291 views

How can I implement a scanline effect?

I am working on an old-school platformer in libgdx and I want it to have a "scanline" effect, like this: My first attempt was to make a little texture and draw it on a full-screen quad. I used two ...
2
votes
1answer
115 views

How to flip 2d skinned quadruped character?

just would like to know is flipping 2d skinned character with one of scale axis good way for left or right movement(flipping direction and animation)? Normal direction would change.(UPDATED) for ...
3
votes
0answers
44 views

Using GLES 2.0 producing a blank screen after the game is quit in LibGDX [closed]

I am making a 2D tile based game in LibGDX. I am using Scene2D Stage in my Screens. I am also using GLES2.0 in my game. When I changed from GL10 to GL20. On pressing the back button, my game is ...
1
vote
3answers
180 views

How do you create your own tileset?

I'd like to create a 2d platformer and I understand that using tiles helps you a lot. I think many use the map editor "Tiled" but I can't find anywhere how do you make your own tileset from a given ...
1
vote
1answer
133 views

LibGDX strange camera behaviour

I'm currently doing my final assessment for my study Game Development. I'm currently facing a real weird (maybe explainable) result from my camera. I just set up my scene with alot of tiles and a ...
3
votes
1answer
158 views

Why is SpriteBatch.end() generating null pointer exception in this code?

I am getting a null pointer exception using libGDX that the debugger points as the SpriteBatch.end() line. I was wondering what would cause this. Here is the offending code block, specifically the ...
2
votes
2answers
129 views

Replicating no. of sprites without letting the app to slow down and crash

Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or ...
1
vote
0answers
388 views

Two pass blur shader using libgdx tile map renderer

I am trying to apply the following technique: blur effect using two pass shader to my libgdx game using the OrthogonalTiledMapRenderer. The idea is to blur the background wich is also a tilemap but ...
2
votes
1answer
183 views

How to crop camera's viewport?

I'm making an Android game using LibGDX. I want to do something hard to explain but I'll try nonetheless. Look at this camera view (it's from 3ds max): I can get same exact view in LibGDX without ...
5
votes
2answers
1k views

How can I post scores to Facebook from a LibGDX Android game?

I am using LibGDX to create an Android game. I am not making the HTML backend of the game. I just want it to be on the Android Google Play store. Is it possible to post the scores to Facebook? And if ...
0
votes
1answer
107 views

When to use class/objects for graphics [closed]

I am fairly new to game development, but I have a good programming background with object oriented programming. But with games, I do not know when I should use an object (or class) for an entity on ...
1
vote
1answer
1k views

how to get width and height of TiledMap in the latest Version of Libgdx

I am making a tiled based game, I want not to let the camera show places, where there is no map... this is a obvious solution I got from a tutorial if(camera.position.x<400){ ...
2
votes
1answer
302 views

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, ...
0
votes
1answer
72 views

Is it possible to display no white images/sprites when using the latest Android OS?

Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
2
votes
1answer
164 views

Universal Tween Engine - simulating time T instantaneously

I have a circuit in Universal Tween Engine in libgdx and I want to make several entities follow this path , each behind the other, like body pieces of a snake. The problem is that I need to find ...
14
votes
2answers
22k views

Where are all the tutorials for libGDX? [closed]

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

Find angle between two points in java [duplicate]

I am making a very simple game and want the hunter to shoot the dragon when the player touches on the screen. I want the arrow to be craeted at hunterPosition.x and hunterPosition.Y and move towards ...
0
votes
0answers
33 views

2D collision beetween a sprite and an array of sprites [duplicate]

I am creating a simple Android jumper (think Doodle Jump or Abduction) using libGDX so I can get started in game programming. My problem is that I need to figure out a way to check for collision ...
5
votes
1answer
191 views

Running multiple box2D world objects on a server

I'm creating a multiplayer game using LibGdx (with Box2d) and Kryonet. Since this is the first time I work on multiplayer games, I read a bit about server - client implementations, and it turns out ...
0
votes
0answers
87 views

Different Spawning Target Pattern on a Music Game App (Prototype)

I'm using Gtomee's audio spectrum decoder tutorials (from sample video or codes at GitHub) to create its own spawning pattern according to what music it played. It worked pretty nicely despite this ...
0
votes
0answers
197 views

How to draw table border in libgdx?

I'm new to libgdx and I'm currently working on TableLayout and wondering how could I draw borders for each cells. I've done some research on this but it seems that I could come up with this solution ...
0
votes
0answers
140 views

Messaging system between components implementation

What are the pros and cons of these two kinds of messaging objects: The first one I make a generic message object with things like an Enum for the type of message, and arrays of ints, floats and ...
0
votes
5answers
1k 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 ...
3
votes
1answer
210 views

Why is my Tiled map distorted when rendered with LibGDX?

I have a Tiled map that looks like this in the editor: But when I load it using an AssetManager (full static source available on GitHub) it appears completely askew. I believe the relevant ...
0
votes
2answers
406 views

RPG Equipped Item System

I'm making a 2d rpg with libgdx and java. I have an Inventory class with an Array of Items, and now I want to be able to equip items onto the player. Would it be more managable to do have every item ...
0
votes
0answers
12 views

time issue in render libgdx [duplicate]

pls. help how to implement this loop in render method next_game_tick and GetTickCount(); always contain same time value. so position never updated @Override public void render() { float deltaTime = ...
0
votes
0answers
14 views

time issue in render libgdx [duplicate]

pls. help how to implement this loop in render method next_game_tick and GetTickCount(); always contain same time value so player position not updated. @Override public void render() { float ...
6
votes
2answers
2k 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
79 views

Libgdx Palette Swap

I'm developing a game using the Libgdx library. I'm trying to implement a very simple palette swap functionality (basically just complete recolouring of some areas, I don't even need to have various ...