LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and your WebGL enabled browser.
1
vote
0answers
9 views
Java Libgdx Attaching Sprite to Box2D Body
So I am working on programming a java 2D platformer for fun on the side and I have a rendered TMX level and a box2d body (just a circle shape) that I am currently using as my player. All the controls ...
0
votes
0answers
9 views
libGDX pooling problem
I have a problem with pooling and I don't know how to fix it. This algortithm works when I create a vector every frame. Here is my code:
/**
* Calculates the active Chunks around the player and ...
-1
votes
0answers
20 views
Entity Component System input and events [on hold]
So I have been attempting to use an Entity component system (specifically Ashley with Libgdx) to make a simple tile based '2.5d' game (zelda style).
I think I understand the pattern pretty well, but ...
0
votes
2answers
33 views
LibGDX - Trying to make a radar-like display
i have an interesting question about geometry.
I have two or more moving objects outside of my stage's viewport (blue and red circle in the image below), which i want to point at with two arrows on ...
0
votes
0answers
15 views
LibGDX - black bars, FitViewport and drawing background
actually I'm creating game in LibGDX and i have few problems. I'm trying to solve resolution and aspect ratio problem by using FitViewport but i want to dispose black bars which occur when resolution ...
0
votes
1answer
33 views
libgdx - Math for wall collision when adding velocity
I've created a game which spawns a random colored ball in the top or bottom of the screen and moves to random direction with this method.
private Vector2 position;
private Vector2 velocity;
private ...
0
votes
0answers
19 views
How can I simulate a basketball throw in LibGdx box2d?
So I want to simulate a similar throw like in the game Bouncy Basketball.
Do i need to create a body and attach another body on it that would be the arm and then how would I apply force/impulse to the ...
0
votes
0answers
25 views
libGDX text doesn't appear in TextField
A game I'm working on has libgdx's TextField. They work fine in every instance I've used them, however on a play tester's phone he says no typed text appears in the box until enter or space is ...
0
votes
1answer
19 views
I can't center my actors with ExtendViewport, Libgdx
I'm making a level select screen and I need use ExtendViewPort (I can't use Fit for other reasons), but this viewport moves my actors to the left, I need center them. I put X and Y position ...
0
votes
1answer
30 views
What does the TextureRegion.flip() method do?
I'm learning libgdx and don't understand the purpose of parameters passed to flip(boolean x, boolean y). For example, I have code like this:
texture = new ...
1
vote
1answer
38 views
libgdx - Texture not appearing sometimes
When I run the App the Ball moves sometimes downwards, but sometimes its not moving. I dont change anything on script.
What I want is the ball should come from top outside of the screen, but when its ...
0
votes
1answer
58 views
Reskinning assets on-the-fly with LibGDX TextureAtlas
I'm building a game for Android using LibGDX and I'm attempting to add in a skin feature so players can change the look of the game on-the-fly. I've packed the skinnable assets into their own .pack ...
0
votes
0answers
13 views
Scene2D set table cell size in percentage of tables ´s size
Is it somehow possible to set Scene2D table cell´s size in percentage of the table?
I would like to have orientation independent menu, with buttons filling let´s say 75% percent of the screen, and ...
0
votes
0answers
47 views
Box2D Physics Crazy
I have a simple Box2D Game with a dynamic player, a static floor, and a matrix of gems.
The problem is that the physics engine goes crazy. You can see in this video:
https://youtu.be/iaH_ex8eVVk
...
1
vote
1answer
26 views
How to rotate an image on touch using RotateToAction in libGDX?
I want to rotate my image on touch but it never applies action, I'm using RotateToAction to achieve this.
class actorCark extends Actor
{
Texture texture;
Sprite sprite;
Global g;
...
0
votes
1answer
31 views
What type of networking system should I use With LibGDX on Android?
I've been looking for a good way to implement multiplayer in an Android strategy game I'm working on, using LibGDX.
What I found:
The embedded LibGDX networking system
Kryonet
Google Play Services ...
1
vote
1answer
28 views
Libgdx, actor touchlistener not working
public class Main extends ApplicationAdapter {
SpriteBatch batch;
OrthographicCamera camera;
Stage stage;
Image greyback;
Image circle;
private float width;
private float height;
@Override
...
0
votes
1answer
20 views
LibGDX: Transition scale bitmap font
I'm trying to create a Minecraft like quotes on the menu screen of my game.
I'm using BitmapFont to draw the text on screen but i don't know how to make that scale up scale down effect.
This is what ...
0
votes
2answers
25 views
Sprite not drawn on the same position as its Body LibGDX after implementing Pixels Per Meter Division on Box2D
I had a problem where the sprite was not positioned on Body correctly which I solved and you can see it here:
Box2D is not positioned on the sprite correctly LibGDX
After I solved that, I needed to ...
2
votes
3answers
113 views
Accelerated movement in a specific time to a specific point
I am trying to move my sprite in a specific time to a specific position while using frame-independent or time-dependent movement. My sprite is also accelerated every frame to simulate gravity. I know ...
1
vote
1answer
43 views
How to handle two players playing on one keyboard with Box2D (LibGDX)?
I'm making a racing game with LibGDX and Box2D. I've been using this tutorial to implement the basic physics, and it works properly.
My main problem is to implement two different sets of keys ...
0
votes
2answers
43 views
Box2D is not positioned on the sprite correctly LibGDX
I have a strange issue where my Box2D is not being positioned on the player correctly. Down is the picture:
What I find more strange is that the Box2D is positioned correctly on the cloud that is ...
0
votes
2answers
81 views
Why is my character passing through in Box2D?
I have a collision problem in Box2D.
I am trying to do a simple platform game with Libgdx, Box2D and TiledMap.
I have a map made with TiledMap:
I load the map in my Android game. I read all the ...
0
votes
1answer
32 views
LibGDX--constant high score in top corner
I'm currently programming a game using LibGDX and box2D. I have a sprite (player) that moves up the screen, kind of like doodle jump.
I'd like to have my camera to be centered around the player at ...
1
vote
1answer
27 views
Box2D fixed timestep updating is twitchy on constant FPS
I'm messing around with libgdx and box2d and I'm trying to implement sidescroller movement with fixed timestep logic according to the famous Fix Your Timestep! tutorial/guide. However, logic updating ...
2
votes
2answers
101 views
Box2DLights in libGDX - Bad quality of the light gradient on Android
I am facing a problem while porting one of my libGDX project from desktop to Android : My game uses Box2DLights. While the light effect look very fancy on the desktop version of the game, it looks ...
1
vote
0answers
46 views
LibGDX How do I create a Shop?
My game is fully working but now I want to make a shop so that the player can buy boosts or other useful stuff for the money the player has collected.
What is the best way of doing this kind of ...
0
votes
1answer
23 views
LibGDX - Bundling Files
I have 3 files. A JSON file, a PNG file, and a TXT file. Is there any possible way I can put all three inside a common file with a custom extension? (for example "fileName.abc")
I searched the web a ...
1
vote
0answers
74 views
Libgdx and gdx-ai: How to implement wander behavior?
So I follow the original gdx-ai documentation and created 2 circles to test Steering behavior.
The image shows arrival behaviour but I am still quite lost about how they work.
Screen class:
public ...
-2
votes
1answer
23 views
What is the purpose of the second parameter to Array.removeValue in libgdx?
I have been wondering what the second parameter of the method in Array removeValue does.
removeValue(T value, boolean identity)
What does indentify mean and should I pass true or false?
0
votes
0answers
11 views
DragAndDrop release with pointer on payload
When I am moving my payload all the way to the corner it remains on the stage and my mouse goes over it when I then release (on a valid target) it returns null as a target and thus does not drop ...
1
vote
0answers
18 views
Behvior of Ninepatch when smaller then unstrechable area?
I create a healthbar from a Ninepatch background and "fill" texture. However, it starts overlapping it's patches when it gets very small.
Is there anything I can do about this? Is there a way to ...
0
votes
0answers
40 views
How can I make an Actor repeat the action on collision in LibGdx?
I want my EnemyActor to do this SequenceAction when it collides with my bullets.
I have already done the collision. Now the problem is that it only does the SequenceAction once when it gets collided ...
0
votes
0answers
27 views
Move player with platform libgdx
I'm learning libgdx and I'm having a problems with moving platforms. I have a bridge class with float values for move_amplitude(distance the bridge moves) and move_time(duration it takes). The bridges ...
1
vote
1answer
31 views
How to get the position in an actor inside a table with LIBGDX?
Well the title says it all, I want to get the position of an actor inside a table
Button button = new Button(bs);
table.add(button).width(50).height(50);
table.top().center();
By using
...
0
votes
1answer
42 views
Game Server Mechanic [closed]
Hey guys :) Im currently developing a little rpg duengon crawler.
I really want to implement a local and an online multiplayer function, i know how servers are working and how to make them using ...
0
votes
1answer
75 views
TiledMap problem in android device (LIBGDX)
I'm a noob on programming java apps, and I'm trying to make a very simple platformer game.
All is running very well on desktop project, but, when I put the game on my Xperia a "strage" thing ...
0
votes
1answer
23 views
Libgdx + Box2d working with 2 cameras
Recently I have read that you can work with 2 cameras whenever you involve Box2d, which only works in meters.
In my Renderer class, I receive all the entities in the game and then draw them. I work ...
0
votes
1answer
24 views
LibGDX - Getting Tile Map Layers Problem
While following a tutorial with LibGDX, I am working with tile maps.
This is the method that I'm using:
tilemap.getLayers().get("Collision Layer");
or
tilemap.getLayers().get(1); //1 is the ...
1
vote
1answer
57 views
Libgdx, TiledMap, and tearing
My TiledMap tears when the window is specific sizes, resized, or the camera moves.
The tileset is padded by 2px and have tried as high as 10px. Each tile is 70x70.
Here are the pack.json ...
0
votes
1answer
46 views
How could I draw text in an 'info bubble' with libgdx?
I am making an android game using libgdx where there are textures on the screen which represent people. When you touch a person sprite I want a little info bubble to pop above their head displaying ...
0
votes
1answer
68 views
How can I make an actor fire a bullet on touch?
I created a Jet and a Bullet, and when Jet is touched, the Bullet is fired.
Now I want to know how can I make the Jet fire again when touched after it has fired the first shot?
public class ...
0
votes
0answers
32 views
LibGDX - Player Movement Flickers
So, I was programming a very simple LibGDX game, so I decided to include a player class into the program. Once I did that, the players image started to flicker/stutter while I moved it.
Here's the ...
0
votes
1answer
44 views
libgdx sphere rotation after movement
I'm moving my sphere on the screen using this method:
Matrix4 m = myBall.body.getCenterOfMassTransform();
Vector3 translation = new Vector3();
m.getTranslation(translation);
float multiplier = delta ...
0
votes
0answers
47 views
Implementing BaseGameUtils with LibGDX for Google Game Services
I'm developing a game for Android in Java using Android Studio and LibGDX. I'm trying to implement the Google Game Services inside my game but I'm having trouble using the BaseGameUtils. Every time I ...
0
votes
0answers
30 views
gdx-video - Error: Failed to resolve: com.badlogicgames.gdxvideo:gdx-video:0.0.1
I would like to use gdx-video extension in my libGDX project, to embed a YouTube video. I have found this extension on GitHub, but there are several error messages during Gradle Sync process. I have ...
-2
votes
1answer
38 views
How to get system date? [closed]
How do I get system date like: month, day in libGDX?
I want to add to my game events that happen on specific date but I don't know how to receive it.
0
votes
1answer
44 views
GLSL Shader not compiling (Android & LibGDX) and no log available
I'm trying to get a "ripple"-shader working for OpenGL ES 2.0+ (using LibGDX).
However, I can't get it to compile, and for some reason ShaderProgram.getLog() returns an empty string even though the ...
0
votes
0answers
22 views
Move/Rotate 3d multiple objects w.r.t. to one another in libgdx
I have two blender objects in .g3dj format. Below is the code :
private void createBaseArm1(){
// Now load the model by name from asset folder
baseArm1 = ...
0
votes
0answers
37 views
Lip Sync Sprite Animation in LibGDX
Is there any free sprite package to achieve lip syncing animation ? This is what I have in mind.
User will input text
The character will talk with the appropriate lip sync.
I know there are ...