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
0answers
8 views
Aligning Camera to Rectangle
I'm working on a game in Java, and I'm having some trouble with finding the correct camera position. I've already made a Rectangle that shows exactly where I want the camera to be, and at what scale:
...
0
votes
0answers
10 views
Made a Gridworld two player game but I want to take it further [on hold]
I turned the AP Computer science case study GridWorld into a two player game where the two player bugs fight for survival against randomly generated Boulders and Zombies, who are summoned (along with ...
0
votes
0answers
13 views
How to display armor/equipment on a character? [duplicate]
I've been working on an Online 2D RPG mostly for fun and for getting a basic understanding of Socket Communication, packets, and just basic game development. Like most RPGs there is some kind of ...
0
votes
0answers
12 views
Java Collision detection problem [on hold]
Hello I have a game where you collect keys to open doors and get more keys and you can do other stuff. I have just 1 problem. If I have a green key I want to walk through a green door. when I have the ...
1
vote
1answer
24 views
Implimenting BADLAND like Body Movement in Box2d
I am trying to make a body (character in my game) move and behave in the same way as the character in the BADLAND Game with regards to rotation.
The character does not have fixed rotation and behaves ...
-1
votes
0answers
23 views
Java LWJGL Rotating pistol with camera axis
I was writing a simply height-map based game and I wanted to add some range weapons like pistol. But I am stuck on the rotating part. My rotating on x axis was good. But problem starts when I want to ...
0
votes
1answer
12 views
Importing 3D Max files in NetBeans or Eclipse [on hold]
I am a student and I am making a dress design desktop application in Java. For that I first had to model cloths in 3D. I chose 3D Max as per my supervisor's advise.
Now I am done with modelling ...
0
votes
0answers
6 views
Use Slick2D for standard application instead of game
I was wondering how well Slick2D would work when used for a custom rendered GUI in a standard application? A standard application not being a game. More like a text editor or 2D level editor that ...
0
votes
0answers
14 views
Load a multiplayer game Gameranger [on hold]
This question is somewhat related to programming. I was Wondering how do gameranger call the games like NFS MW and automatically set the players and their info. Can you please give information about ...
0
votes
0answers
20 views
What is the best way to make a Game State Manager in java [on hold]
I have tried to make a Game State Manager for an RPG but have had no results.
So now I ask how can I go about making a State Manager which uses the State Stack system?
I am planning to make the ...
0
votes
0answers
24 views
How to make a game save in Java? [duplicate]
I'm using JFrame to make games.
How do you output the variables in the program to a external file and retrieve it when the player loads the game.
I could not find a tutorial on it.
If you can lend me ...
0
votes
3answers
74 views
Drawing sprites only under certain conditions - alternatives to using 'if statements'?
Within my game (which is Java/Android), I wish to draw a sprite only under certain conditions, so up until now, I've been using if statements to accomplish this. Something like so:
if ...
0
votes
0answers
10 views
Java - Checking for new events? [on hold]
Ive run into a problem on multiple occasions where I need to set the value of something only once when it has been changed. For example, right now I am working on a player's equipment system. The ...
0
votes
0answers
25 views
how to detect collision with libgdx and tiledmap
As you see , it's a picture from my game map , i have to create a 2d rpg game when a character can do many things.
Currently i'm looking for a solution to handle collision between the character and ...
0
votes
0answers
44 views
2D GLSL Lighting and Sprites
I'm trying to make a 2D game engine, and I really want to support ambient light as well as multiple point lights that you can define the color, intensity, radius, etc from uniforms in glsl shaders. ...
0
votes
0answers
18 views
Java books to read [on hold]
Are there any good Java books out there that teach you how to make games? Preferably rpgs or anything isometric.
-1
votes
1answer
67 views
How can I get “Good enough” collision for entities? [on hold]
I am developing a Pirate ship fighting game.
It's a great concept: Ships firing cannonballs, sinking each other, having to work as a team to complete the mission... But.. I've tested it with about ...
0
votes
1answer
54 views
Trying to add a feature to my (basic) level parsing algorithm - not sure how to (JAVA)
Right now this method goes through a list of GameObjects (e.g. JetPack, Platform) with their respective x and y positions in a text file called level1.txt:
platform 840 280
platform 1130 280
coin ...
0
votes
0answers
29 views
Fake Lighting 2D Space Java
I have an image that I want to be used as the light.
The white are should be drawn, the black should not. I need the light to be tinted to whatever color I pass to the light object. I have code ...
0
votes
0answers
20 views
VBO - Update Vertex data
My game will be a 2D Sidescroller and I'm working on moving objects around.
Since I want to animate and move my sprites around, how do I update the vertex data?
This is my current class for GUI ...
0
votes
0answers
33 views
manipulate textures in real time using GPU
I'm looking for some way (tutorial, library or build in option) to draw texture on JMonkey in real time. So I have 2 images one a normal texture that is fairly big(4000x4000) and another much smaller ...
0
votes
1answer
20 views
Jmonkey loading texture from fails
I have the following basic code:
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry("Box", b);
Texture cube1Tex = assetManager.loadTexture(
...
-1
votes
1answer
47 views
Java Game not rendering properly
Hello I have a game that you can play(duh). When you start the game a loading screen pops up and on the loading screen I display an image of an eye I drew. In paint.net they eye looks perfect but in ...
-1
votes
1answer
33 views
Java game loop delta not working
Hello I have game loop where I can change framerate. But when I change framerate to other, delta time not working fine. For example when framerate is lower everything is faster.
Here is game loop:
...
0
votes
0answers
11 views
Java JBullet rotating rendered rigidbodies
Hello I wan't to rotate object I wrote some piece of code but that don't won't to work. Here is this code:
glPushMatrix();
float[] matrix = new float[16];
...
0
votes
1answer
32 views
How to render basic voxel terrain with marching cubes [closed]
How do I create and render a VBO mesh using marching cubes?
Notes: I'm not asking how to generate terrain, but how to create a VBO mesh, from voxel data in the format (x,y,z,material).
Sorry if the ...
0
votes
0answers
17 views
mouseWorld Coordinates Box2D
I have one simple question in Box2D:
if you want to get the world coordinates of mouse, this is the function you gonna use in Java:
void update(int x, int y)
{
if(mousejoint !=0)
...
0
votes
0answers
37 views
implement paper folding (origami) on android
i'm working on a game, i have been working with game engines like UDK and Unity for many years, now I come into Android and eclipse,
i have a question and im really confused, lets describe.
i want to ...
0
votes
0answers
16 views
Java JBullet models not colliding [duplicate]
Hello I wan't to do model collsion in JBullet but that don't won't to work. Models look like have some invisble holes.
Here the code for creating collsion shape:
int triangles_count = (int) ...
0
votes
0answers
28 views
Libgdx box2d crashing
im making a game in libgdx which i having a bunch of circle bodies floating around in space and when the player's body crashes into another body, that body deletes and creates two smaller bodies ...
0
votes
0answers
49 views
Java Collision detection
Hello have a game where you look for key cards. Which allow you to open certain doors. for example if u have a red key card you can open a red door. The problem is that when I don't have red key ...
0
votes
1answer
62 views
Java JBullet Mesh collsion problem
I have a problem with JBullet mesh collsion. Everything works fine when I create a mesh from my object without scaling, but the problem starts when I want to scale the object. I also tried scaling in ...
-1
votes
0answers
45 views
Any Way to Optimize My A* [closed]
Does anyone have any ideas for optimizing my A* Pathfinding method? It works, but creates some unusual behaviors and is not exactly efficient.
Pathfinding Method:
public void ...
0
votes
0answers
33 views
How do i need to start developing my first android game? [closed]
I have experience in XNA and I want to develop Android game, I do not know where I have to turn ...
There is a way to develop Android game in XNA or even Monogame to Andorid? (It is important that ...
-2
votes
0answers
39 views
How do I use the picture with 2 images as my sprite sheet? [closed]
I've used Gimp to create 2 separate images. I can get them into my program, the only problem is, how do I make it so that the program knows to only use one image per frame?
-1
votes
0answers
39 views
Why is my animation not happening? libgdx / java [closed]
public class Animator extends Player implements ApplicationListener {
private static final int FRAME_COLS = 7;
private static final int FRAME_ROWS = 1;
...
0
votes
2answers
50 views
Why does this simple if-statement that checks my main characters state never get called (Java/LibGDX)?
Been working on this for a while - basically I want my player to perform a front flip when he jumps (screen tap -> player jumps). I wrote the animation class Animator (extends Player implements ...
0
votes
1answer
70 views
Java, Crashing with a Shader on Intel HD Graphics
I just got a new computer (Acer Aspire ES1-311) which has an integrated Intel HD Graphics card, and I noticed that this fisheye shader crashes my game (LibGDX game, VM Crash):
varying vec2 ...
0
votes
0answers
59 views
minecraft source code for use in mods
So I am teaching a class where we will be using java to make minecraft mods. To keep things simple, we are using a third party program to set up the under-the-hood stuff for us (that way we don't have ...
0
votes
2answers
37 views
Simple LibGDX Pong game drag player instead of getting x position
I got a working pong game in LibGDX but when I touch the screen the player x automaticly jumps to the coordinates I touched. I wan't my game to detect I touched and then move the player to the ...
0
votes
1answer
55 views
Java LWJGL - How can I add water to my 3d world? [on hold]
The title says it all, how can I implement a simplistic water system into my game? I am using Java LWJGL and OpenGL glsl shaders. I am still fairly new to game programming, and a complete noob in the ...
0
votes
0answers
14 views
onSignInSucceeded and onSignInFailed not called (Google Play Games Services)
Using the code below, can anyone tell me why my onSignInSucceeded and onSignInFailed callbacks are not triggered when signing in?
It works fine if I extend BaseGameActivity, but when trying to extend ...
0
votes
1answer
78 views
Java LWJGL - Monster follow script not working properly
I have written a script to be set off whenever a player is within a distance of the monster. The script checks if the x position is greater than or less than the players x, and same for the z. (y is ...
0
votes
2answers
85 views
Multiplayer game principles
I am developing game using libGDX libraries . I want to create multiplayer mode , where several players can play at the same time in the same room , each player can create his own room and other ...
0
votes
2answers
80 views
How does rendering with Swing compare to rendering with openGL?
[summary: Is the performance of Swing at least in the same dimension as openGL [through LWJGL]? If yes, what percentage would you give it? What possible other problems can I expect from Swing in the ...
1
vote
1answer
56 views
Why does this impulse not affect the body?
I'm just getting started with Box2d and I'm trying to apply an impulse to a circle but nothing really happens.
First I define ball:
BodyDef bodyDef = new BodyDef();
bodyDef.type = ...
0
votes
0answers
13 views
How to experiment for the value of gravity in Libgdx? [duplicate]
I am following a guide on how to play a flappy bird clone in the LibGdx framework.
-http://www.kilobolt.com/day-5-the-flight-of-the-dead---adding-the-bird.html
I am currently on the part where the ...
-2
votes
1answer
66 views
Java game runs slower and slower as game runs longer [closed]
I know that this question may be considered off topic, but this is a significant problem.
Problem:
I have in a java game that I am working on. The FPS counter starts at 250 FPS and in about 2-4 ...
0
votes
0answers
18 views
Google Play Games: onSignInFailed() and onDestroy()
I just had an error while testing my game, this is an update that I'm working on and it's never done this before (and I've launched this game on various devices literally hundreds of times, so it ...
0
votes
1answer
39 views
Creating a separate renderer for entities in a 2D game
I'm making a 2D shooter game. As of now, every entity "draws itself", meaning every renderable entity has a draw function. I know it is better if rendering is handled separately, but how can I achieve ...