Tagged Questions
0
votes
0answers
13 views
Bodies going through the walls of a box
I have a game where the user controls a box to collect falling balls. However, very often the balls will just fall through the walls of the box and be flung away. What could be causing the balls to do ...
1
vote
0answers
23 views
Slick2D v LibGDX: [on hold]
Okay. You might have seen some of these posts on forums here and there, but I wanted to ask this here mainly because everyone here is focused on game-dev and there seems to be quite a few Java ...
0
votes
0answers
31 views
Add a table of buttons to game [on hold]
I have some code of a libgdx game. In the game a car goes across a road and if it crashes with another car the game will be lost, below you will see the class for the enemy car, in the class there is ...
0
votes
2answers
101 views
How do i make collision detection more effective?
In the game i am developing, there are 220 circles that are not moving. One of the circles is moving and in every update, it iterates through an ArrayList that contains all the circles and check if it ...
0
votes
0answers
10 views
Json NullPointerException when calling readValue [closed]
I decided to write my own read and write object methods by implementing the Json.Serializable interface because I was unhappy with how Json does it's automated object writing (it omits arrays). My ...
0
votes
0answers
21 views
Collision Detection between 2 Circles not Working [closed]
I am working on a game which has many balls(circles) on screen. One ball will move towards the point where you click. I had no problems until i started working on collision detection. (I m using ...
1
vote
1answer
40 views
Cannot Efficiently Loop SequenceAction
Why doesn't this work and how do I fix it/create a different, working loop for this SequenceAction?
public void setLoopingFade(float time)
{
fadeLoop = Actions.sequence(Actions.fadeOut(time), ...
1
vote
1answer
38 views
LibGDX Box2DLights shadow offset problem on bodies
Hello I just started to use LibGDX, and it's awesome.
I looked at the Box2DLights library, and started to learn how the lighting work here.
I got something up:
As you can see, it works, but the ...
1
vote
1answer
195 views
How do I efficiently collide and match groups of coloured circles?
I am new to game programming and working on clone of this game in libgdx.
The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
0
votes
1answer
29 views
Master sound volume in LibGDX
I have been searching everywhere for master volume for sound and music in LibGDX but to no avail. Can anyone tell me if it is implemented somewhere or do i need to implement such functionality myself? ...
1
vote
1answer
38 views
Daily Unlock in LibGDX
I am trying to make a game that is a collection of mini games. The mini games will unlock daily. There are story for each day. And the story cannot be repeated so for example the player start playing ...
0
votes
1answer
90 views
TiledMap not drawing completely
While attempting to constrain camera scrolling to within the TiledMap I discovered that it seems the renderer for the map is not drawing the entire map. The map is 1600x960px so one would assume the ...
0
votes
1answer
69 views
Array of map data
I'm looking for your thoughts on the best way to store map data.
I need to store data for territory ownership for each pixel on the map.
The data for each pixel is as such:
Player 1 points: 24
...
0
votes
3answers
99 views
What is the easiest way to make an object follow the edge of a sprite?
I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
0
votes
2answers
44 views
LibGDX Images not loading
Now my Image isn't loading to the screen. I tried to be decorative with the code but since it isn't working I made it just like the video I'm whatching.
I don't get any exceptions, but the image ...
0
votes
0answers
30 views
Experiencing weird effects with framebuffer
So I am trying to build a working flashlight in my game. I am using libgdx and the framebuffer class but there are some weird effects that I am experiencing and that may be due to my lack of ...
0
votes
1answer
39 views
Does LibGDX abstract OpenGL ES away or can I still use my OpenGL ES knowledge?
I've been learning OpenGL ES, and am now turning my attention to using LibGDX.
My main concern with LibGDX is, if needed, will I be able to apply my OpenGL ES knowledge to something if needed and ...
1
vote
1answer
76 views
Problem to match font size to the screen resolution in libgdx
I'm having problems to show text on my game at same size on different screens, and I did a simple test.
This test consists to show a text fitting at the screen, I want the text has the same size ...
0
votes
0answers
27 views
libgdx ScissorStack problem
Im making a user interface using libgdx
I created a Window class & a Textfield class, that both use clipping.
I use the ScissorStack class of libgdx for clipping.
The Textfield is drawn inside ...
3
votes
1answer
71 views
How do you create a game overlay that makes the underlying graphics inactive?
I've created a simple game, and I drew a large rectangle in photoshop with faded edges that I want to use to overlay the game until the user presses "Begin" (on the overlay). The problem I'm currently ...
0
votes
0answers
9 views
InvocationTargetException caused by IllegalArgumentException due to trying to create a new OpenAL instance
So, after creating this class, (in this LINK)
, I ran into a new problem, I recieved an InvocationTargetException, which is generally caused when a method is invoked and an exception is created when ...
1
vote
1answer
69 views
Restarting a libGDX game to apply changes to resolution
How can I restart a LibGDX game to apply certain changes to the game such as changes to the resolution (going from 1920X1080 to 1280X720), or changing full screen.
Granted the resize(int width, int ...
2
votes
1answer
47 views
Centering a textbutton in a table libGDX
I have a few Tables spread across a Stage, now I have a problem.
In one table, all the TextButtons are centered, while in a different one they aren't, like this:
Table 1 Table 2
XXXtextXXX ...
1
vote
1answer
41 views
Libgdx - Sprites disappearing [closed]
I'm facing a little problem and I have no idea to bypass it.
I've made a dungeon generator and I'm able to spawn randomly mobs, the problem is that when they are not moving the game is fine, but at ...
2
votes
0answers
82 views
Libgdx - IsometricTiledMapRenderer and light shading
I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer.
Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
0
votes
0answers
46 views
Have button style not change when down
I'd like the button style to only change when it is checked and not change when it is pressed down, and/or have only the font color change. I'm using the built in Skin function with a .json file, ...
0
votes
0answers
31 views
Frame Buffer couldn't be constructed: incomplete attachment error on nexus 7
So I am running into an issue where I cannot load my game onto the nexus 7 because of the error stated previously. I read online that this is because the device can't use the Format class or something ...
0
votes
0answers
53 views
ShapeRenderer is pixelated in libGDX
When I use a ShapeRenderer, it always comes out pixelated. But if I draw the shape in photoshop with the same dimensions, it's very smooth and clean-looking.
My method is just as follows:
package ...
1
vote
1answer
91 views
How to make an Actor follow my finger
I'm back with another question that may be really simple.
I've a texture drawn on my spritebatch and I'm making it move up or down (y-axis only) with Libgdx's Input Handler: touchDown and touchUp.
...
1
vote
1answer
95 views
Dialog Title Does Not Fit
I successfully added my own font to the default .json file and it displays, however I get some weird sizing issues. Specifically when I try to create a Dialog. This is what it looks like: Ignore the ...
1
vote
0answers
53 views
Hiero Font not working [closed]
For ease of use I decided I would use the Skin class to make buttons and text, and the like, rather than draw them myself. So I downloaded Hiero to package a .ttf font into a BitmapFont and it all ...
1
vote
1answer
74 views
Why isn't my background drawing to the screen?
Ok, So I have a game I have been working on for a few months now and I am now stumped beyond belief. My friend who has spent days working on this background gave it to me and I put it in my game. On ...
1
vote
1answer
85 views
LibGDX collision detection on moving and rotating object (rectangle enemy) [closed]
i am trying to get collision dectection working properly but when i do it, the collision area keeps moving. no matter what i tried.
there are 2 objects and the objects are moving and i cannot get the ...
0
votes
1answer
50 views
Libgdx Do a fixed rotation for orthographic camera
Im trying to rotate my orthographic camera in the render loop to a fixed angle, but I can only make the camera spin with the code I got:
in the create
OrthographicCamera camera = new ...
0
votes
0answers
30 views
LibGDX stops drawing if I create a lot of Timer Tasks, but only in Android. Why is this?
I'm working on a few small games using LibGDX, and today I just started testing the first one on android rather than the desktop. A few seconds into the game, it stopped drawing. All my print ...
2
votes
1answer
57 views
Failing Screen Resize Method
So I want my game to draw to a specific "optimal" size and then be stretched to fit screens that are a different size. I'm using LibGDX and figured that I could just draw everything to a FrameBuffer ...
1
vote
1answer
75 views
Multiple enemy array in LibGDX
I am trying to make a multiple enemy array, where every 30 secods a new bullet comes from a random point. And if the bullet is clicked it should disapear and a pop like an explosion should appear. And ...
0
votes
2answers
78 views
Make objects slide across the screen in random positions
I want to make an object appear randomly at the right hand side of the screen and then slide across the screen and disapear at the left hand side. I am working with libgdx. I have this bit of code but ...
0
votes
1answer
58 views
LibGDX drawing map using tiles without space
I am making a board game. To draw the map on the board I use different tiles.
On some screen the map looks good but on some other screens there is a space between the tiles.
How can I do so there ...
2
votes
1answer
62 views
libgdx arrays onTouch() method and delays for objects
i am trying to create random bullets but it is not working for some reason. also how can i make a delay so the bullets come every 30 seconds or 1 minute????
also the onTouch method does not work and ...
2
votes
4answers
65 views
LibGDX - SpriteBatch's .draw() method requiring float[]
Please excuse my lack of knowledge with LibGDX, as I have just started learning it.
I am going through some simple tutorials, and in one of them, I draw a string onto the screen like so:
// the ...
2
votes
1answer
74 views
libgdx collision detection / bounding the object
i am trying to get collision detection so i am drawing a red rectangle to see if it is working, and when i do the code below in the update method. to check if it is going to work. the position is not ...
1
vote
1answer
48 views
LibGDX onTouch() method Array and flip method
How can I add this on my application.
i want to use the onTouch() method from the implementation of the InputProcessor to kill the enemies on screen.
how do i do that?
do i have to do anything to the ...
1
vote
1answer
49 views
libgdx draw issue and animation
it seems as though i cannot get the draw method to work???
it seems as though the bullet.draw(batcher)
does not work and i cannot understand why as the bullet is a sprite.
i have made a Sprite[] and ...
0
votes
3answers
191 views
How to optimize collision detection
I am developing a 2D Java Game with LibGDX. This is what it kinda looks like (simplified):
The big black circle is the player, which you can move by tilting the smartphone. The red circles and blue ...
0
votes
0answers
34 views
Sprite transparency not effected libGDX
I am making a game using libGDX and Tween Universal Engine.
My problem is as follows:
I have 2 screens so fars, a splash screen with the logo, and a second one which is the main menu.
In the splash ...
-1
votes
3answers
111 views
how to design transparent screen in libgdx
this question is for LibGdx geeks. I want to make transparent screen in my game. For example, when level completes I want a new transparent screen pop up and show player's high score, buttons to ...
1
vote
1answer
197 views
LibGDX: Smooth movement on a grid based game
I'm making a game with LibGDX where the player is on a grid (like a Chess board).
For now, I'm moving the player by teleporting him 16px in a direction.
I'd like to use the delta time to make smooth ...
0
votes
1answer
155 views
LibGdx efficient data saving/loading?
Currently, my LibGDX game consists of a 512 x 512 map of Tiles and entities such as players and monsters. I am wondering how to efficiently save and load the data of my levels. At the moment I am ...
0
votes
1answer
146 views
Cover Screen with Snowing Effect in Libgdx
Oddly enough I cant find clear instructions on this theme (I only found rain and the method is very particular) so I ask, how do I implement a whole-screen snow-falling effect?
The methods i can ...