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
143 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
48 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
932 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
631 views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
2
votes
0answers
559 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
37 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
52 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
41 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
93 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
76 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
40 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
64 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
89 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
51 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
849 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
92 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
107 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
82 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
215 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
63 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
137 views

Drawing visible tiles - side scrolling

Currently I'm calling drawMap every time repaint is called. This is the code I've written for my drawMap method so far. public void drawMap(Graphics2D g2d) { int minOffsetX = 0, minOffsetY = 0; ...
1
vote
0answers
222 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
104 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
237 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
219 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
591 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
145 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
312 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
223 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
18 views

Display black on loading texture

While developing a game with LWJGL I hit a sudden stop with the following issue: Anytime I load a texture using Slick Util, the display stays black until i restart the application. Even when i load ...
0
votes
0answers
9 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
26 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
38 views

GPU skinning weird issue

I finally got my GPU skinning to work! (Mostly) I'm using MD5 format and this here tutorial However the weird part is that I'm getting EXACTLY the same issue as this unanswered post: here The ...
0
votes
0answers
25 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++) { ...
0
votes
0answers
12 views

Box2DLight position seems to Floor

I am creating a top down game and i'm using raycasted lights from Box2Dlights, My light is all set up and working. its attached to the player's Body, and when the player moves, the sprite I attached ...
0
votes
0answers
13 views

Unity StartApp Ad Sdk dims the screen down when showed

I'm making an android game Which Never Sleeps and it don't. But When Using Startapp ad sdk It seems that it pauses the game and the mobile sleeps when the ad is shown. As if the sdk handles it from ...
0
votes
0answers
18 views

I just can't get glg2D to work, what is wrong?

I would like to use the glg2d library for my project (I'm using eclipse) but I always get an error. First I included jogl and gluegen, and gave it the native folder, and it seemed fine, no errors. I ...
0
votes
0answers
19 views

LWJGL 3 crashing on nglDrawArrays

I have 2 classes I'm trying to use to render a triangle, and it's crashing on nglDrawArrays, the error is in the native code, and the only information I'm getting from the JVM is a native error ...
0
votes
0answers
48 views

Java Graphics performance issue when drawing transparent shapes

I've started working on a game engine for fun with no external libraries. I've started creating a simple particle system and I've come to some huge performance issues. I have the following frawing ...
0
votes
0answers
111 views

Slick2D shader crashes, but only after a while

I'm using Slick2D's ShaderProgram for shader-based drawing in my game. Some players report that after 3-10 minutes, the game inevitably crashes hard during what appears to be a setUniform4f operation ...
0
votes
0answers
23 views

Libgdx Scene2d shows White screen when executed

package com.Darth377Apps.DeepShadow; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.scenes.scene2d.*; import com.badlogic.gdx.scenes.scene2d.ui.*; import ...
0
votes
0answers
22 views

Libgdx: ModelInstance texture is not rendered on Java8

I have project based on opengl, libgdx framework. It's impossible I think, but when I switch my project from Jdk1.7 on Jdk1.8 I have problem with rendering model's texture. I have no idea how language ...
0
votes
0answers
40 views

Problem with changing font color in libgdx

I recently noticed that my version of libgdx was way out of date, so I updated from version .9.something to 1.4.1. I copied files for the project I'm working on over into a new project generated with ...
0
votes
0answers
23 views

Change a vertices and display corner of a polygon

I'm currently building a level editor for my game and i'm having some trouble on how to change vertices of a polygon. Basicly i searched the web trying to figure out how to update the vertices of a ...
0
votes
0answers
21 views

Cant Set Image Origin in Table Cell - LibGDX

I am having real issues with my Actors when placed in table cells. I would like to set center Origin to allow me to tween the scale around the center. I am aware that the Table is responsible for ...
0
votes
0answers
34 views

Dynamic VBO update possibly corrupting data?

I want to draw a line between two vertices. On a mouseclick the vertex data will change and I want to update the line to use the new values. I am using a VBO for this and it looks like the update ...