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

0
votes
1answer
16 views

2D Lighting Glitch

I've been working on a game in Java, and recently I decided to try out my game on a netbook just to see how it would run. While I do get a constant and decent FPS, it appears that my lighting ...
0
votes
0answers
24 views

How does super.render() call this method?

Today I was experimenting with adding different screens with Scene2d in libgdx and while doing so I became confused how super.render() in my render() method from my starter class (MyGdxGame) called ...
0
votes
1answer
30 views

Loading non-square textures, from a 256x256 spritesheet in lwjgl(JAVA)

so I'm doing lwjgl, so far I have the loading of 16x16 textures from a 256x256 spritesheet all working, using this code to get the location of the textures: public Vector2f[] calculateUVMapping(int ...
0
votes
0answers
8 views

[LibGdx]Moving a fixture on a body

I'm working with Box2D and I have a basic platform and a box bounces off of it. // Static Platform bdef.position.set(160 / PPM, 120 / PPM); bdef.type = BodyType.StaticBody; Body b = ...
0
votes
0answers
16 views

Gdx.graphics.getDeltaTime(); Returns 0

I am coding a game in Java using Eclipse and Libgdx. I am trying to make an object move until it reaches a certain random point. I am relying on delta time to make the objects speed the same on ...
-1
votes
0answers
21 views

Java external libraries [on hold]

Hello this is a pretty straight forward question but if you made a game (and sold it to people) using OpenGL or some other external libraries would you have to pay the people who made the external ...
0
votes
0answers
8 views

LibGDX - Accelerometer Problems

I got some issues. I'm using LibGDX. When I hit an object, my Fighter is supposed to fall to the Ground. BUT, because of the Accelerometer, i can still move it up and down eventhough it died. The ...
0
votes
1answer
87 views
+100

terrain not properly rendering

I'm extending the terrain quad with resources from various tutorials and have the following code: public class WorldTerrain extends TerrainQuad { public static final String NAME = "terrain"; ...
0
votes
0answers
30 views

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
1
vote
1answer
42 views

Problem with Sprite not jumping off of platform (using rectangles for collision Detection)

When my sprite is on top of the platform, he stays on top of it, thanks to the rectangles I made for him and the ground he stands on. but when I click "jump" he does not jump most of the time. I need ...
2
votes
2answers
108 views

Implementing Mouse Lasso

I am toying around with a Boogaloopers clone (http://www.youtube.com/watch?v=zuaRi_fhdlQ). I have a small problem with the lassoing. Here's my current naive algorithm. The problem with this is that ...
0
votes
0answers
23 views

Libgdx - exception on mac [on hold]

i'm working on a game for about a month now.. it works perfectly on desktop and on android, but on the mac i'm getting an error and have no idea what to do from there.. the application starts with the ...
0
votes
1answer
86 views

GPL Game Engine - What needs to be released under GPL?

I'm hoping I can clarify this issue. Note, a similar question has been asked here, but it doesn't really give a specific enough answer that I can comprehend at this point! :- How does one escape the ...
-1
votes
0answers
46 views

Android Game Development [on hold]

I am new to android and I want to know which is the best way of developing 2d games for android? Is the best way using Canvas, ImageViews etc . Or is it better to use game engines like libGDX ...
0
votes
0answers
22 views

Libgdx project “Not Responding” when in debug mode

So the problem I am encountering is that whenever I attempt to debug my Libgdx desktop project and Android project the "app" is constantly "frozen" or "Non responding." By this I mean that I cannot ...
0
votes
2answers
64 views

Switching a project written in Lua to a compiled language

I am experimenting with game development in Lua using the Love2D framework, and while it works fine, I am getting tired of using a dynamic scripting language. I would like to have better performance, ...
1
vote
1answer
34 views

Box2DLights - the center of sprites are always 100% unlit (black) unless Xray is on

I'm using a ConeLight at 180 degrees, with this setup: pl = new ConeLight(rayHandler, 256, new Color(0.5f, 0.5f, 0.5f, 1f), 280f, 400 - x, 300 - y, 0, 180); And the object I'm casting a shadow on ...
0
votes
1answer
19 views

LibGDX how to change animations

I have a Player Class and i have 3 different Animations for it. I can render them perfectly but i don't know how to change from one animation to another. For exmaple i have 3 animations, one for ...
1
vote
0answers
29 views

Design pattern for animation sequence in LibGDX

What design pattern to use for sequence of animation that involve different actor in libGDX. For example I am making a game to choose a wolf from a group of sheeps. The first animation played when the ...
0
votes
0answers
20 views

JBullet quaternion to Euler angle conversion causes strange flipping behavior

I am making a game using JBullet (a Java port of C++'s Bullet library) for the physics and LWJGL for the graphics. However, JBullet measures angles in quaternions and LWJGL uses Euler or ...
0
votes
1answer
26 views

How can I make an soundsystem with slick?

My Question would be , how can I develop an easy-to-use Soundsystem under slick-util? Under the function a.playAsSoundEffect(1, 1, true, x, y, z); it allready works to create a static ...
-1
votes
0answers
21 views

Bukkit Config NullPointer [closed]

0 down vote favorite I am making a bukkit plugin that uses a config to store data, but when I use plugin.getConfig() I get a NullPointer. I think is it because of the reference to plugin, but how can ...
-1
votes
0answers
33 views

Quaternion Matrix Camera Example in LWJGL

Does anyone have an example of a quaternion matrix camera for use in LWJGL? I have been looking for months now and I cannot find a single complete example that contains an update function (showing how ...
1
vote
1answer
131 views

If I convert my LibGDX game to an exe, is it legal?

I have a LibGDX jar file, and I want to have it as an EXE. Would that be legal? (Using launch4j) Also, how do I obfuscate a LibGDX game?
1
vote
2answers
196 views

Is it possible to create 3d games with good performance in java? [closed]

Recently i use Javafx 8 for creating small 2D games , but i think it can't manage memory and other things very well .I see Jmonkey jmonkeyengine as a game engine for Java and i see some videos of ...
0
votes
1answer
108 views

Fixing game loop to 60fps makes animation very jittery

ns is 1000000000 / amountOfTicks; long now = System.nanoTime(); delta += (now - lastTime) / ns; lastTime = now; if (delta >= 1) { tick(glad); updates++; ...
0
votes
1answer
22 views

LibGDX - Textures rendering at wrong position

Update 2: Let me further explain my problem since I think that i didn't make it clear enough: The Y-coordinates on the bottom of my screen should be 0. Instead it is the height of my screen. That ...
0
votes
0answers
20 views

Multiple time initialize same texture

I am newbie to libgdx gaming, i have a problem to initialize the multiple images having same texture;try to do using array and i could not do,as i am very new so can help me sort out. private Image ...
0
votes
1answer
50 views

The sprite will not move in libGDX

When I ran the android application, The sprite image will not move when I press the input keys. I followed a tutorial based on input keys and wish to know what's wrong. Can anyone see what's wrong? ...
-1
votes
1answer
111 views

How do I find the tile I'm standing on?

I want to get the specific tile I am standing on. My Tiles are in an Arraylist so I can destroy them later. How can I do this? Here's my Level-class (where my Lists are): public class Level { ...
0
votes
1answer
33 views

When and how to apply affine translations to vertices of a mesh with LWJGL

So, I have a rigid body class, containing a list of vertices and a 4x4 transformation matrix. At the moment, I'm applying the transformation matrix to each vertex individually, and am unable to revert ...
0
votes
1answer
80 views

Collision Detection Algorithm With Tile Map Help

I am trying to fix the collision between my player and the tilemap that I am using to render my game. For whatever reason the collision is off when I start scrolling in the X-axis, the up and down ...
0
votes
1answer
54 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 ...
0
votes
1answer
47 views

Help with dropping items in a game [duplicate]

I am making a game where i have items or blocks stacked on top of each other. What i would like to do is, when the first item(or the item at the bottom of the stack) is removed, i would like to shift ...
1
vote
0answers
43 views

Slick2D v LibGDX: [closed]

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
32 views

Android - OpenGL ES 2 - Cube with different texture in each side

I need to create a 3d cube, with a different texture on each side. Here is my cube class, which my other classes extend: import java.nio.ByteBuffer; import java.nio.ByteOrder; import ...
0
votes
2answers
118 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
3answers
106 views

Set value in an array[3], that the sum of all three values is always 1.0

So I'm working on a Civ like game right now and want to have a setting how taxes are split in gold income, science and luxury goods. private double[] rate = new double[] { 0.4, 0.6, 0.0 }; now I ...
1
vote
1answer
37 views

Preventing diagonal movement

I was originally fine with diagonal movement but it's clashing with my sprite animation... public void keyPressed(KeyEvent e){ int key = e.getKeyCode(); switch(key){ case ...
0
votes
0answers
13 views

Help with Interactive Grid for Turn-Based-Strategy game [duplicate]

So right now I have all of the menus, and game saving/loading stuff done, but I need help creating my actual game. I have a basic idea of what I want the game to be like. But I just need help with the ...
1
vote
3answers
105 views

2D Side Scroller Game Without A TileMap

I want to create a 2D side scrolling game in a similar style as the game "Castle Crashers". (Go to: http://store.steampowered.com/app/204360/ to see some pics of the game). I have experience ...
1
vote
1answer
107 views

Is game maker studio actually flexible enough to cater to an avid programmer? [closed]

After I got burned by RPGMaker which seemed fine what with the semi-open Ruby-like engine until you encountered some nasty surprises like the draconian resolution limitations etc., I've become more ...
0
votes
1answer
92 views

Line of Sight with Bresenham

I have a simple function to determine whether an entity can see another, in a top-down tile-based game (this is actually a tiny bit more complex in my game, to determine whether to see the first ...
0
votes
1answer
34 views

Get position of Fixtures

I'm constructing a Body (a box2d body using AndEngine) using multiple Fixtures and later I need to get the world position of these Fixtures. Currently I am trying something like this; // ...
0
votes
1answer
72 views

How to efficiently change VBO size?

I have created a menu class and now I'm working on getting it to render using OpenGL's VBO's. The menu is fairly simple, it has a number of buttons, the user can press up and down to highlight the ...
0
votes
1answer
35 views

Picking a local origin as the centroid of given three points in 3D

Given three points non-collinear P, Q, R in 3D, I need a generic method to generate x', y', z' unit vectors that behave like origin of local coordinate system. x' and y' vectos should be on the plane ...
1
vote
1answer
59 views

Tilemap graphic rendering

Say i have 10 towns in my world map. the world map right now is just a very large Tilemap. I'm curious as to what the standard is. I think it would be much more efficent to have a Tilemap for each ...
2
votes
1answer
63 views

Where to implement textures for tiles?

So I just learned the basics of Java and was ready to try to create a protoype game in the style of Civ. So a tile&turn based game. I created an enum for the different tiles: public enum ...
1
vote
1answer
43 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
53 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 ...