Quantcast
Channel: Question and Answer » libgdx
Browsing all 434 articles
Browse latest View live

How to draw multiple large background images using libgdx?

I have developed a basic lunar lander-style game using Slick2D and dyn4j and am now redeveloping it using libgx for various reasons. I am having problems drawing the background (i.e. everything, but...

View Article


Java, Crashing with a Shader on Intel HD Graphics

I just got a new computer (Acer Aspire ES1-311) which has an integrated Intel HD Graphics card, and I noticed that this fisheye shader crashes my game (LibGDX game, VM Crash): varying vec2 v_texCoords;...

View Article


Image may be NSFW.
Clik here to view.

Box2D Lights – Simulate water

I have a libGDX project, in which I have a Box2D world, which is currently filled with some boxes as a terrain. I also added a DirectionalLight to the scene for simulating the Sun. I almost have the...

View Article

Are shaders the only way to implement 2d lighting?

I’m working on a 2d top down game with libgdx and I think i got the basics. No want I want to implement lighting, I don’t know anything about lighting. I want just to have some light sources and...

View Article

Dealing with multiple 2d sprite animations for the same object

I am using libGDX for a 2d game. Some of my in-game objects have animations, for example a soldier in top-down view that has a walking animation. That is working fine. Now, while walking, this soldier...

View Article


How to properly import a .tmx file with the image used to create it?

I tried to create some maps with tield map, and the image I use to create this map(tielset texture) is stored in the desktop. But after the map generation, I copied the file (map.tmx) and (texture.png)...

View Article

invisible actor at group (libgdx)

I add to HorizontalGroup several actors: 1, 2, 3. I want to set invisible 2nd actor, and it doesn’t take any space (seems in Android View.GONE –...

View Article

for android platform , libgdx vs unity 3d [on hold]

i am android programmer and i like to code with Java , not JavaScript my question is very easy . i just like to choose between Libgdx and Unity , please help me . please compare Libgdx and Unity , such...

View Article


Connect lightsource with object in Libgdx

I want to make an minimalistic highway chase game in LibGDX, but I have a question. Can I attach a source light to an object so gravity will affect the source light, by pulling it down? One solution...

View Article


Image may be NSFW.
Clik here to view.

Grayscale color mode texture not rendering in libGDX

I am about to develop a game completely in shades of grey using libGDX and just for testing purposes, i created two textures in photoshop: 2048 x 2048 plain white png image with RGB color mode of size...

View Article

How do I derive an appropriate acceleration value for my game?

I am creating a Flappy Bird clone from this tutorial. I have a question about acceleration in libgdx. The author assigned the bird a constant acceleration vector in the constructor of the bird...

View Article

LibGdx Scalling sprites on Android

I have a sprite that is a few buttons but need them in the center of the screen for all android devices. I tried setting it’s location to the center of the screen by dividing the orthogonal camera by...

View Article

Box2D pixel to meter conversion

I have a game that was written in pixels and now I want to change it to meters like(box2D do). How I need to do that. I have wached a lot of tutorials and all they have some SCALING FACTOR but when I...

View Article


Lag when drawing single Texture multiple times in libGDX [closed]

I am building a game where you are basically drawing little dots on the screen with the help of the accelerometer. I am using a single instance of an Actor where I store the coordinates that needs to...

View Article

Image may be NSFW.
Clik here to view.

How can I check if a player-drawn line follows a path?

I want to draw an invisible path that the user must follow. I’ve stored that path as points. When a player draws a line, how can I test if it follows the path I’ve stored? Here’s an example for tracing...

View Article


Implimenting BADLAND like Body Movement in Box2d

I am trying to make a body (character in my game) move and behave in the same way as the character in the BADLAND Game with regards to rotation. The character does not have fixed rotation and behaves...

View Article

Valid instances not drawn [closed]

i have a problem with my code, my valid instances aren’t drawn. I’m just at the beginning so i will post the whole code(which sounds bigger than it is)..just a few lines public class MyGame implements...

View Article


Image may be NSFW.
Clik here to view.

libGDX's 2D particle editor launching incorrectly

What’s going on? Here’s my process: I first right-click the referenced library for gdx-tools.jar in Eclipse: I then search for the particle-editor class: It opens successfully, but half of the buttons...

View Article

LibGDX , Scale button with animation when it is pressed

I am developing game using LibGDX . I want to create beautiful menu and to scale buttons when they are pressed but not in this way , when it is pressed scale it 1.5f , I want to scale it with animation...

View Article

LibGDX ImageButton not scaling properly on table?

I’m facing the same problem like in this link: question and I think the problem is in the skin passed in a table like this skin = new Skin(); skin.add("pausebuttonup", AssetLoader.pauseButtonUp);...

View Article
Browsing all 434 articles
Browse latest View live