Java is both a popular object-oriented programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

learn more… | top users | synonyms

0
votes
1answer
22 views

LibGDX Image Outline Help

As I was working on some art for my project, I decided that I should add an outline around some objects. So I tried my method; which was to create a second image slightly larger than the first, make ...
0
votes
1answer
80 views

Put layout over Surfaceview

I have this problem: I'm trying to create new RelativeLayout over whole screen - which also contains SurfaceView in the middle - and display some things on this RelativeLayout (in my case Imageview ...
1
vote
1answer
17 views

Bukkit Scheduler not in main Class

I want to make an Repeating Task whisch isn't in the main Class. ("Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {},20,20);") But it says that it can't resolve the method.
0
votes
1answer
31 views

libgdx - Should I use OOP in ECS framework? [closed]

For example I have OOP class of Bullet and I have created the pool and factory. Should I convert it to componet based? Like BulletComponent, then handle by BulletSystem? by the way I'm using Ashley ...
3
votes
1answer
66 views

Why does every texture drawn cause a new draw call?

I'm currently working on a 2d sandbox tile game in LibGDX and I noticed I had 700+ draw calls. So checked my code and I could not find anything that would cause a new draw call. All the tiles are ...
0
votes
2answers
37 views

How would I make my position interpolation stop once the destination is reached?

I would like to implement tile-based grid movement and I've heard that linear interpolation comes handy in the implementation process. I've tried to use it but I'm not sure how to make it stop once ...
1
vote
0answers
35 views

Libgdx final stage of adding admob to game

I had finished my game and wanted to add Admob ads to the game. I followed all the instructions in Admob in Libgdx and It's working very well, and the ads are shown properly, I just wanna be sure ...
0
votes
0answers
26 views

Uniform Interpolation?

In currently developing a little local Multiplayer game. In using Interpolation to make the player and entitys move smoothly but there's one problem, im using Interpolation, that looks like this ...
0
votes
0answers
38 views

LibGDX - Parallax scrolling background help

I've been trying to do a parallax scrolling effect on my 2D side-scroller game, to give the illusion of depth, by having layers at different speeds. Basically, I have a camera that follows the player....
0
votes
0answers
37 views

How to scale the camera

I'm developing a game engine (for the sake of knowledge) using OpenGL ES 1.x (Android). And there is a problem with scaling. To ensure that all textures are displayed correctly on various devices I ...
1
vote
0answers
19 views

Rectangle in object-layer has wrong coordinates in game

I extended the SuperKoalio LibGDX Example about an Tiled Object Layer in the Tiled Level-Editor and draw a rectangle on this layer. Now I would like to draw this rectangle in my game using the ...
1
vote
0answers
41 views

Having problems drawing entities the right way in my isometric game

I am making an isometric game where I have moving Entities's not bound to tiles, and a 3d ArrayList map which is populated by Block's which forms a tower-like structure in the middle of the map. My ...
1
vote
2answers
133 views

Java 2D Game - Screen Images Flashing

I'm currently working on a 2D Java Game. When I start the game everything works fine. A constant Update- and Framerate. When I'm using normal graphics methods to draw shapes nothing happens. But as ...
1
vote
0answers
63 views

How to implement A* pathfinding for enemies to follow player

The enemies in my game are supposed to follow the player in order to cause damage to it. Right now I have it where the enemy just goes in the direction that will bring it closer to the player, and ...
1
vote
1answer
49 views

Catch an exception from other programs

I was wondering if there was a way I could listen to all exceptions that are thrown into the console and log them somewhere or catch them. For instance: I have program A that is run by a Bukkit/...
0
votes
1answer
25 views

Object orbitting 2D circle java

I'm using this code to make a square that orbits a circle . When i use it however the rect(); is quite far away from the circumference of the circle, i would like to make it closer. All variables are ...
-1
votes
0answers
23 views

Make a 2D shape “orbit” a circle which has already been drawn in JAVA [duplicate]

I Have a circle, I want to make a shape (for now just a rect();) orbit around that circle. The x position of the circles center is represented by XPos and the y by YPos, the radius is represented by ...
1
vote
0answers
20 views

How to communicate with LibGDX HTML5 app?

I'd like to have a HTML form send data to a LibGDX game deployed as HTML5. Ideally as a form in HTML as part of the same page that contains the LibGDX div/canvas, and use the form to set up some data ...
0
votes
0answers
32 views

Android/Gear VR: Smooth walking with gamepad

I'm working on an Android app for the Gear VR using the Oculus SDK (Java, Eclipse) and I used this website to help me handle controller input, so I understand the whole concept of the center axis for ...
1
vote
0answers
30 views

Libgdx actions to image is applied to whole actors

I am trying to make the Image hidden then fade in and this is working but the background image is also become hidden the fade in : here where I apply the action in this class: public class ...
1
vote
1answer
41 views

Creating SurfaceView cause short screen blink

When I create SurfaceView for first time since app launch, the app screen blinks black for small time (about 1/4 second). It blinks over UI, so its really visible and doesn't look nice at all. I've ...
0
votes
1answer
22 views

Libgdx, TweenEngine - continous rotation animation without stopping/delay

I have a probably dumb question. I'm trying to create a LoadingCircle so I just picked one image (you can see in the attachment) and made some sequences to rotate it: Tween.to(loadingCircle, ...
1
vote
0answers
28 views

Unable to draw tabular view for images in libgdx

I am trying to draw a table of images using images from my asset folder. However I always get a blank black screen.If I replace the images with textbuttons, then I am able to draw the buttons in ...
0
votes
1answer
31 views

Libgdx music is not working properly

I finished my game programming but I have small problem, please help me I want to finish it completely. I am starting background music when the user goes to the PlayScreen and when the kid in the game ...
-1
votes
0answers
11 views

Rectangle Flash fix and draw string

Now I have a code which works :) But now I have 2 bugs and I don't know how to fix it. I am drawing a rectangle (that works) but it's flashing and I dont know why. The second bug is i did a score int ...
3
votes
1answer
53 views

LibGDX - FPS drops

I've been trying to record some gameplay footage of the game I'm currently working on, using the Android SDK and ADB to do it. Whilst the game runs at constant 60 fps in my medium-end phone, as soon ...
0
votes
0answers
15 views

Libgdx Music is not working again

I am starting background music when the user goes to the PlayScreen and when the kid in the game dies, the background music stops and starts game over music and move to game over screen, then the user ...
1
vote
1answer
91 views

Java Distance between two Vector positions never 0

I have a Player moving, but when the player reaching the destination it should stop. But problem is that distance never return 0. It starts printing this: 0.9672514210000003 End by this and then ...
1
vote
0answers
19 views

How do I resolve the inability to get an input stream from URL?

I am unsure if anyone has ever had problems with this, but I am having difficulty trying to get the URL to work properly however, this is what the logs says javax.imageio.IIOException: Can't get ...
0
votes
1answer
36 views

Receiving a “cannot find symbol” error [closed]

In my Java class, we're creating a connect 4 game. For now, we're just setting up the GUI. I am receiving the error on lines 13 and 14 " private ArrayListplayer; private Connect4Ui ...
1
vote
1answer
46 views

Libgdx Scene2D Table background not whowing up

I am using Libgdx's Scene2D API to build by UI and everything has been working as expected until now. I created a Skin and a TextureAtlas and linked them as so: Skin skin = new Skin(); TextureAtlas ...
0
votes
0answers
17 views

Libgdx Ending level is not working properly

In my game the kid is collecting fruits but if he hits the rock 3 times or time is up before collecting the required points, the kid will jump to the half of the screen then fall down and start fail ...
2
votes
0answers
73 views

Why aren't my pieces rotating on my chess board in Java?

I am developing chess game in Java using the Netbeans IDE. Instead of rotating the whole board at each move, I thought of changing position of the pieces themselves, while the board remains same. All ...
1
vote
2answers
47 views

Textures are not drawn separatley

I am trying to draw different textures of balloons and I want them to appear in different times about half second between each one, and move in the world. first balloons are rendered but after about ...
2
votes
1answer
47 views

Libgdx Image doesn't fit the Screen

I am Trying to show Image as background, but it doesn't fit to the screen. When I use this class as the start screen it fit the screen properly but when I call this class after winning the level, the ...
0
votes
0answers
26 views

Two Viewpagers - swipe from one to another cause stuck

I have two Viewpagers, one is controlling whole layouts (pages), and second holds some items. First one is named viewPager1 in this image: Works good, but not perfect; As you can see, there's ...
1
vote
2answers
68 views

LibGDX - Collision detection between all bullets and all enemies

I'm trying to make a collision detection system between the player's bullets and all the enemies on screen. So far I had something like this: for (Bullet bullet : hero.getPistols().getAllShotBullets(...
0
votes
2answers
46 views

Black lines on sprites

I am having the issue as seen below while using a textureAtlas with libgdx. I haven't found anyone else with the issue so I decided to ask here. Here is an image of the textures in the game screen: ...
1
vote
2answers
49 views

Libgdx Back button exit the app

when I press back button on android, it exits the game although I ask it to go to other screen instead. It goes to the other screen for one or two seconds then it exits.: if((Gdx.input.isKeyPressed(...
1
vote
0answers
60 views

Implement gpu based dynamic geometry lod with openGL

I'm currently working on my own game and for that I wanted to implement LOD, to boost the performance. I found a very nice tutorial on the internet: http://rastergrid.com/blog/2010/10/gpu-based-...
1
vote
1answer
45 views

How to “port” Java2D code to LWJGL

I've been following some game tutorials on youtube and developed a custom engine using Java (Graphics2D, BufferStrategy and such). I have a class "Surface", which represents any 2D object (image, ...
0
votes
0answers
24 views

Java - Issue colliding with more than one object

Ok, I am working on a simple 2D sidescroller game and having issues with the player (or any moving entity) colliding with another entity. My current method, (a box on north, south, east, and west to ...
0
votes
1answer
51 views

Libgdx if statement is not working well

I am trying to make the player die when it hits the rock or the time is up and the score is not reached, in this code at the first if statement it works when Rockhit is true, the player jump and ...
1
vote
0answers
33 views

Different Box2D bodies act differently and unexpectedly with same mass

I have a box2d body which is simply a rectangle (the spaceship). This ship flies around, affected by the gravity of planets (static circle bodies) just fine. I have tried changing the ship fixture ...
1
vote
1answer
53 views

Basic Animation Concept - Stuttering Sprites (Java)

The Problem I have some sprites animating across my screen (some spaceships). I alter their X coordinates (like -5, for animation) in my game loop. I want the animation to happen faster, however ...
1
vote
1answer
27 views

LWJGL version problems

Is it possible to create VAO's while my computer doesn't support openGL 3.0 or higher? I managed to create a vertex buffer object and draw a rectangle. But then I changed my lwjgl libraries to the ...
0
votes
1answer
150 views

Creating puzzle on libGDX

Good afternoon. Help me please to add the code for the game. This game is puzzle. Everything works good, but I would like to have not just ordinary puzzles with numbers, but also the puzzle with a ...
1
vote
1answer
27 views

LIBGDX font.draw() makes letters blink on PC

I load Bitmapfont then try to draw it, but on PC(desktop) build screen blinks with frequecy that I can judge that backbuffer is not drawn. On Android all is fine, I don't see blinking. I simply do ...
0
votes
1answer
24 views

How to change the way LibGDX scales images?

I'm using FillViewport and OrthographicCamera. LibGDX is scaling my images rather badly - jagged edges, visible pixels. How can I change the scaling method? by the way, I'm pretty sure the issue isn'...
0
votes
0answers
7 views

Should I boost run task via disabling TexturePacker?

I decided to create textures with keeping in mind that the largest screen resolution that my game will be working with is 1920x1080. So, menu background texture in my game will be always 1920x1080. ...