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
2answers
636 views

How to find the entity I'm looking at?

I am currently making a mod for Minecraft but I have come to a stop because I am lacking in some knowledge. I need to get data for the entity I am looking at, which I believe requires the use vectors, ...
2
votes
1answer
230 views

Java getResourceAsStream as local resource

Before using LWJGL, I used the Graphic method, and there I displayed imageicons, and I had the picture file located in the resources. I used: ImageIcon tcard = new ...
2
votes
5answers
743 views

Add delay between player jumps

I'm developing a platformer game and have implemented jumping for the player. The player is able to jump, but holding the up arrow causes the player to continuously jump. What would be the best way to ...
2
votes
1answer
204 views

Is using the applet class in a Java game a wise thing to do?

I am making an 2D multiplayer game in Java project, by using Java sockets and simple java.applet.* Our teacher told us to use J2EE concepts in the project. Do I have to use JSP? Is it better or ...
2
votes
1answer
717 views

Slick2D, Nifty GUI listeners problem

I'm trying to get Nifty GUI to work with Slick2D. So far everything is going great, except that I can't seem to figure out how to properly interact with the GUI. I'm trying the example in the nifty ...
2
votes
2answers
1k views

How should I do 3D games through Java on a mac?

I have been self-teaching myself Java on the mac mostly because the language is cross-platform. Recently, I have been only able to develop 2D games using the Graphics2D class. Now, I want to learn ...
2
votes
2answers
894 views

Tile based map and collision; getting stuck

I'm trying to make my character move around a tile map with collisions. Everything works fine except for one thing. I show you a picture with the problem: http://i.stack.imgur.com/ZWI7x.jpg That is, ...
1
vote
2answers
215 views

Movement doesn't look smooth (slight lag)

Currently I'm using a variable time step and when the FPS drops by even a small amount you can easily notice a slight lurch forward of the player. I'm making a platformer and I'm wondering whether I ...
1
vote
2answers
350 views

How to check for cube collisions?

I want a method, which takes two "ObjectBox" objects (A "ObjectBox" has .getX() .getY() .getZ() .getSizeX() .getSizeY() .getSizeZ() methods) as a parameter and return true if the two Boxes are ...
1
vote
3answers
1k views

How can I remove enemies from my ArrayList after they have died? [duplicate]

Possible Duplicate: How do I best remove an entity from my game loop when it is dead? Right now, I have an ArrayList like this: List<Enemy> enemies = new ArrayList<Enemy>(); ...
1
vote
1answer
850 views

Moving sprites on a graph in libGDX

In my game I'd like to move sprites on a fixed path. Until this point I was trying to stick with the tools already provided by libGDX, like the Tiled map renderer classes so I'm looking for a solution ...
1
vote
1answer
2k views

LWJGL - Mixing 2D and 3D

I'm trying to mix 2D and 3D using LWJGL. I have wrote 2D little method that allow me to easily switch between 2D and 3D. protected static void make2D() { glEnable(GL_BLEND); ...
1
vote
1answer
302 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 ...
1
vote
2answers
336 views

How do we adapt our game to work over a network?

A friend of mine has made a Java version of a popular board game in Java, and has it working for multiplayer on one PC with different turns for each player. He's mentioned he wants it to eventually ...
1
vote
1answer
612 views

MMO Proxy Server

I am building an MMO and someone told me I should never have my application interfacing directly with the net, and that I should have a local proxy. This makes sense, with security issues and scaling ...
1
vote
4answers
987 views

Client server design question

I'm working on creating a multiplayer game, with the client in ActionScript and the server written in Java. I'm using XMLSocket in the client to connect to the server. The server code looks something ...
1
vote
2answers
610 views

What are some good resources on creating and reading 2D game levels in Java?

Could some resources be listed in relation to the creation and management of simplistic, efficient 2D game levels, that are available for use with Java?
0
votes
1answer
24 views

Actors (Label) not being drawn to stage [closed]

I have a weird issue that when I try to draw a Stage with only an Actor, a Label to be more precise, added to it and nothing seems to be getting drawn. This is how my setup goes: I have a Sprite ...
0
votes
2answers
160 views

Using System Time to compute delay times that correctly deal with app pauses?

In my Android app I have the requirement to introduce small (for slowing down animation) and larger delays (for the purpose of delaying the appearance of a character for example). I've experimented ...
0
votes
0answers
34 views

Bounding box should rotate - Skews instead [duplicate]

I have a method to rotate a sprite's bounding box around the center of the sprite (the sprite rotates and I need the bounding box to rotate with it. The sprite is rectangular). Instead of being ...
0
votes
1answer
69 views

Is it possible to display no white images/sprites when using the latest Android OS?

Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
0
votes
2answers
647 views

Java collision detection with rectangles

I'm trying to get the collision between two squares. I've made a Rectangle object that overlays each one and updates the position every tick. Then I made a collision method that checks whether they ...
0
votes
3answers
356 views

Tile Map World Background

I am making a 2D top-down game in Java using the Slick2D library. However, this question applies to all ways of making games of this nature. My question is: How would I do a background for the world. ...
0
votes
1answer
327 views

Get back or delete an existing OpenGL object, then change it and draw at new. How?

With OpenGL i'm drawing for example a circle. Can i take this drawn circle back out of the window and change something and then draw it back on the window? Or can i /have to delete it and then draw ...
0
votes
2answers
168 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
151 views

Gravity stops when side-collision detected [closed]

Please, look at this GIF: The label on the animation says "Move button is pressed, then released". And you can see when it's pressed (and player's getCenterY() is above wall getCenterY()), gravity ...
0
votes
3answers
285 views

GO Game, placing stones on grid intersections

I'm currently making a GO game and I am stuck on the most basic functionality. That functionality is being able to click on the intersections of the grid and ONLY the intersections to place a stone, ...
0
votes
1answer
349 views

How do I get the current location when using slick 2D library?

I'm developing a map kind of simple game using slick 2D library, and I want to get the current location of the user. When the user runs into a special location (ex: hole) to indicate that is ...
-1
votes
1answer
71 views

Grid based Collision Detection between circles [duplicate]

I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters. This is what it looks like: Currently I'm using brute force ...
-1
votes
1answer
426 views

Resource not found?

When I write in my terminal, java -jar myJar.jar, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image. My folder in my ...
-3
votes
1answer
341 views

Populating Sprites

I am making a android game, it's a tower/base defense like type of game (yea I know it is kind of confusing), I was wondering if anyone knows a good way to have the attacking sprites randomly generate ...