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

learn more… | top users | synonyms

5
votes
0answers
158 views

LibGDX controllers: how to fix crashes in JRuby?

I'm using JRuby with LibGDX and it's been going quite swimmingly, save for a crash I experience every time I try to use the controllers extension. Here's a basic rundown: I've required all the ...
2
votes
0answers
59 views

Why do my Box2D bodies occasionally get stuck and separate forcibly?

I'm making a space game with LibGDX and Box2D. I made a video here to illustrate the issue. Verbal description: When objects collide, they sometimes get stuck together and are then suddenly separated ...
2
votes
0answers
988 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 ...
2
votes
0answers
571 views

Rotation of viewplatform in Java3D

I have just started with Java3D programming. I thought I had built up some basic intuition about how the scene graph works, but something that should work, does not work. I made a simple program for ...
2
votes
0answers
1k views

AndEngine Making Chase Camera Follow Player

I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera ...
1
vote
0answers
48 views

How to eliminate the outline in libgdx?

I'm recently started working on a game in libgdx, and I've run into the problem that my sprites tend to get a thin, whitish outline around them. This is especially a problem for me since I'm working ...
1
vote
0answers
66 views

How do I fill a shape with a texture in Libgdx?

I am making a 2D racing game. I want to fill the area of the ground object with a texture. I have the shapes of the ground (a Box2D shape). If I make images of the ground with textures, it uses a lot ...
1
vote
0answers
46 views

How to turn off antialiasing in Graphics class?

I have been using the following code with a Graphics2D buffered image g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); to ensure the image ...
1
vote
0answers
97 views

Rotating a scene around a fixed axis

I am looking for a way to move my scene so that when I translate forward/back/left right it moves directly up/down/left/right on the screen. Currently it does do that until I rotate (by anything ...
1
vote
0answers
99 views

Google turn based multiplayer automatch criteria

I've set up a multiplayer game using Google's turn-based API. I now want to put some qualifiers on auto-matching and am racking my brain on how to solve this issue... I'm using GetVariant() to ...
1
vote
0answers
49 views

LibgGDX drawing two seperate Textures in FrameBuffer

So I am trying to combine multiple TextureRegions in to one by using a FrameBuffer. This works extremely well when the TextureRegions originate from the same Texture object/file but as soon as I try ...
1
vote
0answers
69 views

LibGDX: Why look BitmapFont pixelated on a scene2d.ui.Dialog?

When I use BitmapFonts directly on the stage table, the fonts looks normal (not pixelated). But when I use the same BitmapFont with the same size on a scene2d.ui.Dialog, the font looks pixelated. ...
1
vote
0answers
98 views

Creating a voxel chunk with a VBO - How to translate the coordinates of each block and add it to the VBO chunk?

I'm trying to make a voxel engine similar to minecraft as a little learning experience and a way to learn some opengl. I have created a chunk class and I want to put all of the vertices for the whole ...
1
vote
0answers
58 views

Box2D random crash when adding joints

I'm currently working on a project which uses Box2D, when the player uses a certain key it should anchor to the ground. For that I use a weld joint, but when I add the joint the game will sometimes ...
1
vote
0answers
966 views

Checkers make move and take move algorithm

I'm coding a checkers game and I encountered a problem and I'm 99% sure is about how the move is done and taken back. The structure of my game data is: an 8x8 array containing my board squares. ...
1
vote
0answers
110 views

Incorrect click event when resize on libGdx

I want to use scene2D, in libGDX, to detect click on object. I have this simple Game sample : Stage stage; @Override public void create() { this.stage = new Stage(1280, 720, true); ...
1
vote
0answers
113 views

3D Camera Y-Axis wrong angle

I am trying to build a camera class, though I am running into a problem. When I move the camera above/below, and try to move towards the ground, I am moved off in what seems to be about 45 degrees in ...
1
vote
0answers
88 views

Cannot distinguish depth in an isometric cube

I am having a problem with distinguishing different depths in my new 'game.' It is a game similar to Minecraft, only it is rendering in isometric format. The problem is, I cannot think of a way to ...
1
vote
0answers
226 views

How do I implement a “sliding out of / into” effect on a settings menu similar to that in Angry Birds?

I'm trying to implement a settings menu component similar to that in Angry Birds - a button control that makes an options menu slide out of it and back into it when clicked on. I use scene2d.ui to ...
1
vote
0answers
67 views

Need to join 2 bodies via weld joint but not on center of mass

I have successfully join 2 bodies via weld joint , but my problem is I want to join corners of bodies not on centre of mass. Is there any way to achieve this? Above image consist 3 polygon body that ...
1
vote
0answers
231 views

Block With Given ID Does Not Exist - Minecraft Mod

I have tried to make my own Minecraft Block using Forge, but for some reason, when I use /give Playerxxx 1000 1 the game says, There is no block with id '1000' My Block Code: package ...
1
vote
0answers
77 views

Slick - create new texture from part of existing texture

Say I have the following image: I want to resize this texture, so I can have resizable buttons with a texture. Now, as you can't repeat a certain area of an image in OpenGL, I have to create a new ...
1
vote
0answers
113 views

Slick2d font rendering makes all other drawings vanish

I'm converting a java game to lwjgl and slick-utils. I've followed the slick2d examples for font loading/rendering but I found that the font shows as a solid box of color unless I add the following ...
1
vote
0answers
246 views

Exporting from eclipse with lwjgl using jarsplice

I am in the process of developing a 2D tilebased rpg with eclipse, lwjgl, and slick util. For some reason eclipse seems to be lagging heavily which doesnt make sense as all i have rendering is a ...
1
vote
0answers
237 views

Why do my LWJGL fonts have dots and lines around them?

When we render fonts there are weird dots and lines around the text. I have no idea why this would happen. Here is an image of what it looks like: Our font class looks like this: package ...
1
vote
0answers
622 views

How to implement the server-side game loop?

The server needs to handle the physics, because all the movement will be handled by it. So for that I need a game loop. The thing is that the server doesn't have the render part, it's just a console. ...
1
vote
0answers
152 views

Aiming with a crosshair with a lot of polygons/triangles

I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ...
1
vote
0answers
109 views

How to put OpenGL in a state for drawing blended, colored, nontextured polys?

Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
1
vote
0answers
59 views

Creating transparent image with localGraphicsConfig not always working

I'm trying to use GraphicsConfiguration.createCompatibleImage to create transparent images. This creates an empty image which I'm filling with a mosaic pattern later on in the code. This seems to ...
1
vote
0answers
2k views

TileMapRenderer in libGDX not drawing anything

So I followed the tutorial on the libGDX wiki to draw Tiled maps but it doesn't seem to render anything. Here's how I setup my OrthographicCamera and load the map: camera = new ...
1
vote
0answers
329 views

How do you program the right analog stick of a controller in JInput?

I have the Left Analog Stick programmed and accepting input (moving a character around). (getCompassDir() returns the values of the cardinal directions and NONE means the stick isn't touched): // ...
1
vote
0answers
227 views

When attaching AI to a vehicle should I define all steps or try Line of Sight?

This problem is related to an intersection simulation I am building for university. I will try to make it as general as possible. I am trying to assign AI to a vehicle using the JMonkeyEngine ...
0
votes
0answers
32 views

minecraft source code for use in mods

So I am teaching a class where we will be using java to make minecraft mods. To keep things simple, we are using a third party program to set up the under-the-hood stuff for us (that way we don't have ...
0
votes
0answers
11 views

onSignInSucceeded and onSignInFailed not called (Google Play Games Services)

Using the code below, can anyone tell me why my onSignInSucceeded and onSignInFailed callbacks are not triggered when signing in? It works fine if I extend BaseGameActivity, but when trying to extend ...
0
votes
0answers
15 views

Google Play Games: onSignInFailed() and onDestroy()

I just had an error while testing my game, this is an update that I'm working on and it's never done this before (and I've launched this game on various devices literally hundreds of times, so it ...
0
votes
0answers
11 views

Android View (Splashscreen) Vanishes after phone woken up from sleep

My game uses OpenGL ES 2.0 and I have a splashscreen which uses a standard Android View. This plashscreen is shown on top of the GLSurfaceView and then simply removed once everything has been loaded ...
0
votes
0answers
30 views

Libgdx getting random position on screen is null?

So, I want to get the random position on my screen to spawn enemies on them. but here's problem. int randX = r.nextInt(screenWidth); int randY = r.nextInt(screenHeight); Apparently these are null, ...
0
votes
0answers
50 views

Create a Minimap of a Tiled Map with LIBGDX

thanks for stopping by to help! Having a little trouble with OrthogonalTiledMapRenderer. I've got a Tiled map that is 250x250 tiles, each 16x16 pixels. Trying to use a separate camera to draw a ...
0
votes
0answers
29 views

Java LWJGL - How can I click to interact with objects?

I want to be able to click on a monster to walk to him and start attacking him. The part that doesnt make sense to me is the conversion between the mouse position, and the actual terrain position. ...
0
votes
0answers
19 views

Android: ACTION_POINTER_DOWN Called Multiple Times

I hope someone can help me here My code is below and I can't figure out why the ACTION_POINTER_DOWN case is being called multiple times (sometime twice, sometimes 4 times, but always multiple times). ...
0
votes
0answers
82 views

Implementing a game loop with interpolation

I am trying to implement the Game Loop interpolated found in this website http://www.gameprogblog.com/generic-game-loop/. Here is my implementation: long frameRate = 50000000; int maxUpdates = 3; ...
0
votes
0answers
21 views

Java Slick2D Image Glow Effect

How can one achieve a dynamic glow effect in Java Slick2d? I want an image to be surrounded by a glow when I move my mouse over it for example. Example: No glow Glow Is it possible to make this ...
0
votes
0answers
26 views

Can't work with universal tween engine while having added it to gradle

I'm actually developing a game with libgdx and I'd like to create a splash screen. To do this, I must use the Universal Tween Engine. To add the Universal Tween Engine, I followed the instructions of ...
0
votes
0answers
41 views

Google Play Game Services Logcat warning

I'm getting the following warning in my LogCat output. I have implemented Google Play Games Leaderboards which, after some research, it appears this warning is related to.... I would point out ...
0
votes
0answers
27 views

Android: Asynctask causes ANR (very) intermittently

I'm doing some work on an AsyncTask (creating game objects, loading resources etc) while displaying a static splashscreen. The problem is that every now and then, the AsyncTask doesn't run and the ...
0
votes
0answers
48 views

Slick2d - Why is my init() method running twice?

In the init() method, I have called the method loadMap() from the "world" object. But it seems to be called twice. I do not want loadMap() to be called twice. I have no idea why is this happening. ...
0
votes
0answers
25 views

LibGdx - Rotate sprite with mouse

I'm trying to rotate the sprite with the mouse but nothing will happen. void mouseMove() { float angle = (float) Math.atan2(562 - Gdx.input.getY() - player.getY(), Gdx.input.getX() - ...
0
votes
0answers
33 views

Slick2D ComponentListener added to MouseOverArea not responding to right mouse clicks

I am developing a UI using Slick2D and experimenting with MouseOverArea. I have noticed that if I add a ComponentListener to my Button (which extends MouseOverArea) it only responds to left-clicks on ...
0
votes
0answers
60 views

How to draw multiple large background images using libgdx?

I have developed a basic lunar lander-style game using Slick2D and dyn4j and am now redeveloping it using libgx for various reasons. I am having problems drawing the background (i.e. everything, but ...
0
votes
0answers
27 views

Radial gradient is not transparent at edges

I have a circle drawing algorithm, which is this: public void renderCircle(int xp, int yp, int r, int color) { int[] pixels = surface.getBuffer(); for (int y = -r; y <= r; y++) { ...