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.
-1
votes
0answers
12 views
Game crashing at drawPlayer() method - Obviam Tutorial [on hold]
So I have been following this tutorial- obviam.net. It shows how to implement left and right movement. I decided that before I went any further, I wanted to implement up and down movement as well. A ...
1
vote
0answers
28 views
LibGDX Drawing sprites when moving orthographic camera
I've been having this problem for a long time and I just can't seem to find the exact problem. I have a game where the map is 480x1600 and my camera has a view of 480x800. I have a button that when ...
1
vote
0answers
19 views
How do I use warble to package libgdx and ruby?
My ruby code is as follows
include Java
Dir[File.expand_path "#{File.dirname(__FILE__)}/../libs/\*.jar"].each { |x| require x; puts "go"}
module LibGDX
include_package "com.badlogic.gdx"
...
0
votes
0answers
20 views
ParticleEffectPool.obtain() not resetting particles
I want to use ParticleEffectPools in libGDX but I'm running into an odd issue where the effects don't seem to be reset when obtained by the pool. The code below looks for an existing ...
1
vote
1answer
44 views
Libgdx , how to get mouse position relative to a Tiled Map
I'm porting a game that i did for Ludum Dare 26, this year, i made it using Contruct2, i decided to port it to Libgdx, for learning reasons,
...
2
votes
0answers
76 views
Choosing a level editor of a 2d platformer [on hold]
I'm working with a small team on a 2D platformer game in Java (LibGDX) that uses Box2D for physics.
Our team is looking for a tool to make the levels (that we will be able to integrate with the Box2D ...
0
votes
0answers
35 views
Side Menu using Libgdx
I want to make it so that when the player presses start, a side menu slides out and gives a player some option on one side of the screen, similar to Angry Birds or Pokemon. I'm not sure how to go ...
0
votes
1answer
58 views
Tweening in 2d side-scrolling RPG
I'm working on a 2d side-scrolling RPG-ish game. Currently the movement of the main character(hero) is based on the A and D keys, because it's 2d and I don't really care about jumping. I would like to ...
0
votes
0answers
22 views
Libgdx - Box2D: Attach Physics Body Editor Loader mask to dynamic texture
I have a texture of a circle, which gets drawn to a new position when a touch drag occurs. It isn’t set up as a body.
I have made a physics map using Aurelien Ribon's Physics Body Editor Loader GUI ...
1
vote
1answer
59 views
Registering InputListener in libGDX
I'm just getting started with libGDX and have run into a snag registering an InputListener for a button. I've gone through many examples and this code appears correct to me but the associated callback ...
-4
votes
0answers
34 views
How to implement Admob in my Game in libGDX?
I am start working with libGDX and I want to add the ADmob in my Game.
So , For this what should I do ?
If someone have worked on it, Give me the way to make this thing happen in the Game ?
0
votes
1answer
139 views
Design question: How to handle input more efficiently?
I'm designing a system to handle the keyboard input for my game. To get it more simple, I have a class that has two methods, KeyUp and KeyDown which tell me which key has been pressed, this is already ...
1
vote
0answers
52 views
How to space actors in scene uniformly?
I have a Array data structure right now, which contains 10 soldiers in my army.
They can setup initially in various formations -
e.g.
o o o
o o o
o o o o
The user can move one of the ...
-1
votes
3answers
89 views
ArrayList mixing up indexes?
Working title.
I'm warming up to libgdx and I'm trying to remove objects from an ArrayList when pressed/touched. The Objects are rectangles and about 70% of them get removed, the other 30% just stays ...
0
votes
0answers
33 views
swipe effect problem using only mesh and array - libgdx
I tried to combine matdesl's and libgdx's draw lines algo ang code. but i can only create a line.
problem is i want to make a fruit ninja swipe effect but only knows this... problem is i want to make ...
0
votes
0answers
30 views
How to handle Null Pointer Exception in libGDX's Box2D ContactListener?
What's up everyone,
I am heuristically producing a Pong clone in Box2D via libGDX. The Null Pointer Exception is originating in the ContactListener's beginContact() method in which I am trying to ...
1
vote
0answers
47 views
How to create heat haze effect in Libgdx?
I would like to create a heat haze effect for a 2D game I am making.
Do You have ideas or suggestions, how to get that effect. I am using Libgdx(OpenGL 2.0).
Thank You in advance!
2
votes
1answer
52 views
Libgdx loading images
I can't find a sulotions that solves my problem, I've tried pretty much every tip I can find, but with no luck.
Error :
Exception in thread "LWJGL Application" ...
0
votes
0answers
67 views
pause or freezing game screen
I have a question regarding the pausing/freezing a game while a window/pausemenu will appear at center of the screen. I've already created a pausescreen class which will be called each time the back ...
1
vote
0answers
53 views
Libgdx: scrolling background for preview screen
Good day, I have been coding for quite a while now and I'm at an certain point where i am having difficulties on solving something. I've been creating a preview screen which contains the following:
...
1
vote
1answer
101 views
libgdx: how to manage entity classes [closed]
Good day sirs, I know this is a newbie question but I really need to ask it. I've been reading a lot of sample codes on libgdx, and I have seen entities(player, enemy, boss,etc.).
my question is what ...
0
votes
1answer
53 views
Error using Physics Body Editor for LibGDX
In my game, I've been trying to use the physics body editor for libgdx, but I kept on getting an error. So I thought there was probably something wrong with my code so I took the example off of the ...
1
vote
1answer
32 views
How to properly calculate y position when drawing from .fnt bitmap font?
I want to render text to bitmap to use it later as a decal texture. I've read through libGDX fonts drawing code and came up with this:
private void writeTextToPixmap(Pixmap destPixmap, Pixmap ...
3
votes
0answers
66 views
How can I post scores to Facebook from a LibGDX android game?
I am using LibGDX to create an android game. I am not making the HTML backend of the game. I just want it to be on the Android Google Play store.
Is it possible to post the scores to Facebook? And if ...
3
votes
1answer
46 views
Can I simulate cocos2d-iphone's CCSprite node system in libGDX?
Something great about cocos2d-iphone is that a CCSprite is a CCNode, and a CCNode can contain other children nodes and a parent. When one node moves, its children will move relatively to it as well.
...
1
vote
0answers
31 views
How to use HyperLink with Actor in Libgdx
I am making a quiz game using LibGDX. I want it to redirect to a website. I am using classes like Text and Label that extends Actor to write text using a bitmap Font. I have no idea on how to provide ...
3
votes
2answers
57 views
Libgdx ShapeRenderer rectangles
I'm trying to draw a filled rectangle in Libgdx and according to the API this should work:
shapeRenderer.begin(ShapeRenderer.ShapeType.FilledRectangle);
But it gives me an error and tells me to ...
2
votes
0answers
64 views
Libgdx ParallaxScrolling and TiledMaps
I implemented ParallaxScrolling for my SideScroller project, everything is working but the tiled map (the most important part!). I've been trying out everything but it doesn't work (see the code ...
1
vote
1answer
82 views
Implementing Scrolling Background in LibGDX game
I am making a game in LibGDX. After working for whole a day..I could not come out with a solution on Scrolling background.
My Screen width n height is 960 x 540. I have a png image of 1024 x 540. I ...
0
votes
1answer
59 views
Should I make the Cells in a Tiledmap as null when my player hits it
I am making a Tile Based game using Libgdx. I took the idea from SuperKoalio platformer demo by Mario Zencher. When I wanted to implement Collectables in my game , I simply draw the coins using Tiled ...
1
vote
1answer
87 views
Setting Higher Z-Index for Sprite
For my game, I have to set highest z index for my sprite.
At present, I wrote following code but didn't work for me.
Sprite houseSprite = new Sprite(pX, pY,
...
0
votes
0answers
31 views
Libgdx wallpaper offset change
i have an image that i set as background. I use texture Region for my image.
i put this in update method.
batcher.begin();
batcher.draw(background, 0, 0, 320, 480);
batcher.end();
How could ...
1
vote
0answers
41 views
Create a touchpad-joystick using texturepacker2
I am adding a touchpad control to my game, using TexturePacker for loading images into the image-atlas. I have followed this tutorial to add the joystick. Everything is the same apart from the loading ...
0
votes
1answer
73 views
How to implement a game launch counter in LibGDX
I'm writing a game using LibGDX in which I want to save the number of launches of a game in a text file.
So, In the create() of my starter class, I have the following code ..but it's not working
...
1
vote
1answer
78 views
Making Ball Fling in a Curve Direction
I was wondering how to figuring out how to slice a ball (banana kick) by flinging it curve-ways. However, according to the LibGDX's gesture listener, the method for flinging only focuses on a straight ...
1
vote
2answers
104 views
Should I accumulate state time based on a global or a parameter?
Generally, we associate a "state time" with our sprites. Libgdx provides a method to do so:
float deltaTime = Gdx.graphics.getDeltaTime();
However, in the main game loop, we have a delta time as a ...
1
vote
1answer
95 views
LibGDX with Android UI
Hello I want to combine between android UI and libGDX. I want to have half of my screen with libgdx engine (animated sprite) and the other half of the screen with android UI buttons. Does anybody know ...
1
vote
1answer
47 views
Images not found in textureregion
Previously I was using simple Texture for sprite based animations, but that did not provide support for images which were not in the power of 2. TexturePacker provides with the ability to load all the ...
1
vote
0answers
47 views
Texture Region drawing issue with LibGDX
I am currently moving my old slick2d project to libgdx. I have created a custom AnimationExt class that extends Animation to which I added a draw method. The Animation's frames are actually ...
0
votes
0answers
37 views
Trouble Reading Image File and Directory from Assets Even if it's Correct
I was wondering, I used the right directory of the image file and name as well for the app.
Strangely, I got an error on this result after I run the app and rendering an image whose image length and ...
0
votes
1answer
59 views
Input events not working simultaneously on android devices in libgdx
I am making a simple platform game in Libgdx... in which I have made the player to move left, move right and jump. The code works fine on Desktop but on Android devices, Jump is not fired when the ...
0
votes
1answer
29 views
Problems implementing a Sign Sprite in Libgdx
I am making a tile based game in LibGdx. I am using the TiledMap in .tmx format. I want when my player reaches a tile whose property is set (tileType -> sign), he should see a Sign sprite and on ...
0
votes
1answer
71 views
how to use texture atlas
I am trying to implement texture atlas.
1) I am using the texturepackerGUI and the result is taking 2 files , one png (whicj contains all the images and one .atlas (and not .pack).
2) Now , I want ...
1
vote
0answers
84 views
TIled map rendering in libgdx
Good day.
First of all, some explanation of situation.
Init tiled map code:
map = new TmxMapLoader().load("maps/map.tmx");
mapRenderer = new OrthogonalTiledMapRenderer(map, 1f / 32f);
Rendering ...
1
vote
1answer
74 views
Recording and playing back sounds with LibGDX
How do I record a sound to PCM format and replay it from there?
3
votes
1answer
68 views
How to setup libGDX project only for Android & iOS?
I have developed some applications on android.But now i want to learn game development in Android & iOS with libGDX.
I want to only develop for Android & iPhone.I do not want a desktop ...
0
votes
1answer
76 views
how to get width and height of TiledMap in the latest Version of Libgdx
I am making a tiled based game, I want not to let the camera show places, where there is no map... this is a obvious solution I got from a tutorial
if(camera.position.x<400){
...
1
vote
2answers
82 views
How do I use TextureRegion?
I can't understand how to use texture region.
I have a png file which has images (sprite sheet) and I must "extract" every image I want.
From here it just says TextureRegion(texture, 20, 20, 50, ...
0
votes
1answer
131 views
adding vertical scrolling to 2D platformer in libgdx
I am trying to make a two sided platform game in Libgdx. Where I am scrolling through the TiledMap.
I was easily implementing the horizontal scrolling using..
camera.position.x = ...
-1
votes
1answer
68 views
no custom background - touchdragged method? [closed]
I am beginner in libgdx and trying to experiment .I am using the simple example here .So, I have 2 questions:
1) I want to use my background picture.So, I have a class Assets where I have all the ...