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
2answers
75 views
+50

Libgdx swipe detection left and right

I have displayed a image at the center of the screen with libgdx. If i swipe left the image should move left and if i swipe right image should move right. Subsequent swipes to the left should move ...
-1
votes
0answers
34 views

Scene2d not showing actors

I've been trying to do a UI menu with scene2d with this code but for some reason nothing is showing up. eclipse isn't giving me errors and the window is the size that I've set up, but none of the ...
0
votes
1answer
43 views

Using compressed(ETC1) textures in LibGDX

I use standard android tool for compressing PNG texture and archiving it with gzip: /android-sdks/tools/etc1tool texture.png --encodeNoHeader gzip texture.pkm Then I try to load it: FileHandle ...
4
votes
4answers
139 views

Making a Box2D ball bounce to constant height

I want to create a game like Doodle Jump. I'm using libgdx and Box2d. I needadvice on how to make my ball bounce constantly and with the same height. I've tried setting the ball's body restitution ...
-2
votes
0answers
73 views

Setting Coordinates to spawn Enemies [closed]

i'm making a game for android with libgdx and I created a BloonFactory class (the enemies are bloons :P) The problem is that i have a shooter in the middle of the screen and I don't want to spawn ...
-4
votes
0answers
56 views

Overriding Image.draw() [closed]

Im trying to override Image.draw() in my class Foo extending Image public void draw(SpriteBatch batch, float parentAlpha) { super.draw(batch, parentAlpha); ShapeRenderer shapeRenderer = ...
1
vote
1answer
92 views

When to use ShapeRenderer & SpriteBatch in libGdx?

As a beginner(in GdxLib+Android), i found that for rendering particular screen, we can render that using both ways then when to use specific ones? & What is the best option for Updating the ...
0
votes
1answer
50 views

Eclipse/LibGDXgame doesn't load textures [closed]

Our LibGDX project doesn't load textures after building on PC/Android but when it's built from Eclipse using Ctrl + F11 (Run/Debug) everything is fine. What could be causing that?
2
votes
1answer
91 views

ShapeRenderer efficiency on games

I want to draw a rectangle box to use as a text background for a visual novel library I'm writing, I wanted some flexibility of color and transparency and the ShapeRenderer class seems to fit the need ...
2
votes
1answer
110 views

Not repeating background in platformer [closed]

I need to make not repeating background for platformer. I can't find any description of implementation and I developed algorithm but I'm not sure that it's right. I can't load one big texture per ...
1
vote
2answers
82 views

What to use as a Box2D renderer in a release version?

I'm creating a game with libgdx. For testing physics I use a Box2DDebugRenderer, which is not fast. When I want to release my full game, what should I use as a renderer?
1
vote
2answers
58 views

Render rotated rectangle inside other rectangle bounds using Libgdx

I have this code to generate a red rectangle inside a grey rectangle: new Rectangle(grey_rectangle_position_x, Game.SCREEN_HEIGHT/2-Rectangle.height/2,0); This code makes the following: Now, I ...
0
votes
1answer
67 views

Ligdx Box2d : convert box2d coordinates into screen coordinates

I'm new in libgdx and i have a little problem. I created a body in box2d and i want to assign it a sprite; for that i need to get the position of the body,then insert into the main loop the updated ...
0
votes
1answer
51 views

Devices or Smartphones That Can Run and Displayed Images Properly While Power of 2 Code is Disabled

Before making game apps, I want to have any certain smartphone device brands that runs on OpenGL. I have to make a code for images that doesn't need to required power of 2 images so that I can resize ...
0
votes
0answers
37 views

Black Screen on pressing back button in libgdx

In my game when i touch on advertisements and press back button to return on game the i am getting a black screen. I referred this link http://badlogicgames.com/forum/viewtopic.php?f=11&t=7673 I ...
-1
votes
1answer
69 views

creating popup like window in android using libgdx [closed]

I am developing a game in which i want to open a popup window having some buttons and upon selection of the button i want to close the popup window and do some specific task in original screen.how do ...
0
votes
0answers
126 views

Libgdx Particle Editor: Blank UI elements

How can I get Libgdx Particle Editor to run properly on my 32-bit Windows 7 machine? When I run it, the UI elements are blank like this:
0
votes
1answer
108 views

Coordinates different between Tiled editor and my game

So I have been using Tiled map editor to create my map for my game. I'm using Libgdx to load and draw the map. The problem is that the coordinate from objects placed in tiled do not seem to be the ...
0
votes
0answers
94 views

Set sprite on box2d body [closed]

I don't understand how to do this... I have seen some tutorials about it, but it was not helpful for me... Thanks in advance! Here is my code: public class Level_1 implements Screen { Untitled ...
1
vote
1answer
114 views

Terrain detection on racing game

Hi I don't speak English very well so ill try to do my best :P I'm doing my first top-down racing game for LibGDX, now I need to create tracks, the tracks aren't very large, I prefer doing this with ...
3
votes
1answer
78 views

Fill texture with white color

How to paint texture with white color? Example what I mean: SpriteBatch.setColor changes tint only.
0
votes
0answers
97 views

Fling and Spin an Object with Touch

For making a bottle to spin, I focused first on the touch dragging via input processor interface. It's a bit unresponsive since when I rotate clockwise or counter-clockwise as long as my finger ...
1
vote
0answers
43 views

Another Question from the Image Efficiency for Memory Handling

At this topic, "Which image format is more memory-efficient: PNG, JPEG, or GIF?", one of the fellow Game Development community @Panda Pajama told about the complex concept about image memory handling ...
0
votes
1answer
145 views

Can I develop libgdx game with C#?

I see some articles through Google that I can use libgdx in C#. Is it true? I found no official and unonfficial about this. If there is a way, please tell me how. Thank you
-2
votes
1answer
59 views

Music and SFX Question on Memory Efficiency [closed]

What should I recommend: MP3 or WAV for the SFX? Also, what should I do to handle the memory in music or SFX?
37
votes
6answers
3k views

Which image format is more memory-efficient: PNG, JPEG, or GIF?

Which image format is more efficient to save memory? PNG, JPEG, or GIF?
1
vote
1answer
149 views

Repeat texture in a scrolling game

The bottom region of the screen is filled by a repeated texture: grassTexture = new Texture(Gdx.files.internal("images/grass.png")); grassTexture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat); ...
8
votes
2answers
226 views

How well do functional languages perform on Android?

This is a special case of this question that I feel is particularly pertinent. I'm working on a game for Android, and I'm planning on using Scala with libgdx. I'm planning on making a performant ...
0
votes
0answers
237 views

Limited Screen Switching Count Memory Issue

When making my simple app for revisions to update the latest changes, I test it first between the device (Google Nexus 7) and desktop using Eclipse IDE. I made eleven screens for the game in terms of ...
3
votes
1answer
174 views

Getting Bodies to go “Super Fast” in Box2D

I am making a breakout game in Android using the LibGDX version of Box2D. I have a ball that I am applying a force to with the following code... getBody().applyForceToCenter(-10000000000.0f, ...
0
votes
0answers
86 views

Android LibGDX Pixmap issue

I'm developing a game for Android using libGDX. I implemented "spotlight effect" for highlighting some scene elements in tutorial levels. I did use Pixmap class for implementing this. So I did ...
0
votes
0answers
174 views

Dynamic 2D (1D) map generation in libgdx

I'm currently brainstorming a game idea and I have stuck in one place. I'd like to dynamically generate endless map which looks pretty much like the one in game Hill Climb Racing (Android) or like ...
0
votes
0answers
134 views

LibGDX Touch Box2D Body

I am using LibGDX, however, instead of using the stage, actors, etc, I wanted to use straight Box2D that way I could port it easily (to iPhone) later. I have the character moving with the ...
2
votes
0answers
147 views

how to get touch event on a body in Box2d(Java)

I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition ...
1
vote
1answer
482 views

Creating live wallpaper on Android with libgdx

I try to create live wallpaper with libgdx framework. Here's my source code: repository When I run this, black screen with name of the app appears (probably empty android layout). Main game is not ...
15
votes
2answers
695 views

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 ...
1
vote
1answer
76 views

Keeping Track of Position OpenGL

I have a sphere in my 3D world located at the origin. I have models orbiting it and I need to keep track of each models' position (x, y, x coordinates) as well as update their bounding boxes for ...
2
votes
1answer
153 views

How to fire a touch event only for the touched sprite?

I have a set of sprites, each one implementing InputProcessor, and registered to an InputMultiplexer, when a sprite is touched, everyone fires the touchDown event. Ok, so I can get the touch ...
0
votes
1answer
103 views

Changing the texture in a Sprite

I'm a bit new to libGDX. My problem is ,in my code, only if I set the texture in the constructor of the Sprite instance, it will draw anything. My question is shouldn't it be working when I only call ...
0
votes
1answer
428 views

Draw a line using libgdx ShapeRenderer() [closed]

Need to Draw 3x3 line for tic tac toe, i started implementation but i stuck here package com.me.mygdxgame; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import ...
5
votes
3answers
187 views

Libgdx optimization of big arrays

I am working on a game using libgdx and I have the following code that I want to optimize. Array<Bullet> enemyBullets = Enemy2.getEnemyBullets(); for (Bullet bullet : enemyBullets) { ...
1
vote
2answers
91 views

Tween Animation Cannot Start

Do you have any reasons why my tween code didn't run or work? I already add the tween engine onto the library folder under LibGDX project folder and "Order and Export" it under Java Build Path at the ...
1
vote
1answer
102 views

Help on TileMapRenderer

In my project, I'm trying to render a map using TileMapRenderer. But it doesn't show anything when I render it. But when I use some other files from a tutorial they are rendered correctly. When ...
2
votes
2answers
77 views

Bitmap Font Displays in Center Always Without Coding it Manually (Fix Coordinate Problem onText)

Is there a way on how to stay the texts in center without manually coding it or something, especially when making an update? I'm making a display for the highest score. Let's say that the score is 9. ...
1
vote
2answers
186 views

Quaternion Camera

Can someone help me figure out how to use a Quaternion with the PerspectiveCamera in libGDX or in general? I am trying to rotate my camera around a sphere that is being drawn at (0,0,0). I am not sure ...
0
votes
0answers
127 views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
0
votes
1answer
157 views

Gesture Detector not firing

So I'm trying to create a input class that implements a InputHandler & GestureListener in order to support both Android & Desktop. The problem is that not all the methods are being called ...
1
vote
1answer
110 views

Using Quaternion in libGDX

Can someone give me an explanation about how to use the Quaternion class in libGDX to move my camera around a sphere or just set it up, manipulate it, and apply it general? I am trying to acheive ...
2
votes
0answers
112 views

Error in destroying object in Box2D/LibGDX

I'm trying to delete an object when a collision happens. I have put the following code in the render method of the object so it would be outside of the physics calculations. public void ...
1
vote
1answer
186 views

Moving sprites on a graph in libGDX

In my game I'd like to move sprites on a fixed path. Until this point I was trying to stick with the tools already provided by libGDX, like the Tiled map renderer classes so I'm looking for a solution ...

1 2 3 4