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

Java2D Shooting in a line tangent to mouse coordinates

I am making a top down shooter in Java and I need to be able to shoot in a line tangent to the mouse coordinates. In other words I need to be able to click my mouse and have a projectile spawn from my ...
0
votes
1answer
84 views

Which input event is suitable for this game?

I am trying to clone this game: http://www.ferryhalim.com/orisinal/g3/bells.htm As i am using libgdx, so the game is both for Android and PC. I was wondering which input event would fit in nicely. ...
0
votes
1answer
54 views

Rendering tilemaps at a specific position libgdx

I'm making an endless side scroller game like gravity guy with libgdx. To test this I'm just creating two tiled maps with the same .tmx file to render then one after another, like: ...
0
votes
1answer
161 views

How do I decompile Minecraft?

I'm trying to get started modding Minecraft. I opened up the minecraft.jar file in Eclipse, but it doesn't contain what I expected. In this tutorial the presenter decompiles minecraft.jar and finds ...
0
votes
1answer
90 views

Making Player Jump

I have been editing a piece of code and I have already implemented gravity so I would like to know how i could make the player jump when the screen is touched. I would like the player bucket to jump. ...
-1
votes
0answers
31 views

Parallax runner game obstacles AndEngine

Hi I recently started making an AndEngine runner game so for that as you guessed I need AutoParallax background so the screen would be moving all the time. I know how to do that part but what I want ...
-1
votes
0answers
280 views

JMonkeyEngine: Error in collision detection between terrain and rays

I have the following code, this is a basic setup to allow terrain edditing by mouse later on: public void simpleInitApp() { flyCam.setMoveSpeed(50); terrain = new WorldTerrain(this); ...
-1
votes
4answers
88 views

Shooting based off mouse position [duplicate]

I'm trying to shoot bullets where the mouse is aiming using one image as a test. I'm trying to get the mechanics like this I have some kind of algorithm to handle that but the results arn't too ...
0
votes
1answer
38 views

How do I draw a line using jme3.scene.shape.Line in JMonkeyEngine 3.0?

I can successfully create the object, but it can't be attached to the rootNode. What can I do to make the line appear? I'll also would like to know how to reverse the effect(making it disappear) ...
0
votes
1answer
31 views

LibGDX ShapeRenderer rotated

I'm having a weird problem with the LibGDX ShapeRenderer where it draws everything rotated. Here are some images to show you what i mean: This is what it looks like in Tiled(Map Editor): This is ...
0
votes
1answer
34 views

Setting bounds to a label in libgdx

textStyle = new LabelStyle(); textStyle.font = font; textStyle.fontColor=Color.GREEN; EnterTextCasheir= new Label("",textStyle); EnterTextCasheir.setBounds(AssetsHelper.convertWidth(158), ...
0
votes
0answers
73 views

Proper way to load pixel art textures for 2D graphics

I am working on developing a game using LWJGL which is the java bindings for OpenGl. I have just finished the code for loading and animating sprite sheets using a png and xml file. When the texture ...
0
votes
1answer
60 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
1answer
49 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
42 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
22 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
50 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 ...
0
votes
1answer
22 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
2answers
252 views

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
40 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 ...
0
votes
1answer
58 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
124 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
1answer
98 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 ...
0
votes
0answers
32 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
81 views

Switching a project written in Lua to a compiled language [closed]

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
57 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
35 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
1answer
55 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
34 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
36 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
vote
1answer
154 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
215 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
130 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
46 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
1answer
84 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
120 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
42 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
56 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
51 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
101 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
78 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
131 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
109 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 ...
2
votes
1answer
189 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
14 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
123 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
126 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
109 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
40 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
76 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 ...