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
0answers
30 views

Is it possible to make a 3D game in Java [on hold]

Hello I was just wndering if it was possible to make a 3d first/third person game in java without opengl or any added librairies. Just plain java. If so can you import models and can the game be a ...
-1
votes
0answers
35 views

Stuck in Java game development [on hold]

To start with, I need some help for my homework assignment. I am developing a game. This should work as a command prompt interactive game. For example: > addplayer username, familyname, given ...
0
votes
0answers
20 views

Making a user friendly renderer class in OpenGL [on hold]

As I learn new rendering methods in OpenGL I try to make them usable for future cases so I don't have to have a big pile of glBegin()s or Ids in my main game loop. I'm grasping the understanding of ...
0
votes
1answer
55 views

Body isn't moving even even though linear velocity isn't 0

In my game you have the Square, which is the player, and the Circle which is the enemy, the player carries a weapon, when shooting the game calculates where to place the bullet in relation to the ...
0
votes
0answers
21 views

Implementing Spine animations in Libgdx

I've been searching a lot for a guide on how to implement 2D animations exported from Spine to Libgdx, but all I could find was outdated tutorials and source codes. I can handle basic Libgdx but Spine ...
-1
votes
0answers
31 views

How to access lan in Java? [on hold]

I'm making a text based game in Java. It will run on the school computers so please tell me of any conflicts that are possible. But I need to have a client and server in one package. They can create a ...
0
votes
1answer
54 views

Targeting the last thing that shot me [on hold]

I am working in Java on Eclipse I am attempting to make a code that will target the last place the player was at in a 2D enviorment. Once the enemy is hit it will then charge that location 2 seconds ...
0
votes
1answer
80 views

How do I make an entity move dynamically based on the player? [on hold]

I have an Entity instance and an Player instance, both have x and y coordinates in the game. The entity shall dynamically follow the player according to its coordinates. I immediately tried using ...
2
votes
2answers
81 views

AI for Shogi, dealing with high branching factor due to drop rule

I'm writing a Shogi program with a computer player in Java from scratch as my undergradute dissertation project. Due to the drop rule, when the computer player captures a few pieces, the branching ...
0
votes
0answers
28 views

Store a Unity map on server-side

For a 3d Hack'n'Slash game I am currently using Unity as client and Java wit OGserver (Netty with some game-related features) as Server. I am on the map part of the development, actually I just have ...
0
votes
1answer
40 views

OpenGL ES 2.0 2D-Image displaying

I have followed the official OpenGL ES tutorial to create a working OpenGL-environment. I have been able to do anything I wanted to except for displaying 2D-images. To do so I worked through this ...
0
votes
0answers
25 views

In Java swing, while handling a 2D top down game, how should I handle scaling for quality transformations (mainly screen rotation)

For my top down game, I plan to have screen rotation where entities don't rotate, but everything else does. I am using a raster array to store my image so I don't have to render things stacked on each ...
0
votes
0answers
32 views

Movement system on server side (HnS Click to move)? [closed]

I'm creating a Hack'n'Slash with Unity as Client and Java as server. Today we started developping movement system, and we don't know what to choose for the movement on server side (it's a click to ...
0
votes
1answer
65 views

2D planetary system simulation- how to improve gravity model? How to control simulation speed?

I'm making a simple planetary system simulator. I've run into some problems with physics model and simulation speed and I'd like to learn how to fix them. My main class is Body: public abstract ...
-1
votes
0answers
18 views

How to add thermal effect to bitmap or YuvImage Live CameraPreview [closed]

I want to add thermal effect to Live Camera in Android . I am successed in implementing greyScale effect to live Camera. But don't know how to set thermal effect to yuv or bitmap . You can see my ...
0
votes
1answer
30 views

Libgdx distorted texture size

I'm just starting to learn LibGDX and have been having some troubles getting my world size to match with my texture size and box2d bodies. I have a texture 64x64 that I am trying to display but it ...
0
votes
0answers
23 views

Problem with keyListener

I have written some code that makes a labyrinth,and fills the JPanel with my figures (Wall, Player, Road and Gate). I want to move the player with WASD, so I have written the following code. The frame ...
0
votes
0answers
19 views

JBullet - Two RigidBodies will not collide

I am adding two ships into my collision world. (The green dots are the collision shape (an ObjectArrayList) that I am passing to the ConvexHullShape) However they don't seem to collide. In fact, ...
1
vote
2answers
66 views

OpenGL Vertex Array Object(VAO)

I have drawn a triangle and a square using open gl and everything was fine. I have then tried to draw the same triangle and square, while implementing VAO's and now I only get a white triangle - ...
2
votes
2answers
67 views

Best way to deal with a large variety of items?

I am currently working on my first java game and I am having trouble figuring out how I should implement my classes that will have heavy variety. For example, I am considering having an abstract item ...
0
votes
1answer
44 views

Libgdx - Jumping, What am i doing wrong?

I really can't work out whats wrong with my code. I have an input listener for gestures, when I Swipe the position goes up on the y axis fine but he doesn't come back down, if with Gravity added. I'll ...
0
votes
0answers
23 views

Trying to get OOP working with libgdx [closed]

I'm trying to use this player class for my entity stystem, but rendering isn't working right. I'm trying to have each class render on it's own by calling entity.render(); in my core application class. ...
2
votes
1answer
34 views

JBullet - How can I make my object float on the water?

I'm trying to use JBullet for a ship PVP game. I've got two ships which are meant to rest on the water. Obviously these ships will be colliding, but the problem I have currently is "water" ...
0
votes
0answers
20 views

Shaperenderer not showing any shapes

I'm trying to use the shape renderer in LibGdx, but I don't see anything. I followed the docs as well, but nothing appears. Is there something wrong with my setup? public class MyGame extends ...
0
votes
2answers
33 views

Ball oblique impact physic in Java?

I know Q3 + Q4 = 90 I searched internet and many physic topics, but not found how to calculate this values in Java? (I found V3 and V4 but not found Q3 and Q4) So how can i calculate V3, V4, ...
0
votes
0answers
28 views

Android Studio Project Creation Error [closed]

I have recently taken up Android Game Development, but my Android Studio is acting up. I installed Java JDK 7, just for the record. When I try to create a new project, I get this stupidly annoying ...
0
votes
1answer
69 views

Platformer collision advice

I've been trying to implement collision for a platformer but I can't find a good way to get the collision of certain sides without it get glitchy. So i try to get the collision of the top rectangle ...
-3
votes
1answer
40 views

String of coordinates into an ArrayList? [closed]

I have a String with coordinates which looks like this: (These coordinates are loaded from a text files and tells the position of entities) String coords = "0,0 0,1 5,2 7,4 10,5" My question is, ...
0
votes
1answer
33 views

Pan camera within bounds of large image

I have a camera that I pan around a large image which works fine, however when I reach the end of the image I can keep panning on and on, forver. I have looked everywhere for an answer on how to ...
0
votes
2answers
58 views

GestureDetection Issues - How do I make my Actor jump on Swipe?

I've been trying to solve this for hours now, In theory I totally understand how the GestureDetector works but I'm trying to integrate it with the Libgdx SuperJumper Tutorial (for now). Here: ...
0
votes
3answers
51 views

Why should i set glClearColor and setProjectionMatrix in render method many time in LibGDX?

import com.badlogic.gdx.Game; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.SpriteBatch; public class MyGame extends Game { public OrthographicCamera ...
0
votes
1answer
33 views

Moving a Polygon based on Camera position [JAVA]

I am in the process of implementing TMX Maps (made in Tiled) for my game. In Tiled, I can create polygons, which leaves a tag, containing the points. Loading in these points to a Polygon ...
0
votes
0answers
38 views

Hard time implementing AABB collision into a platformer

I have AABB collision working fine. The problem is I can't get it to work with a platformer style game. The collision makes the player move a bit static when colliding and the gravity wont work with ...
0
votes
1answer
27 views

Opengl textures change color of everything

Whenever I render textures, all shapes get the color of the texture. I'm not sure why, but I think it's something to do with the way I render textures. Here's what I use to draw textures: public void ...
2
votes
1answer
80 views

Good approach in designing game classes [closed]

I took a semester-long course in java but I'm still a beginner in Object-Oriented programming paradigm. Suppose that I want to create a simple game where the player can go to different locations. Each ...
0
votes
0answers
22 views

Opengl camera handling

I normally do parallax scrolling with x and y which works, but I'd like to make a camera class instead so I can rotate as well. Right now the camera is set to the player's position but doesn't scroll. ...
0
votes
0answers
22 views

Alternative to world/terrain editing with jmonkey

I have been studying Java for almost a year and have been trying to develop a game using jMonkey. I have tried Unity before but since I only know Java I decided to go with jMonkey. My problem is that ...
1
vote
0answers
49 views

Is there a cross-platform way to convert SVG file to PNG at runtime? [migrated]

I need to convert SVG files to PNG files at first launch of a game and then save these PNG files to some assets folder. I'm wondering if i can achieve it on both Desktop and Android. The reason why i ...
0
votes
1answer
59 views

How BufferStrategy works

I've used this piece of code a lot in my games, but I still don't know exactly how it works. // Main loop while (!done) { // Prepare for rendering the next frame // ... // Render ...
0
votes
0answers
32 views

How to toggle fullscreen with lwjgl

I'm using glfw in lwjgl-3 to try to create a toggleFullscreen method. However it always gives me errors. I saw this question Toggle Fullscreen at Runtime but it didn't help because glfwOpenWindow() ...
2
votes
1answer
30 views

Java Libgdx: How do you add cells to a TiledMap?

I'm trying to make a Side-Scrolling game that will allow you to place/remove tiles. I'm using the TileMap Editor to render the custom Tilemap but is there any way to add tiles? I have it where I can ...
2
votes
1answer
22 views

Rendering curved text in AndEngine

I'm trying to implement a small game using AndEngine and I have a question about the Text. More specifically, I'm wondering if it is possible to deform the text so that you can have a "curved" text or ...
1
vote
1answer
34 views

Suddenly cant run project in libgdx anymore

Ok so in a sudden case of nostalgia, I switched my eclipse workplace from my working libgdx projects to an older one. After looking through my old stuff I had some problems switching it back, since I ...
1
vote
1answer
25 views

Correct way to integrate scaled axis angular velocity into a quaternion

Across my travels on the internet I have came across to ways of integrating a scaled axis angular velocity into a quaternion. The first way converts the angular velocity into an axis angle quaternion ...
6
votes
3answers
1k views

Framerate is affecting speed of object

I'm experimenting with building a game engine from scratch in Java, and I have a couple questions. My main game loop looks like this: int FPS = 60; while(isRunning){ /* ...
0
votes
0answers
16 views

JBullet Capsule falls through Plane when Capsule is translated

I am using JBullet (Bullet physics, Java port) and for a player I have a Capsule shaped rigidbody and am translating it for movement (rigidbody.translate()). I even have the dynamicsWorld call ...
1
vote
2answers
63 views

How can I detect a perfect passageway for collision detection?

The problem is when I move diagonal it moves fractions of units and therefore my coordinates might be a fraction of a unit say (40,400) might be actually (40.12,400.40) but another problem is my pink ...
0
votes
1answer
29 views

How and where to handle collisions? [Java] [duplicate]

Okay, so in my game I have a Level class, which hold an ArrayList of entities. In addition to this, I store the Player here (naturally enough). In my Entity class, I have a method which checks for ...
0
votes
1answer
36 views

Handling collision with LWJGL rectangles

I'm testing collision with other rectangles so I can implement it into my current project. The problem is the rectangle starts at the right x and y, but I'm not sure where exactly they are. I'm pretty ...
0
votes
1answer
77 views

OpenGL multiple mesh management

I've been working on coding a new 3D engine in Java. For the moment at least I'm sticking to openGL... Currently I'm reworking how meshes get transformed and then drawn. ATM each mesh created has ...