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

Location of “units” in Code

So, I've been playing around with the concept of a game, mechanically think of the Civilization games(Tile, turn-based strategy) but I am quite uncertain about where I should store the units location ...
2
votes
1answer
102 views

Avoiding memory allocation in Android game development

For obvious reasons, allocating memory on the fly in Android game development is not recommended. For example: http://developer.android.com/training/articles/perf-tips.html: There are two basic ...
0
votes
0answers
55 views

Best programming language for game development? [on hold]

Is java the best one for this job? Or is there languages better for game development?
1
vote
2answers
88 views

How to create Whirlpool/Vortex effect?

Im trying to make a Vortex effect on a Circle Body that is a Sensor. I've been looking for this and all examples i look for are in C++ or Objective C and i dont seem to translate them well. when my ...
1
vote
1answer
489 views

Including slick2d or slick-util in maven build?

I'm converting a project to lwjgl and trying to use slick-util as well. There's no slick-util maven repo anywhere (nor slick2d itself anymore). I've included local dependancies before using ...
0
votes
1answer
37 views

Per vertex diffuse lighting not propogating across entire model

I'm not sure how to describe this problem so I've added a picture. When I add per vertex diffuse lighting to my model (just a field of cubes for simplicity) the lighting effect applies to each ...
7
votes
3answers
5k views

How much is java used in 2d/3d indie games? (before/after Minecraft) [closed]

I wonder for my own use and curiosity, how popular is Java in indie game development , in 2d and 3d? Are there any good open/closed source games done in java?
0
votes
1answer
70 views

How could I implement 3D player collision with rotation in LWJGL?

I have a problem with my current collision implementation. Currently for player collision, I just use an AABB where I check if another AABB is in the way of the player, as shown in this code. (The ...
2
votes
1answer
357 views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
0
votes
1answer
52 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
40 views

What is the relationship between glVertexAttribPointer index and GLSL location?

I've been getting some strange results when trying to implement a normals buffer for the purpose of rendering lighting. It seems to be related to the indexes for glEnableVertexAttribArray, ...
1
vote
1answer
95 views

Dynamic object creation with HashMap

I want to use a HashMap to dynamically create objects based on the key. I have a Random Map Generator that stores the maps in 3D Arrays of Type Integer[][][]. Upon creation of the actual map I ...
1
vote
1answer
39 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
238 views

problem adding bumpmap to textured gluSphere in JOGL

I currently have one texture on a gluSphere that represents the Earth being displayed perfectly, but having trouble figuring out how to implement a bumpmap as well. The bumpmap resides in ...
0
votes
1answer
201 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
1
vote
1answer
95 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 ...
-1
votes
1answer
27 views

Screen flashing while window is open [on hold]

The screen renders everything in the right place but the entire screen flickers/flashes while it's open. Any Ideas? TileMapEditor class import com.stardust.main.gfx.Assets; import java.awt.Graphics; ...
0
votes
0answers
9 views

Creating bullets at tip of rotateable object? [duplicate]

I am and not very good at trigonometry or whatever it is i'm even using. My problem is that I simply cannot figure out how to create the bullets exactly at the point of my object. The object rotates ...
0
votes
0answers
6 views

Circular references in Nation-Town-Citizens chain [migrated]

Say I have three classes, Nation, Town, and Citizen. A nation contains towns, and a town contains citizens. public class Nation { Set<Town> towns; } public class Town { ...
0
votes
1answer
121 views

Playing repeated sound in Java

I'm trying to play sounds in a Java game with the following code: AudioStream audioStream = new AudioStream(stream); AudioPlayer.player.start(audioStream); The stream variable is just an ...
0
votes
1answer
34 views

TileMap not not rendering

I have a tile map that I would like to be able to move while playing the game. In the code you will see the posX and posY variables. I used these variables so that when I complete this, I can have the ...
5
votes
2answers
1k views

How To: Java Game to Steam Greenlight

I am planning to create an indie game using Java and Eclipse IDE and I want to put the finished product to Steam Greenlight. How does the whole process work after the game is finished and running ...
1
vote
1answer
45 views

Rotating an object to point towards the mouse [duplicate]

I'm using slick2d for this process and trying to rotate a minigun to face the mouse. My problem is that the minigun in my game is actually rotating but no towards the mouse at all! Also, the minigun ...
1
vote
1answer
61 views

IBO interfering with VBO data?

I have a vertex and color VBO that render a plane (2 triangles) just fine. However, when I attempt to use an IBO to render the plane, the vertices are completely off. My nice square looks all crumpled ...
0
votes
1answer
30 views

Using IBO's with color

I am trying to familiarize myself with IBO's by drawing triangles etc but I'm finding no way to get the color to apply properly. Can I not use an IBO to index the color values as well? I am having ...
0
votes
0answers
19 views

How do I create a java library that is dependent upon another library? [closed]

Hello everyone, I am creating my own java library to help me when creating games. this library is just for personal development. however, some of the commands within the libarary are ...
1
vote
1answer
65 views

Smooth anmiation with LibGDX

I want to move a enemy from its current position toward the mouse position in LibGDX. x, y - enemy position saveX, saveY - position where my enemy need to go(or mouse position saved at specific ...
0
votes
0answers
23 views

Java - Slick - White Screen when loading a TileMap [closed]

I'm trying to load and display a tile map i created, sadly it keep showing up as a white screen.... What am i doing wrong? I'm not getting any errors in the console, so that's a start... The ...
0
votes
0answers
56 views

libgdx building 3D terrain

I've been spending a lot of my time working with libgdx scene 2d & have become very familiar with it. I've decided I want to move over to 3D & take a couple of weeks to learn & better ...
1
vote
1answer
99 views

Get the game state using Multithreading in Java Monkey Engine 3

I’ve been trying out Java Monkey’s multi threading recently via the wiki’s tutorial. Since I just wanted to test a prototype clinet, I made a program which creates some cubes using the ‘Cubes’ library ...
1
vote
0answers
53 views

How do I port a game to low-end phones?

I'm creating a 2D game using Unity. My intention is to have separate SD and HD versions of the game for Android and iPhone. However, it makes sense for me (due to information I have about my target ...
1
vote
0answers
36 views

Why does my texture-based object picking detect the wrong object?

I am a LibGDX beginner implementing a RISK-like game. I want to let the player select territories by clicking on them, but for some reason, the wrong territory is sometimes detected. The clicked ...
0
votes
0answers
23 views

Retreive boolean value from server in Java [closed]

In my game, the server generates a random 3 digit number which the client should guess. I have already written the server and client code. For the loop termination in both sides I use a boolean ...
0
votes
2answers
123 views

Recommended approach for event system in Java

What are the recommended approaches for an event system of a turn-based RPG's battle engine? The system I'm currently working on has a runEvent method that sorts the actions queue based on their ...
0
votes
1answer
43 views

Mouse coordinate conversion Libgdx

I have a camera: //Map is a my object that wrapper of TiledMap class In the create method: this.renderer=new OrthogonalTiledMapRenderer(this.map.getMap(); this.camera=new OrthographicCamera(); ...
2
votes
0answers
30 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 ...
0
votes
1answer
33 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
60 views

Moving a tiled map in a jframe

I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
2
votes
1answer
61 views

Edit spawn location according to vector direction

I'm trying to make a turret in Bukkit (Java). This will shoot an arrow to the players that are in the shooting radius. But now I've a little problem, the arrow gets stuck inside the block where its ...
0
votes
1answer
78 views

Slick2D: Animation not being parsed from spritesheet correctly

I have a 960x960 spritesheet with each tile being 192x192. I initialized my spritesheet and animation like so: spritesheet = new SpriteSheet("resources/spritesheets/player.png", 192, 192); ...
1
vote
1answer
150 views

Multiple enemy array in LibGDX

I am trying to make a multiple enemy array, where every 30 secods a new bullet comes from a random point. And if the bullet is clicked it should disapear and a pop like an explosion should appear. And ...
1
vote
1answer
118 views

Java Slick2d Animation not working

Hello everyone I am trying to make a simple 2d game using java and the slick2d library. this is my first time doing it and i need some help. Right now I am trying to make the Animations for the ...
0
votes
2answers
153 views

How do I make an 8 bit sprite sheet using GIMP or Paint.NET?

I'm looking to create a sprite sheet for an 8 bit, 2D RPG I'm making. All I need to do at the moment is render in some textures. To do this, I want to make an 8x8 sprite sheet. Now, I am really bad at ...
0
votes
1answer
63 views

Box2D object wont move until tons of force is used

Im making a game for android im using LibGDX and Jbox2D it is a space flying exploration game controlled with the accelerometer. so I have set the world to no have no gravity. the objects in Box2D ...
0
votes
2answers
162 views

OpenGL ES 2 jittery camera movement

First of all, I am aware that there's no camera in OpenGL (ES 2), but from my understanding proper manipulation of the projection matrix can simulate the concept of a camera. What I'm trying to do ...
0
votes
2answers
470 views

How do I add an image inside a rectangle or a circle in JavaFX?

Suppose we have a rectangle called r Rectangle r = new Rectangle(40, 20); and an image called image Image image = new Image("...src for image"); How do I fit the image inside the rectangle? ...
0
votes
1answer
317 views

Java Slick2D - Problem using ScalableGame class

I am having a problem adjusting the size of the screen while using the ScalableGame class from the Slick2D library. I would like the background and objects (images and graphic shapes) to adjust to ...
0
votes
2answers
331 views

Is this Rotation Matrix correct?

I'm having heavly troubles with setting up a View Matrix and a Projection Matrix. It simply doesnt work. So I think my problem is related to my rotationMatrix function. I'm using this tutorial to ...
0
votes
2answers
990 views

Perspective camera for 2D

I'm very new to LibGDX and I'm trying to use DecalBatch with PerspectiveCamera, simply to have Z-coordinate for my sprites, as SpriteBatch does not offer that. However, I don't know how to calculate ...
1
vote
1answer
63 views

How can I do a weighted cascade down a path in a 3D environment?

I am trying to perform a weighted cascade down a path in a 3D environment. Now, what I am trying to do is have one object(a cube) in the environment scan from its coords 1 in every direction for ...