Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
-1
votes
1answer
22 views
Anti-Aliasing in Java
In my game I want to have the different anti-aliasing option like: none, x2, x4, x8 and x16. I know that you can use anti-aliasing with Graphics2D in the way below bu is there any way that I can use ...
0
votes
0answers
25 views
Good java library for a music game in Java
I'm trying to make a music based game in java for android(similar in theory to audiosurf or music catch 2) which analyzes aspects of a song, and bases a level around them. I've been looking for a few ...
-1
votes
1answer
55 views
need help in a snake game
I am a beginner in programming. I need to create a simple snake game. I've created this method to make the snake eat a rat so the location of the rat will change randomly, but nothing happens.
...
-1
votes
1answer
38 views
Android TCG structural design [closed]
I started developing tcg for android, using ADT bundle.
What is the right approach/way for making/storing cards/game info, local sqlite, some kind of data file? some service? or something else?
2
votes
4answers
54 views
Java - Best Implementation KeyListener For Games
I am working on a game using only the swing and awt packages. Note I can only use the default Java libs. Meaning I have to use KeyListener. I have imported KeyListener properly, however, it is still ...
0
votes
2answers
131 views
How to make a “GUI In Game”?
My game is very GUI based, the way how it works is that I have a GUI class, which contains the basic GUI elements, a parent GUI object, and a copy of the main game's class object. The game starts out ...
0
votes
4answers
75 views
Changing color of a moving image without lowering the fps
I just added an option to my game that makes it so that all the enemies will have a random color for their clothes instead of the regular blue. I use this code to draw rectangles over the shirt of the ...
1
vote
0answers
40 views
Accessing variables from non-neighbouring classes specifically in game development (Android)
Edit
Using direct access while breaking the law of demeter looks like this:
res.sprite.drawQuad(res.sprite.xScreen,res.sprite.yScreen, mMVPMatrix);
Using proxy methods / getters / setter looks ...
-3
votes
2answers
128 views
Terrain Generation - Advanced [closed]
I need to generate terrain. Easy enough you might say, but I need to create Biomes if you will(Can't link of another name) lakes. Trees and on a height map.
So I have really no idea how to use a ...
-3
votes
0answers
28 views
error(s)_during_evaluation Eclipse [closed]
Eclipse debugged just stopped showing variabile data few days ago it always says error(s)_during_evaluation, i tried increasing the ram in ini , tried to reinstall Eclipse JUNO, and installed ...
0
votes
1answer
25 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
25 views
Skins for libGDX user interface [closed]
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
79 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
1answer
42 views
Slick2D and TileD [closed]
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
20 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 ...
-1
votes
0answers
15 views
How to unbind a sprite in an updating vector? LIBGDX framework [closed]
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
52 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
62 views
How to Fix Choppy Movement [closed]
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
58 views
andengine Tower Defence game - Enemy<-Weapon interaction [migrated]
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
103 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
31 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
74 views
How would you program sprite movement in a 2-D ariel view rpg game? [duplicate]
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
67 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
64 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
42 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
163 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
61 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
64 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
561 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
480 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
66 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
78 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
76 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
78 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
32 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
73 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
66 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
38 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
155 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
176 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
55 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
101 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
263 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
1answer
154 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
133 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
161 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
100 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
104 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))
...
