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
0answers
11 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
19 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
18 views

Bukkit Config NullPointer [on hold]

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 ...
0
votes
0answers
19 views

Collision detection in slick [on hold]

I tried to play a little around with slick in Java. My map which I created in tiled looks like this I only have those two different tiles and the black ones got the "blocked" property. The black ...
-1
votes
0answers
32 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
111 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
191 views

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

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
96 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
39 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? ...
0
votes
1answer
105 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
31 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
73 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
51 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
40 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
25 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
1answer
34 views

Android - 3d view with object picking, dynamid textures and camera changing [on hold]

I need in an application to add a 3D viewport inside an activity, together with some other buttons. I need the viewport to allow object picking, so user can click on objects, dynamically changing ...
0
votes
2answers
113 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
104 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
34 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
11 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
94 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
99 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
89 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
69 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
34 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
57 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
47 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 ...
1
vote
1answer
196 views

How do I efficiently collide and match groups of coloured circles?

I am new to game programming and working on clone of this game in libgdx. The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
0
votes
1answer
30 views

Master sound volume in LibGDX

I have been searching everywhere for master volume for sound and music in LibGDX but to no avail. Can anyone tell me if it is implemented somewhere or do i need to implement such functionality myself? ...
0
votes
0answers
17 views

Slick2D changing image's color with drawFlash and using alpha

I have an image, where I have a round soft white feathered ball in the center of it. I plan to use it for my lighting in my 2D game. I could not find any proper way to drawing lighting with many ...
1
vote
1answer
142 views

How should I implement the “Observer” pattern with respect to a game world?

I'm thinking of ways to implement the Observer pattern in a game I'm developing at the moment. I can have a Game World (local map) with Game Objects (player, NPCs, monsters etc...) inside of it. Other ...
0
votes
0answers
26 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
1
vote
1answer
41 views

Daily Unlock in LibGDX

I am trying to make a game that is a collection of mini games. The mini games will unlock daily. There are story for each day. And the story cannot be repeated so for example the player start playing ...
1
vote
1answer
31 views

In JBox2d when dragging a Body, why is the direction is flipped vertically?

Why is it when I drag a JBox2d Body with the mouse, the vertical component is flipped? e.g. If I drag down-right, the Body moves up-right. Is this expected behaviour, a bug in JBox2D, a Mac ...
0
votes
1answer
118 views

Smoothing Pathfinding on Tile-Based Terrain but Free-Roaming Player

I'm sorry if this is a long post, but I feel as though the details should help clarify gray areas. I'll try and provide a detailed layout of what I'm trying to achieve, what I have so far, and where ...
0
votes
2answers
136 views

Avoid threads/multithreading [closed]

So here is the thing: I have made a thread for each generator an outpost has. We have a total of 6 outposts , 5 generators each. 3 teams, engineers can only repair generators and prevent their ...
0
votes
1answer
92 views

TiledMap not drawing completely

While attempting to constrain camera scrolling to within the TiledMap I discovered that it seems the renderer for the map is not drawing the entire map. The map is 1600x960px so one would assume the ...
2
votes
1answer
78 views

Processing move between tiles with an animation in isometric map

In my isometric map, entities can only be in the center of the floor tile. So it's tile per position. This is my map with an entity: Entity can either move forward, left, or right. Where forward ...
2
votes
1answer
84 views

Drawing tile images with bigger height on floor tiles on 2.5D isometric map

Hello I am creating my first isometric game. I have floor tiles which are 112*56 in size. This is a simple strategy game I am making, it's an existing game, I just copied the idea for practice since ...
0
votes
1answer
71 views

Array of map data

I'm looking for your thoughts on the best way to store map data. I need to store data for territory ownership for each pixel on the map. The data for each pixel is as such: Player 1 points: 24 ...
0
votes
1answer
91 views

AI / Pathfinding gets stuck

In my tile-based game, I'm using a A-star algorithm, which I have not written myself but I believe should be correctly implemented. The problem I have is that the enemy AI can get stuck so that the ...
0
votes
3answers
102 views

What is the easiest way to make an object follow the edge of a sprite?

I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
0
votes
0answers
23 views

How to render multiple VBOs in LWJGL

I'm still trying to grasp the understanding of VBOs. When you create the floatbuffer, I was told if you keep adding to the put, you would get more points for a shape with more points. My problem is, I ...
0
votes
2answers
44 views

LibGDX Images not loading

Now my Image isn't loading to the screen. I tried to be decorative with the code but since it isn't working I made it just like the video I'm whatching. I don't get any exceptions, but the image ...