Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
0
votes
1answer
22 views
sprite array problem with initialization
I have a problem with my Sprites. I'm trying to create a lot of Sprites. However, I got a problem in that I have several grass tiles and I don't want to do this
grass1 = new Sprite...;
grass2 = new ...
-1
votes
0answers
15 views
Skins for libGDX user interface
I am making a user interface in libGDX using the scene2d.ui portion of the library. To make a button, however, I need to have a skin. I was wondering if there is some sample premade skins available by ...
-1
votes
0answers
54 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 ...
0
votes
1answer
31 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
19 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
14 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
44 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
57 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
38 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
98 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
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
64 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 ...
0
votes
1answer
64 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 ...
-1
votes
1answer
53 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 ...
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. ...
-2
votes
4answers
157 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
0answers
51 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
72 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 ...
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 ...
1
vote
6answers
427 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++;
...
8
votes
2answers
400 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
2answers
62 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 ...
-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 ...
1
vote
0answers
70 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
74 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);
...
1
vote
1answer
69 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
62 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
34 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
143 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
1answer
172 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 ...
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
222 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
vote
0answers
106 views
How do I make a scrolling background a la “Temple Run”?
I am looking to create a scrolling background much like "Temple Run" so that it may appear as though you are running down a hallway. Would someone please be able to point me in the right direction?
I ...
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 ...
-2
votes
1answer
153 views
MVC pattern for turn-based RPG [closed]
I'd like to make a 2D game in Java using the Model-View-Controller (MVC) pattern, but I have some issues concerning the battles.
There are two groups of characters in each battle: heroes and ...
0
votes
0answers
85 views
Libgdx vs slick [closed]
I know slick2d and libgdx are built on top of lwjgl. I just want to choose what 2d game library to go. Is slick better than libgdx? or the other way around? and why?
-1
votes
1answer
101 views
Generating a grid of cubes in 3D space [closed]
I am trying to generate a grid of cubes in 3D space and It aint workin...
All im doing is for looping YXZ (in that order) (nested for loops) then im doing cubes[x][y][z] = ... (new Location(x,y,z))
...
1
vote
1answer
58 views
how to detect when a character is walking on an item in java
I just want to know if there is a way in java to detect when the character is on an item on the floor without without verifying if every items on the map contains the character or vice versa in every ...
0
votes
1answer
50 views
Follow behavior with randomization factor
I'm trying to make enemy follow player as in picture below, the code below is code for following player with steering behavior ( i'm not sure it steering works tho but it does follow player ), how ...
-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 ...
2
votes
3answers
165 views
Using random numbers with a bias
I appear to be awful at describing the question so I'll try and describe the problem.
I want to add a random amount of heads to my creatures but I want to be able to determine several things.
a) The ...
4
votes
3answers
209 views
Are there methods faster than Strings for sending a sprite's state over UDP?
I'm programming a 2.5D networked game in Java. The networking works like this right now:
Create new networked sprite object at the client. Send it to the server. Server distributes and saves it. ...
-5
votes
0answers
65 views
How to make a picture to grow like grass garden [closed]
I m new in to the Java
Please could someone give some tips of method to use to make a image of grass growing ?
Like day by day ?
Thanks
-1
votes
0answers
65 views
Best Gamedev book for jmonkey engine [closed]
I want to start using the Jmonkey Engine to make a game but I want to learn some theory first. I am NOT interested in marketing or creating a story. I basically want to know which book would tell me ...
-3
votes
0answers
37 views
Using Multiplayer and Rendering on a single thread [closed]
I have a rendering thread which does all my rendering of the game, is it possible to connect to a server at the same time on the same thread as the render? Would it overload, would it slow it down? Or ...
1
vote
2answers
356 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 ...
1
vote
1answer
72 views
LibGDX Cross Platform Networking
Backstory:
I've been developing a game with LibGDX for the past two years, and I've seen it refactored more times than I remember.
I jumped on the iOS iKVM port as soon as it was released.
But I've ...

