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
39 views
Android OpenGLES 2 ray picking, resulting coordinate jumpy in certain spots?
I am trying to implement object picking based on touch coordinates via an intersecting ray test.
I am having trouble finding information on converting the touch coordinates to the coordinate system ...
2
votes
3answers
309 views
How to play animations (GIF, SWF… )?
I have many diffrent animations made with flash.
I can make it as (1).SWF, (2).GIF or as (3).PNG (every Frame per second).
Searched in google... but coudn't find anything usefull.
SWF: For SWF i ...
0
votes
1answer
86 views
How can I implement infinite scrolling by scrolling the background's texture, not the quad? [duplicate]
I'm writing a 2D platformer game on Java with LWJGL. I'm doing this just for the sake of learning and not the result itself, so when I decided to implement scrolling I did it two ways I could invent ...
-2
votes
1answer
128 views
How does the Goomba know it has been jumped on?
I'm developing a 2D tile game engine in LibGDX and I'm asking myself how to structure the whole thing. One of the key questions right now is how to implement Player-Tile interaction similar to this ...
0
votes
0answers
58 views
Depth Test not working properly on Nvidia
So, I send a Development Test of my in-dev game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia.
I use my own matrices and sent them to the shader, and at ...
4
votes
1answer
113 views
2d coordinates vs x/y screen positioning
I have a 2d top-down view tile map game, that generates random color tiles (water colors) as you move the character. I've been positioning elements on screen using the x/y coords (finding a way to ...
-1
votes
1answer
46 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
40 views
Good java library for a music game in Java [closed]
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
70 views
need help in a snake game [closed]
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
57 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
95 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 ...
1
vote
2answers
249 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
85 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
47 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
156 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
31 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
26 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
51 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
1answer
60 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
26 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
33 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;
...
2
votes
0answers
67 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
71 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
60 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
129 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
41 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
88 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
81 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
92 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
51 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
181 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
75 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 ...
1
vote
0answers
124 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 ...
0
votes
6answers
764 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
607 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
77 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
82 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
110 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
90 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:
...
1
vote
1answer
92 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 ...
0
votes
2answers
199 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
189 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
98 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
103 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);
...
8
votes
1answer
318 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
177 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
143 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
184 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
178 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
118 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))
...
