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

2D Software Lighting Issues in Java

I'm creating a 2D top-down tiled game in pure Java and by now I'm trying to implement a way to do lighting. First, some details on how I render: there is a screen class which handles all the ...
0
votes
1answer
21 views

Slick2D and TileD

I've been learning Java for a while, and with my aims of being a game developer later in life, I've came across Slick2D+lwjgl and following tutorials and making some little things. However; I don't ...
-1
votes
0answers
34 views

Should I use Java, HTML5, or Unity 3D for my Game? [closed]

I am developing a game and I would like the game to be available on the iPad, Android Tablets, Mac, and Windows. I've already began developing the game in Java, which will ensure support for the ...
-1
votes
0answers
16 views

Checking collision between Rectangle and Shape

In my game the player uses a Rectangle for his bounding box, he can do this because I only need to rotate the player image and not the acctual rectangle but for a eletric beam that one of the bosses ...
0
votes
0answers
11 views

How to unbind a sprite in an updating vector? LIBGDX framework

How to unbind an updating vector to a sprite? I am using Libgdx framework. here is my code public class VectorSample extends GDX_TEST implements InputProcessor { Texture ball,bullet,guider; ...
1
vote
0answers
43 views

What to pass to scripting

I am using Java and libgdx to create a game and have decided to go a data driven approaching with Jython for this refactoring (just picked up Jython, have used Java for a while). The game is a ...
-2
votes
0answers
50 views

How to Fix Choppy Movement

I've just started game programming yesterday, reading things here and there on the internet, and I've been testing the java 2D API. The code below does basically what I want it to (move the red ...
-2
votes
0answers
37 views

andengine Tower Defence game - Enemy<-Weapon interaction

What is the most correct from the performance point of view - algorithm of interaction between Enemy and Weapon(bullet maybe more correct here) ? Should every sprite every single bullet check for ...
-2
votes
0answers
94 views

What do game developers use to prevent modding of games that use JIT programming languages?

Before I explain, this is not a "What programming language should I use?" question. So, mods can be a major problem, you see I don't want to make a game someone could easily hack and win every round, ...
-1
votes
1answer
238 views

How compatible is OpenAL?

I'm making a game that needs sounds and LWJGL uses OpenAL. I was wondering out of 1.0, 1.1, C 1.0 and C 1.1 which would be the best to pick? I don't know what the C is but it's there in LWJGL :). My ...
-1
votes
0answers
28 views

How to keep track of objects inside bullet physics to add/remove them

I am working on a program that will have alot of boxes. As the player moves through the space I will use bulletphysics to check for collision using the ghost object. How can I track the many objects ...
-1
votes
1answer
61 views

How would you program sprite movement in a 2-D ariel view rpg game?

I'm relatively new to programming and I have recently programmed an RPG game in java. Any tips on character movement with animations? I would like it to be similar to those of other rpg games such as ...
-1
votes
1answer
51 views

Get distance between the edge of screen and a moving sprite

How to get the distance between the edge of the screen and a vector moving sprite? I want to get the distance between my moving sprite and the edge of the screen so that when my sprite touches the ...
0
votes
1answer
63 views

Would it be inefficient to call LWJGL from C++?

I like LWJGL, but Java? Not so much. I recently found out a way to call Java methods from C++. But would this be inefficient? I mean, calling a C/C++ DLL from Java, just to be called back again into ...
0
votes
1answer
254 views

LibGDX 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 ...
8
votes
2answers
380 views

How can a desktop Java game be distributed without a Java runtime dependency?

Is it possible to turn a Java application into a standalone package that runs "out of the box"? The end user should not be required to install any Java JRE, nor should the installer contain a JRE and ...
-2
votes
4answers
156 views

Making 2D Games [closed]

I am starting out on making my own games. I am very interested in making 2D side scrolling games, such as SNES/Mega Drive games and eventually I want to create my own Metroid/Cave Story inspired game. ...
1
vote
1answer
39 views

Can't get Depth testing to work (cube faces shine through)

I'm making my first steps with OpenGL with LWJGL. I am currenlty constructing a... wait for it... CUBE. Quite creative... Up to now i made it to three of its faces and thats where the Problems began. ...
0
votes
1answer
171 views

Pokémon character turning / facing: How is it achieved? Movement is already done though [closed]

You know that when the player playing Pokémon games want to change the facing of the main character, one would simply tap on the directional pad (D-pad) on the Game Boy (Color/Advanced/Advanced SP) or ...
2
votes
2answers
294 views

How do I get the touch event on a body in Box2d(Java)

I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition of ...
1
vote
0answers
48 views

Steering behaviour

So I found this steering behaviour code in a book but i dont really understand the last part of the code what exactly is he doing because im unfamiliar with c++. Why would you need to ...
-2
votes
0answers
71 views

Game development update for newbie [closed]

I know many topics been here before but i think mine will be the most updated question. I want to start on game development, my target platform is android. I have experienced in web desktop and ...
2
votes
1answer
167 views

Android Virtual Pet Gameloop

Hello I'm looking for a bit of advice in which way is the best to proceed creating my applications 'gameloop' - It doesn't want to be a game loop in the truest sense since I'm not really rendering any ...
0
votes
1answer
383 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 ...
1
vote
0answers
56 views

JMonkey - Create health bar?

How can I create a health bar in JMonkey? Is there some documentation that can help? I am working on a game, specifically “Battleship”, using the JMonkey Engine (JME3). I want to add health bars on ...
2
votes
2answers
264 views

Detecting collision between ball (circle) and brick(rectangle)?

Ok so this is for a small uni project. My lecturer provided me with a framework for a simple brickbreaker game. I am currently trying to overcome to problem of detecting a collision between the two ...
1
vote
6answers
402 views

Avoiding constant IF checks for loops

As an example, I have 3 different loops that are executed in certain conditions. I want to know if there's any way short of something like this: if(day) x++; else if(night) y++; else z++; ...
-2
votes
2answers
61 views

Using Win32 and OpenGL in game loop? [closed]

I'm making a Java game library (too many problems with the existing ones) and I'm building the win64 native right now. In the native I need to handle the window, OpenGL contexts, and advanced ...
0
votes
2answers
440 views

Rendering another screen on top of main game screen in fullscreen mode

my game runs in fullscreen mode and uses active rendering. The graphics are drawn on the fullscreen window in each game loop: public void render() { Window w = ...
-2
votes
1answer
74 views

Slick game adding enemies towards the player [closed]

I'm beginner in java games, and this is my first time using Slick! I followed the thenewboston tutorials to code my game. My game is about a princess lost in a maze, on her way she finds bugs coming ...
0
votes
1answer
276 views

Player position triggering teleports

I'm developing a Minecraft plugin (bukkit) in which a server admin can create 'portals' - a small region that will teleport any players who enter it. I have the teleportation sorted and I know how I ...
1
vote
2answers
344 views

Why are my game ticks longer than expected?

I was working on my game, adding stuff to it, when I noticed my ticks were in the low 50's when I had set it to do a constant 60. This is my run method. public void run() { init(); long ...
0
votes
1answer
111 views

Pick and Drop the Ball Testing Without Replicating the Physics Frame

I am making a program that pick, drag, and drop the ball. In real life, once you pick the ball and drop it, whenever the available object is (what you see is what you get) will only be picked and ...
7
votes
3answers
3k 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?
1
vote
1answer
164 views

How do I export my Blender model to OGRE XML format for jMonkeyEngine 3?

I'm an amateur software engineer with several simple 2D-game projects under my belt. I'v recently turned my attention towards creating a basic 3D game, nothing too fancy, just to get a grip on things. ...
1
vote
0answers
67 views

How to implement a multi-platform Java 2D game engine's graphics?

I'm not sure whether this question should be posted here. I'm trying to make a basic generic game engine in Java. Here's what I have so far. public abstract class Device { public abstract void ...
0
votes
1answer
73 views

My logic in collision detection in diagonal code correct? [closed]

I made this code to detect collision from the diagonal(top left). I'm trying to find the problem on what I'm doing wrong. Is it necessary to have a diagonal collision for the wall? Player class: ...
-2
votes
0answers
36 views

Catapult projectile math [duplicate]

I'm trying to make a catapult that will attack enemies as they approach a castle but I have only a foggy idea on how to get the math correct for the projectile to travel from the catapult, to the ...
-2
votes
0answers
31 views

Slick2d: Fullscreen display resolution problem

My computer screen size is: 1920*1080 Problem is when this code: try{ AppGameContainer app=new AppGameContainer(new Game()); app.setDisplayMode(1920, 1080, true); ...
0
votes
2answers
118 views

sprite animation system height recalculating has some issues

Basically, the way it works is that it update the frame to show every let's say 24 ticks and every time the frame update, it recalculates the height and width of the new sprite to render so that my ...
1
vote
1answer
68 views

Detecting collision with a 3D array of boxes

I am at the stage of my development process where I want to implement collision. Now I can think of a simple way of doing it, if the camera's x, y or z are inside the position of a certain cube then ...
-1
votes
0answers
61 views

OpenGL 2D Screen to 3D World

I'm in the process of making a block voxel game (not minecraft clone) and I now need to be able find which block I am looking at. I've come across two methods: Ray tracing and gluUnProject I found a ...
-2
votes
0answers
33 views

KeyListener with CardLayout [closed]

I want to creat a simple game but I'm having problems with KeyListener. public class Vliegtuig { private int XPositie,YPositie, XSnelheid, YSnelheid; ImageIcon vliegtuigrechts, ...
0
votes
2answers
141 views

best structure to handle entities in an entity component based game engine

I am trying to develop a 2D entity component based game with multiple layers as tilemaps (front or back from the scene). I currently handle the tilemap layers in a 3 dimension array[z][y][x]. Each ...
0
votes
5answers
311 views

Does Java support OpenGL by itself?

Note: This is long but I explaining everything that you need to know. Don't read half way through it and say "What's the question?". It's simple but long and I need help as soon as possible. So I ...
1
vote
1answer
47 views

Jogl2 won't accept jogl 1.0 code - GL_LIGHTING and GL_LIGHT_MODEL_AMBIENT cannot be resolved or is not a field?

I'm trying to run my code on jogl 2.0 , for the first time (until now I worked with jogl 1.0) however Eclipse throws to almost every that I have a "cannot be resolved or is not a field" message . ...
1
vote
2answers
100 views

Java looking in wrong directory for XML [closed]

I found this suggestion on a Stack Exchange site to print out what the current directory is: File file = new File("."); for(String fileNames : file.list()) System.out.println(fileNames); ...
7
votes
1answer
214 views

When and why is a Pool class needed to hold objects?

I've been studying opengl es and an example I saw was using a "Pool" class to keep track of touch and keyboard events. Could someone please explain how and why a pool class is needed. From what I was ...
-1
votes
1answer
68 views

How can one make multiple movable images in OpenGL ES 2.0? [closed]

I was wondering, I've only seen examples of OpenGL ES 2.0 where people have used one or perhaps two images. I didn't see multiple images of where they each had independent movement. What if someone ...
0
votes
0answers
125 views

Pac-man animation

So for my intro to java class we need to re create this. http://people.highline.edu/tostrander/142/demo/pacman.htm We need to use only the Java.awt package so I figure to make the pacman I need to ...

1 2 3 4 5 21