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

2
votes
1answer
2k views

Algorithm for procedural city generation? [closed]

I am planning on making a (simple) procedural city generator using Java. I need ideas on whan algorithm to use for the layout, and the actual buildings. The city will mostly have skyscrapers, not ...
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
2answers
3k views

How to add text box in slick2d?

I wanted to let the player rename the character of my game. So I thought that making a text box and when he clicks the ok button, the text inside the text box will make it to a string and render it on ...
1
vote
2answers
753 views

How to implement a birds eye view of 2D Grid Map using Android

I'm a true beginner with using the android platform and I'm having difficulties on implementing a 2D grid system for a tower defense type game. Where I can place towers on a specific tile and enemies ...
2
votes
3answers
1k views

Alternatives to Component Based Architecture?

Usually when I develop a game I will use an architecture like what you see below. What other architectures are popular for simple game development? I'm concerned about having a narrow view of what ...
4
votes
4answers
715 views

Point of contact of 2 OBBs?

I'm working on the physics for my GTA2-like game so I can learn more about game physics. The collision detection and resolution are working great. I'm now just unsure how to compute the point of ...
1
vote
1answer
113 views

How do I draw a scene with 2 nested frames

I have been trying for long time to figure out this: I have loaded a model from a directx file (I am using opengl and Java) the model have a hierarchical system of nested reference frames (there are ...
0
votes
1answer
810 views

How handle nifty initialization in a Slick2D state based game?

I'm using Slick2D and Nifty GUI. I decided to use a state based approach for my game and since i want to use Nifty GUI, i use the classes NiftyStateBasedGame for the main and ...
5
votes
1answer
337 views

Move penetrating OBB out of another OBB to resolve collision

I'm working on collision resolution for my game. I just need a good way to get an object out of another object if it gets stuck. In this case a car. Here is a typical scenario. The red car is in ...
-1
votes
1answer
528 views

Get coordinates of arraylist

Here's my map class: public class map{ public static final int CLEAR = 0; public static final ArrayList<Integer> STONE = new ArrayList<Integer>(); public static final int GRASS = 2; ...
0
votes
1answer
116 views

Is there any map maker for javaME game? [closed]

For the past two weeks I was trying to make a map maker for my java ME 2D RPG game. I failed because i get errors using slick TWL and the forum for this is inactive. So I just wondered is there ...
1
vote
1answer
140 views

Help with Collision Resolution?

I'm trying to learn about physics by trying to make a simplified GTA 2 clone. My only problem is collision resolution. Everything else works great. I have a rigid body class and from there cars and ...
1
vote
1answer
42 views

what is the best way to make a bunch of platforms appear randomly on a JFrame but close enough the player can reach them?

Hi I'm trying to make a screen that will have a bunch of platforms that will place themselves randomly around a JFrame. I know how to do the stuff to make the character jump and to deal with the ...
1
vote
3answers
1k views

How to Handle frame rates and synchronizing screen repaints

I would first off say sorry if the title is worded incorrectly. Okay now let me give the scenario I'm creating a 2 player fighting game, An average battle will include a Map (moving/still) and 2 ...
2
votes
5answers
589 views

Is It More Efficient To Make Games In Languages I Like?

Is it more "efficient" to develop games with languages you're good with and like best rather then the "best" language? For example: I like C# (It's My First Language) and I'm really good at it and ...
2
votes
1answer
133 views

How to manage my model

I have in my model, a list of Classes : Player, NonPlayerCharacter, Monster, Item, NonMovableItem etc With AndEngine I've a list of sprite for each piece of my model, How can I manage the ...
1
vote
1answer
488 views

How to make this game loop deterministic

I am using the following game loop for my pacman clone: long prevTime = System.currentTimeMillis(); while (running) { long curTime = System.currentTimeMillis(); float ...
1
vote
1answer
285 views

Java game object pool management

Currently I am using arrays to handle all of my game objects in the game I am making, and I know how terrible this is for performance. My question is what is the best way to handle game objects and ...
0
votes
1answer
241 views

Index out of bounds, Java bukkit plugin

I'm getting index out of bounds errors in my Bukkit plugin, and it's really beginning to piss me off... I for the life of me can't figure this issue out! Caused by: ...
3
votes
3answers
397 views

How to choose cell to put entity in in an uniform grid used for broad phase collision detection?

I'm trying to implement the broad phase of my collision detection algorithm. My game is an arcade game with lot of moving entities in an open space with relatively equivalent sizes. Regarding the ...
2
votes
0answers
589 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 ...
3
votes
1answer
360 views

Moving the jBullet collision body to with the player object

I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
1
vote
1answer
679 views

Random Movement for multiple entities

I have this code for a arraylist of entities. All the entities use the same random and so all of them move in the same direction. How can I change it so it generates a new random number for each ...
3
votes
1answer
2k views

How a “Collision System” should be implemented?

My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do collision ...
0
votes
3answers
283 views

ArrayList of Entites Random Movement [closed]

I have an arraylist of entites that I want to move randomly. No matter what I do, they won't move. Here is my female class: import java.awt.Graphics2D; import java.awt.Image; import ...
3
votes
2answers
241 views

Android Array Lag?

I am making a platform game for Android. It is sort of a tile based game. I added bullets and enemies with AI and a bunch of tile types. I created a simple map with no Enemies. Everything was running ...
0
votes
2answers
197 views

Draw Rectangle To All Dimensions of Image

I have some rudimentary collision code: public class Collision { static boolean isColliding = false; static Rectangle player; static Rectangle female; public static void collision(){ Rectangle ...
0
votes
1answer
695 views

Platform game collisions with Block

I am trying to create a platform game and doing wrong collision detection with the blocks. Here's my code // Variables GTimer jump = new GTimer(1000); boolean onground = true; // The update method ...
1
vote
1answer
485 views

Rotating a cube using jBullet collisions

How would one go about rotating/flipping a cube with the physics of jBullet? Here is my Draw method for my cube object: public void Draw() { // center point posX, posY, posZ float ...
3
votes
1answer
602 views

How can I set the rotation of a shape to the same as my image?

The way you set rotations of images is different from setting shape rotations. So how can I make the shape have the same rotation as my image? This is how my image rotates: ...
1
vote
1answer
368 views

Fixing a collision detection bug in Slick2D

My game has a bug with collision detection. If you go against the wall and tap forward/back sometimes the game thinks the speed you travelled at is 0 and the game doesn't know how to get you out of ...
3
votes
1answer
496 views

Best way to Draw a cube for 3D Picking on a specific face

Currently I am drawing a cube for a game that I am making and the cube draw method is below. My question is, what is the best way to draw a cube and to be able to easily find the face that the cursor ...
2
votes
1answer
136 views

How to decide face side of sprite

I am just starting game-dev with slick2D and marte engine. When I move my sprite left and right, I am doing walk animation but when the key is released how can I decide in which side the sprite face ...
0
votes
1answer
187 views

jBullet Collision/Physics not working as expected

Below is the code for one of my objects in the game I am creating (yes although this is a cube, I am not making anything remotely like MineCraft), and my issue is I while the cube will display and is ...
0
votes
1answer
556 views

Draw Cards and Eliminate Cards Problem

I am having a problem in this question. I want a system inside a game wherein the player draws 2 cards randomly, and the enemy draws 2 cards randomly. Then, what the program does is to print out to ...
0
votes
1answer
825 views

How can I achieve this lighting with OpenGL?

I'm currently trying to implement a type of "smooth" lighting. How can I achieve lighting which looks like this: http://dl.dropbox.com/u/1668516/concept/warp3.png Using OpenGl. I've attempted to use ...
1
vote
5answers
856 views

Error in my Separating Axis Theorem collision code [closed]

EDIT 2: Made some more alterations, now the one area i'm still confused on is: how to work out the vector to project on the separation axes? My projectOnto(..) method has some huge gaps now and i know ...
9
votes
3answers
502 views

Having a list of rooms with theirs connection to each other, how do I find isolated room groups?

I'm trying to create a small roguelike and went as far as random generating rooms and corridors. Each room is an instanced object and contain an arraylist of the others rooms connected by a corridor. ...
1
vote
1answer
806 views

AndEngine player, background and camera

I'm developing a 2D shooter using AndEngine. At the moment I'm trying to make the camera follow the player. As I've understood the common approach is to use the SmoothCamera zooming it and setting the ...
1
vote
2answers
612 views

How do I add AndEngine documentation in Eclipse?

I am very new to AndEngine. I have just downloaded the full documentation file, but I can't attach it to Eclipse. How can I do that?
1
vote
1answer
2k views

Making an efficient collision detection system

I'm very new to game development (just started 3 months ago) and I'm learning through creating a game engine. It's located here. In terms of collision, I know only brute-force detection, in which ...
5
votes
2answers
1k views

Sprite batching in OpenGL

I've got a JAVA based game with an OpenGL rendering front that is drawing a large amount of sprites every frame (during testing it peaked at 700). Now this game is completely unoptimized. There is no ...
1
vote
1answer
499 views

Color based collision detection

I am making a game where you fly a ship around some randomly generated planets. Since I am using a for loop to draw over 5000 planets, using the rectangle class or an oval-type class for this is not ...
0
votes
2answers
595 views

Logic behind a checkers game? [closed]

I'm starting to make a checkers game and I've got all my graphics + the board drawn. Before I moved on to creating the pieces I was wondering what an easy way to tackle the logic side of the movement ...
1
vote
2answers
271 views

How should I generate and store the boundries of a cave?

I am making a small cave copter game (seriously, where did this type of game come from anyway) and I am trying to figure out how to make and store the procedural generated walls. I am thinking about ...
1
vote
4answers
289 views

Knowing state of game in real time

I'm trying to code a tic tac toe game in java and I need help figuring out how to efficiently and without freezing the program check if someone won the game. I'm only in the design stages now, I ...
2
votes
2answers
750 views

Game Database Connectivity Java

I'm developing a simple multi-player puzzle game in Java. Both players should be able to view the same game board on his own computer. Then, when one player makes an action in the game (ex. drags an ...
10
votes
3answers
974 views

Is there any relation between Game Theory and Game Development?

I'm a Java programmer interested to learn games on Java, recently I looked on a book on Operations Research written by Wayne L.Winston. There is a topic on Game Theory. It's truly mathematical. I'm ...
2
votes
1answer
133 views

Uniform not being applied to proper mesh [closed]

Ok, I got some code, and you select blocks on a grid. The selection works. I can modify the blocks to be raised when selected and the correct one shows. I set a color which I use in the shader. ...
0
votes
2answers
639 views

Circle physics and collision using vectors

This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want ...