0
votes
0answers
24 views

Collision in Tiled Map - LibGDX

I have collision code that deals with left or right or top or bottom. I am using Tiled Map with LibGDX. Question is: How do I detect collision with other cells by all 4 sides, and not specifically ...
0
votes
0answers
50 views

Simple Libgdx bullet example

I'm looking for a SIMPLE example of the use of the bullet physics engine in libgdx. Before you point me at the wiki, I have read that, but that mostly describes installation, and just a "raw" ...
0
votes
1answer
40 views

How do I combine two textures / texture regions / images into a single entity using libgdx?

I've googled this but can't seem to find anything on "concatenating" two images, especially using libgdx. Any ideas? (pointers, algorithm suggestions, etc are highly appreciated) Thanks.
0
votes
0answers
20 views

Incorrect click event when resize on libGdx

I want to use scene2D, in libGDX, to detect click on object. I have this simple Game sample : Stage stage; @Override public void create() { this.stage = new Stage(1280, 720, true); ...
0
votes
0answers
17 views

GWT problem with Box2D WheelJoint

I am using the below libgdx java code for a wheel joint and rear axle using Box2D. This works fine for android, Desktop, but when I attempt to run through GWT I get the following error. at ...
3
votes
1answer
65 views

LibGDX How to take screenshot and use as background for pause screen

So I am trying to take a screenshot of the current situation during the PlayState of the game and when the player pauses the game I want the game to take a "screenshot" save it in memory and not as a ...
0
votes
1answer
30 views

Libgdx stage rendering issues

I'm using scene2d for the first time, and I can't get anything to draw EXCEPT the stage ui. Say I have my ui on top of my game screen: uiStage.act(): batch.begin(); gameSprite.draw(batch); //does not ...
2
votes
1answer
50 views

How do I split a texture into differently shaped pieces with libgdx?

I want to split a texture into variously shaped pieces with libgdx, like the pieces of a puzzle game. TextureRegion.split() is not an option, as it splits into equally sized rectangular texture ...
0
votes
1answer
37 views

How to keep track of previous scenes and return to them in libgdx

I have three scenes: SceneTitle, SceneMenu, SceneLoad. (The difference between the title scene and the menu scene is that the title scene is what you see when you first turn on the game, and the menu ...
0
votes
1answer
56 views

What is the approach of creating an image puzzle game with libgdx

I would like to create a game which consists of taking a random image, slicing it up into some number of pieces (according to a selected difficulty) and letting the player solve the puzzle. I've ...
0
votes
0answers
21 views

How to use the zoom gesture in libgdx?

I found the example code for the GestureListener class, but I don't understand the zoom method: private float initialScale = 1; public boolean zoom (float originalDistance, float currentDistance) { ...
1
vote
1answer
52 views

How to poll input for a gui in libgdx?

Ok, so my question is simple. How do you poll input with a GUI class without it affecting what's underneath the GUI? So suppose you have an RPG game with a gui for the d-pad and other controls: ...
0
votes
1answer
57 views

libgdx: Rotate sprite on 3d plane

Im trying to create a game on a 3d plane but with 2d objects. I have a perspective camera and the ground plane drawn. I can't seem to get sprites onto it. I am trying to render the sprites, then to ...
0
votes
1answer
65 views

How to clear out a drawn texture from the screen in libGDX

I am trying to clear out the drawn texture from the screen. Lets take a classic game example - in many games when the character goes through the coins the coins clears out from the screen and ...
0
votes
0answers
66 views

LibGDX vs Flash/Starling

I currently use Flash/Starling to develop cross platorm games. I love it because it has awesome features like tweens, texture atlases, DragonBones, touch gestures, ad integration, in app purchase ...
0
votes
0answers
27 views

Box2dLights rendering in bigger scale

So basically my box2dLights are rendering in wreid places. The circle in center is my player and as you can see lamp which should be aligned to player is in the right-top corner. my code: package ...
-1
votes
0answers
38 views

infinite parallax libgdx

I need help with my Parallax Libgdx, he manages to make the scroll, but not getting any way to repeat it infinite. public void render() { ParallaxLayer layer2 = null; float a = 0; ...
0
votes
0answers
16 views

Artificial physics : ball angle bouncing (Vector2) [duplicate]

My question is : how can I manage to move my object (ball) on a trajectory , and onContact with another object, it bounces, respecting the angle
2
votes
2answers
112 views

How to draw a rectangle or curve between two co-ordinates in libGDX

I am new to libGDX.I just want a Rectangle or a small curve drawn between the object and the clicked position .I know libGDX has RECTANGLE class. I just want to draw a rectangle or a curved line to ...
1
vote
1answer
41 views

How to match user click and the sprite object position in libGDX framework

I am using libGDX Java framework for developing a practice game in Eclipse. My game is in landscape mode and I am using sprite image for game assets. Actually I am trying to follow the Kilobolt ...
1
vote
1answer
95 views

Best mobile games resolution ratio

What is the best landscape and portrait resolution ratios that will fit the most of the devices out there and the black bars size will be minimum?
0
votes
0answers
32 views

libgdx get rotated sprite coords points

I would like to get the position of each edge of a sprite when he has been rotated. I have no idea how to do it, I made a image to explain it. I would like to get the X and Y position of each Red ...
-1
votes
0answers
31 views

Map in Scene2d/LigGdx

I'm a little lost for my game. For the moment I've a car, who work, but now I want to create a map (like hill Climb Racing for example, not necesserly randomly generated). I don't know how to do ...
0
votes
1answer
59 views

How to blend bullet sprite from white to yellow in libgdx

Does anyone have a clue that will make my bullet sprite fade from yellow to white? As the bullet is created it will be white but when it trails on it will turn yellow. Any ideas how? Is it a simple ...
1
vote
0answers
47 views

Astar optimalization (A*) [closed]

So I have written own implementation of AStar (A*) algorithm to find paths around my 2d tile based map. My problem is that if I call it each frame (I need to do it) and I'm searching path from corner ...
2
votes
1answer
253 views

Maintaining velocity of free fall body using Box2D in libGDX

I want to maintain the speed of a free-falling Box2D body using LibGDX. I'd like the vertical velocity increase with the level. I've applied a linear impulse and velocity actually increases like this: ...
1
vote
2answers
37 views

(LibGDX) Changing Origin of Box2D World relative to TiledMap (or Vice Versa)

I'm playing around with Box2D and TiledMaps and I've come across this minor annoyance. As you can see, both Box2D and TiledMap render at the center of the screen. This forces me to compensate by ...
1
vote
2answers
65 views

How do I inline images between text in a Table?

I have a Table and a Label with wrapped text. I want to display some images in-line with the text. For example: This is an image -IMAGE_HERE-, and now some more text showing, yet, another image ...
1
vote
1answer
91 views

Game Update in Libgdx

In libgdx, the game loop is the render() method. But why is that, and is there a way where I can make an update() method that is called 60 times a second? As in the update() method, I would add the ...
0
votes
2answers
62 views

Artillery Simulation [duplicate]

I need some help on a simulation of an Artillery like this one https://www.youtube.com/watch?v=YktWSKo_UbA. I cant figure out how to make the "tomato" to get to the selected spot. Where can I get ...
0
votes
1answer
114 views

Top-down player collision with walls

I am having trouble trying to think of how I am going to approach collisions in my game. My idea which sucked in the beginning because it would reduce performance dramatically has failed which was ...
1
vote
0answers
144 views

How do I implement a “sliding out of / into” effect on a settings menu similar to that in Angry Birds?

I'm trying to implement a settings menu component similar to that in Angry Birds - a button control that makes an options menu slide out of it and back into it when clicked on. I use scene2d.ui to ...
0
votes
1answer
93 views

Should I use tiles in a snake game? [closed]

I'm building a simple snake game, which is my first game ever. I'm using LibGDX, which is Java-based. I've looked at the Tiled Map Editor, but I don't know if it is necessary in a simple game like ...
0
votes
2answers
123 views

Efficient way to check collision with potentially hundreds of objects [duplicate]

I am trying to make a top down shooter that could potentially have hundreds of objects at once at one point. I need to check collision with projectiles, walls, and enemies. I am currently using ...
0
votes
1answer
24 views

Actors (Label) not being drawn to stage [closed]

I have a weird issue that when I try to draw a Stage with only an Actor, a Label to be more precise, added to it and nothing seems to be getting drawn. This is how my setup goes: I have a Sprite ...
1
vote
2answers
199 views

libgdx - collision detection with tiled map java

currently, I am working on a 2d rpg game which is similar to final fantasy 1-4. I can load up a tiled map and the sprite can walk freely on the map. However, I will like to create a wall for it to ...
1
vote
1answer
87 views

Change game from portrait to landscape dynamically

I have multiple classes that implement Screen. I want to, say, have the Main Menu screen portrait, then the Play Screen landscape. Is there anyway of changing the orientation dynamically? I thought ...
2
votes
1answer
56 views

Libgdx Get Font Height with a Wrap

is possible to get the 'Height' of a font drawed with the drawWrapped methods (with a wrapWidth) ? getMultiLineBounds only works when \n is used, but when drawing with drawWrapped it doesn't give the ...
1
vote
1answer
77 views

How to make platforms spawn without touching other platforms

So I am making a doodle jump like game where there are platforms scrolling by but right now how I have platforms spawning is completely random. I would like the platforms to be spread apart so they ...
-1
votes
1answer
42 views

Stop diagonal selection in my Match-3 game [duplicate]

I have a matching game where the user drags their finger over items to select them. The problem is, i only want the user to be able to select items by dragging vertically or horizontally, not ...
0
votes
1answer
46 views

One InputProcessor for two controllers

On my screen I want to display two controllers, one to turn around the character (We'll call itLook) and one to move the character (We'll call it Move). I have a line registering a ControllerListener ...
2
votes
2answers
137 views

How do I create a horizontally centered “gravity line”?

Here's my ideal scenario: A game object (in blue) can change its horizontal velocity, but it will be pulled back by gravity (dotted gray arrows) toward a central vertical line (in red). How can I ...
0
votes
0answers
45 views

Sound Effect Delay occurs when game is deployed with GWT backend?

I've been posting my games on to my personal website recently and I noticed a slight hiccups with the LibGDX games I've made. Within the first few seconds following the loading of the game, there is a ...
2
votes
1answer
142 views

Libgdx - Collision position - Box2D

I'm actually developping my own game but i'm facing a little problem. I trying to figured out how to get the position of a fixture (collision) between two entities. For example this : ...
0
votes
1answer
286 views

How to update libgdx scene2d Label text dynamically?

I display a BitmapFont on the screen, update its text and the font is updated dynamically on the screen as well. I seem to fail to do the same with a scene2d Label added as actor to a Stage. The ...
2
votes
1answer
133 views

How to have the game world get rendered on just a part of the screen?

I am implementing a game on both Desktop and Android. The Desktop version will just rely on the keyboard to handle the user input on the game screen, whilst the Android one will have to have a set ...
4
votes
1answer
237 views

unable to launch LibGDX Particle Editor.jnlp

I am not able to launch LibGDX ParticleEditor.jnlp file on my system(win7 64 bit) with java7. when I execute this file with javaws.exe in jre7/bin folder, it displays splash screen of badlogic games ...
0
votes
0answers
24 views

Make QueryAABB touch in the center of a body to respond

I am allowing the user to drag their fingers to select bodies. The bodies are then added to a array list to be removed later. The problem is, i would like the users finger to have to cross the middle ...
0
votes
2answers
83 views

How do I show a Quit button on Desktop but don't show it on Android with libgdx?

So I would like to display a Quit button on the Desktop main menu screen, but I wouldn't want to have it on Android too. What is the correct approach to achieve this? Do I have to check the ...
0
votes
0answers
57 views

Adding Sprite in 3d scene?

I want to add sprite in 3d, with object load with .g3db, I read some of topics here how can I use, but there is problem batch.begin(); Gdx.gl.glEnable(GL10.GL_BLEND); ...