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.
0
votes
1answer
718 views
rotating menu with Actors in libgdx
I am intending to build a circular menu, with menu items equally distributed around the circle. When clicking on a menu item the circle should rotate so that the selected item is facing the top. I am ...
0
votes
1answer
906 views
Problem with AssetManager in libgdx
I started using the asset manager, so I could use a loading screen. Everything is working fine, but when the app enters a pause state, it unloads every asset and when it loads the screen all the ...
8
votes
2answers
1k views
Play videos with LibGDX
Is there a way to play videos with LibGDX?
I want to put a video as my splash screen in Android, but I dont want to use the Android SDK, because I am using LibGDX and I am almost finished :/
1
vote
5answers
2k views
Port libgdx application to iOS
I made my game using libgdx which is a cross-platform framework which supports desktop, Android and html5 (using Google Web Toolkit). What could be a possible route to port my game to iOS?
2
votes
3answers
465 views
What's an efficient way to represent game state for networked games?
I've done a little bit of network coding for games before, but primarily with TCP for games that don't really need to simulate real-time interaction. I am working on a (somewhat) simple 2D Java game ...
0
votes
1answer
549 views
How to make a 2D Terrain with opengl?
I want to make a simple 2d terrain with just a few bumps and height changes:
I thought about just using random numbers to describe the height of a certain vertex, but I don't see how I can make ...
0
votes
2answers
1k views
Handle Input Processor in Device Back Button and Button as Actor
How to handle a event for both key as well as actor added in the screen? My problem is that at a time only one input processor is available either for button or device back button. How can I set input ...
0
votes
2answers
892 views
Libgdx Animation Timing
I'm having a small issue with libgdx animation.
I'm using getKeyFrame() to get the current frame of the animation and I'm updating the state time by adding on deltaTime in my update function for the ...
0
votes
0answers
357 views
Implementation AnalogOnScreen Controller
I want to know about how to implement analog on screen controller for the application. If possible also provide some guidance with example so It done my work easier.
0
votes
2answers
1k views
How do I move a body using the hardware accelerometer?
I want to move the ball as I move the device but I can not able to find how to use accelerometer in libGDX. I know that Gdx.input.getAccelerometerX() returns x coordinate but I don't know how to apply ...
1
vote
3answers
2k views
Camera Coordinate To Screen Coordinate
I want to convert the camera coordinate to screen coordinate. I have asked this question because my camera is 48m wide and 32m high but my screen is 480x320 pixels. So whatever collision point I get ...
2
votes
1answer
740 views
Is there a way to use the facebook sdk with libgdx?
I have tried to use the facebook sdk in libgdx with callbacks, but it never enters the authetication listeners, so the user never is logged in, it permits the authorization for the facebook app but it ...
1
vote
1answer
789 views
Create apk from libgdx project
What is the basic procedure to create the signed apk for my libGDX project? I am new to libGDX so provide some guidance.
I am talking about deploying apk to the Android market. I have to ask this ...
1
vote
1answer
311 views
Erasing part of lines in libgdx with ImmediateModeRenderer
Hi i'm using the ImmediateModeRenderer renderer = new ImmediateModeRenderer10(); to render a line with the next block
renderer.begin(matrix, GL10.GL_LINES);
renderer.color(color.r, color.g, ...
0
votes
4answers
783 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 ...
1
vote
1answer
312 views
Random Sprite Speed
I followed the Rain Catcher tutorial from libGDX and I made some modifications to the code, allowing the rain drops to appear faster. But I cant figure out how to make the raindrops fall at random ...
1
vote
1answer
494 views
Android APK export duplicating libgdx assets folder
I'm developing a game using libgdx targetting Java desktop and Android. For the assets I have a "data" folder inside the "assets" folder in the Android project. Then, I link it from the desktop ...
1
vote
1answer
648 views
Errors on LibGDX tutorial
I get the following errors on the LibGDX tutorial "Simple App"
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gdx64 in
java.library.path at ...
0
votes
2answers
1k views
libGDX application does not support 800x480 resolution
I have an application written with libGDX that does not run with a resolution of 800x480, whereas on devices with other resolutions (e.g. 480x320) it works perfectly. It also works perfectly as a ...
0
votes
1answer
577 views
Virtual screen size with libgdx and GLES 2
I've been trying to use a virtual screen size for my libgdx desktop-android game. I'd like to always use a 16:9 aspect ratio but with a virtual screen size so everything would adapt automatically ...
1
vote
0answers
75 views
Parenting Opengl with Groups in LibGDX
I am trying to make an object child of a Group, but this object has a draw method that calls opengl to draw in the screen.
Its class its this
public class OpenGLSquare extends Actor
{
private ...
2
votes
2answers
574 views
How do I show a minimap in a 3D world?
Got a really typical use-case here. I have large map made up of hexagons and at any given time only a small section of the map is visible. To provide an overview of the complete map, I want to show a ...
1
vote
5answers
4k views
What is the proper way to remove a box2d body from the world in libgdx?
I'm wondering how to remove the body from the world, because I found an error when I tried.
I found following error.
java:
...
1
vote
1answer
285 views
Removing the circle outline rendered on Box2d CircleShape
How can I remove the outline on the CircleShape below?
CircleShape circle = new CircleShape();
circle.setRadius(1f);
This is what I'm using to draw:
batch.draw(textureRegion, position.x - 1, ...
1
vote
1answer
724 views
How does the rectangle bounds (x,y,width,height) in libgdx work?
I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2 or 3 examples with that are:
<!--this is the pause button in the top right ...
4
votes
4answers
461 views
More efficient in range checking
I am going to use a specific example in my question, but overall it is pretty general. I use java and libgdx.
I have a ship that moves through space. In space there is debris that the ship can ...
2
votes
2answers
2k views
On screen controller for libgdx games?
Does anyone know a better controller for 2D Games than a virtual on screen joystick? The pros of the joystick are:
Easy to implement for developers
Familiar interface for users
But there is a ...
-3
votes
2answers
512 views
How to create Executable Jar
When I run a jar file I created, I get the following error, so please someone help me out of this:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't ...
3
votes
1answer
325 views
Photon alongside LibGDX
Can anyone point me to a possible implementation of the Photon network engine along with LibGDX for Android? Or any multiplayer networking SDK for all that matters.
From reading source code it ...
-3
votes
1answer
290 views
Different texture for multiple resolution
How to use different texture(image) for different resolution in libGDX? Also specify how to detect it from asset folder?
3
votes
1answer
2k views
How do I move the camera sideways in Libgdx?
I want to move the camera sideways (strafe). I had the following in mind, but it doesn't look like there are standard methods to achieve this in Libgdx.
If I want to move the camera sideways by x, I ...
2
votes
1answer
2k views
How do I properly implement zooming in my game?
I'm trying to implement a zoom feature but I have a problem. I am zooming in and out a camera with a pinch gesture, I update the camera each time in the render, but my sprites keep their original ...
0
votes
0answers
2k views
LibGDX Box2D Body and Sprite AND DebugRenderer out of sync
I am having a couple issues with Box2D bodies. I have a GameObject holding a Sprite and Body. I use a ShapeRenderer to draw an outline of the Body's and Sprite's bounding boxes. I also added a ...
10
votes
4answers
15k views
Where are all the tutorials for libGDX?
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 ...
4
votes
3answers
5k views
LibGDX tutorial help Scene2D
I'm having trouble understanding this tutorial. It defines the importance of classes, but it doesn't show an outline of the project file so far. From what I got from that tutorial was that there is ...
4
votes
4answers
2k views
Why do I get this file loading exception when trying to draw sprites with libgdx?
I'm having trouble with the "Drawing Images" section on the libgdx tutorial. I set up the documents completely and I typed the code as follows:
public class Game implements ApplicationListener {
...
5
votes
1answer
1k views
Box2D Difference Between WorldCenter and Position
So this problem has been brothering for a couple of days now. First off, what is the difference between say Body.getWorldCenter() and Body.getPosition(). I heard that WorldCenter might have to do ...
3
votes
3answers
200 views
When is it best to load screens in mobile games?
In the develpment of a mobile game, is it a good to load all the screens at the start of the game, or destroy and create new ones during the game? I am doing the second thing, because I suppose that ...
1
vote
1answer
562 views
Why wont the LibGDX's main class Initialize on Android Launcher?
So I was searching for different ways that could suit me in programming and came across LibGDX. Naturally I looked at the tutorial. As I was doing it, I was following the steps word for word, except ...
0
votes
2answers
480 views
How would I generate random falling objects
I'm creating a game using libgdx on Eclipse that is similar to Ragdoll Avalanche. I'm looking for a way to generate falling objects like the triangles of Ragdoll Avalanche. All I know that i have to ...
2
votes
2answers
2k views
Change alpha to a Frame in libgdx
I have this
batch.draw(currentFrame, x, y, this.parent.originX, this.parent.originY, this.parent.width, this.parent.height, this.scaleX, this.scaleY,this.rotation);
I want to apply the alpha that ...
1
vote
1answer
1k views
Using NinePatch in libGDX for Loading Bar
I am trying to create images for a loading bar in libGDX. I came across the NinePatch class and I was hoping to use it for this loading bar, since stretching images with a plain Texture or Sprite ...
2
votes
1answer
1k views
Using the same font with different sizes in libgdx
I am using BitmapFonts, LabelStyles and Labels for my texts.
I want to resize some labels, so i use this.
fontType.scale(-.6f);
LabelStyle style = new LabelStyle(fontType, Color.WHITE);
titleLabel ...
4
votes
1answer
2k views
libGDX Multitouch Controls
Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
3
votes
1answer
2k views
Using the AssetManager in LibGDX
I am trying to use the AssetManager class in LibGDX and I understand how it works but I am trying to implement a loading screen. I have followed the AssetManagerTest.java file here, but I am having a ...
3
votes
3answers
2k views
Changing the color of a sprite at runtime
Is there a form to change the color of a sprite in runtime?}
I have a black point loaded with an image, but i dont want to load various images with different colors, is there a mode to change the ...
1
vote
1answer
1k views
Waiting specific time to increase sound libgdx
I want to wait a moment (.5 seconds) before I increase the sound, how can i achieve this without using Thread.sleep, because i want my game to keep runnig.
0
votes
0answers
271 views
Which game engine is more worthwhile for mobile game development [closed]
I have been thinking of starting to learn mobile game development. I recently learned that there are three popular game engines available for android:
AndEngine
cocos2d-android
libGdx
you guys ...
1
vote
5answers
541 views
Errors happen when using World.destroyBody( Body body )
on Android application using libgdx, when I use World.destroyBody( Body body ) method, once in a while the application suddenly shuts down.
Is there some setting I need to do with body collision or ...
0
votes
1answer
759 views
removing box2d objects before collision occurs
I am having a problem with a collision detection between the character and items, both created as box2d objects.
What I am trying to do is to delete the item or remove item from the collision method ...
