Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [java]

Java is both a popular object-oriented programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

1
vote
1answer
11 views

Parabolic Jump Libgdx Without Box2D and With Vectors

I have tried to write a jump method that sketches out a parabolic jump but it results in either no movement, or a jerky upward movement when I try to scale up dt. I have the following things defined: ...
0
votes
1answer
24 views

Split tile based map file into multiple files

I have a gigantic map file (1440x1080) that I wish to split into smaller files (45x45) for faster client reading. I plan to split offline (when running DEV server) so I am not too worried about speed....
0
votes
0answers
17 views

Fail to Start android service in android studio Unity

I have written a service file in android studio like: Manifest file: ...
0
votes
2answers
34 views

Algorithm to detect impossible scenarios

I'm making a simple game where a surface is split up into 4 parts, rows, obstacles spawn in them, and a player tries to dodge them. Up to 3 obstacles are generated in each row, and this can lead to ...
0
votes
0answers
21 views

Item collision detection doesn't work

My GameWorld constructor has the following code inside it. ...
0
votes
0answers
20 views

Android studio background GPS service call and Unity

If I have a service file written like this in android studio: Manifest file: ...
0
votes
0answers
18 views

Low fps when drawing semi-transparent color to Canvas (java)

I'm making an Android game and I want to make a darkened background I try to do this with: canvas.drawColor(0x99000000); This works but my framerate drops from a ...
0
votes
0answers
37 views

Keyboard arrow Navigation

My crossword is a table made with <td> tags. The input boxes are textboxes (input="text"), styled with CSS. My question is how do you get the focus to the ...
0
votes
0answers
13 views

Box2D rotational issues

I am making a game in Android Studio using LibGDX. My player is supposed to fly up and down, and angle itself accordingly(lean back/up when going up, lean forward/down when going down). I am having ...
0
votes
1answer
123 views

Map generator sometimes doesn't work

I am making a dungeon map generator and am currently trying to make it place empty rooms. It first checks if the space is empty and then places a room. The problem is that most of the times it ...
0
votes
1answer
38 views

Can't get AABB Collision to work properly

This is the code I'm using to resolve collisions on the players left side. It works when I'm on the ground, but if I'm falling, it does not work. ...
-1
votes
0answers
22 views

LWJGL Java 3D Collision

I am trying to make a 3D FPS in java, but I am having a hard time with the collision. I tried multiple methods but none of them worked. The code is based on ThinMatrix's 3D engine. I want something ...
0
votes
1answer
34 views

Why is this LIBGDX Action behavior THE EXACT OPPOSITE of what I expect?

Here is a code snippet of the relevant section in my render loop. My intention was to make the actor who was currently focused blinking, to indicate that it was the currently selected UI element. But ...
1
vote
0answers
20 views

Uniform lighting when there are multiple light sources

I'm writing a 2d game where there are walls and the NPCs can only see what is within their line of site. To do this I'm using Box2dLights so the walls create shadows. The problem I'm having is ...
1
vote
1answer
69 views

Shadow artifacts/acne on block intersections

This is using the default shader and depth shader from LibGdx. It creates lines at the blocks intersections. This is what I use to create the blocks models for now: ...
0
votes
0answers
29 views

Large game statistics database management

I am making a management game in Java with a farming theme. I am rather beginner in software development and every steps requires lots of thoughts. I am at a point now that I want to log and keep ...
0
votes
0answers
39 views

How should I send large amounts of data from java to c++ (within the same process)

I'm writing a game that is mostly in Java (because that's the language I'm most comfortable with) while the graphics are in C++ (because of speed, and because the Vulkan API is hard enough to learn ...
-1
votes
0answers
24 views

Image-based hex tiles

I am looking for Java code for some very simple operations: read hex tile image from file blit hex tile image to screen write hex tile image to file optionally I may wish to take a hex tile image ...
0
votes
1answer
14 views

Spine runtime for libgdx clipped rendering issue

I've started to play with the Spine for libgdx runtime in Java. But I can't seem to render without some sort triangular clipping. The code is based on the Spine examples: ...
1
vote
2answers
29 views

Meshes exported from blender as .obj does not map correctly

I am having some problems with developing my game in OpenGL with java (Using LWJGL3). I have been following a guide for the more complex steps of the process, like loading meshes. When using the ...
0
votes
1answer
40 views

Which part of the frustum sits at the eye position?

In Java I create a frustum projection matrix via Matrix.frustumM(projMatrix, 0, left, right, bottom top, near, far); and a view matrix via ...
0
votes
2answers
89 views

Should I (and how to) avoid using global classes [closed]

I have been having fun learning java for years, did a little bit of OOP tutorials and this is the first time I attempt to make a real project. The project is very similar to some top down view ...
-1
votes
0answers
15 views

How to have zoom and translate in .tmx map in android

I load a .tmx file in libgdx project but I can not zoom in and zoom out and control map like a google maps in android device. how to implement this features in .tmx file with Screen touch. this is my ...
1
vote
1answer
55 views

Draw line between tiles of tiled map in libgdx

I want to draw line between two tile of my .tmx map in libgdx . I want to get a tile position but not in pixels , in maps grid numbers like : (0 , 6 ). or is there any way to change a tile color in ...
0
votes
1answer
35 views

LibGDX Box2dlights - Body Shadow Problem

While playing around with the box2dlights with libGDX, I have managed to get it all up and running, but have a problem with the shadow rendering. This is what I currently have atm: With the lighting ...
0
votes
1answer
19 views

Minecraft modding 1.12 draw image

I want to draw an image that I created but the image is too big. Now I want the Gui to scale the image to a reasonable size, but when I change the width and height it doesn't make the image scale down/...
-1
votes
0answers
32 views

How to use Bullet ghost objects in libGDX?

So I went and did some research on how to get Bullet's ghost objects work in libGDX. There was nothing about the Java port of it, so I tried to translate some of the C++ code I found into Java. ...
0
votes
1answer
103 views

Develop on Oculus Go using Java and OpenGL

I have recently done some game development using Java and OpenGL (with the JOGL library), and I was thinking about trying to learn how to develop on an Oculus GO. However, all guides seem to assume ...
-1
votes
1answer
45 views

Is it possible to do 2d character movement with vectors instead of using tiles

we have a character moving through a house and so far we used tiles to simulate character movement. Is it possible to use a vector image of the character and move the points via vectors to simulate ...
0
votes
1answer
60 views

Should I use Panels or Frames?

Hi I am creating my first game in NetBeans using Java, the game is going to be an RPG that will look a bit look Undertale on the surface in that there will be a menu, then a load game section and then ...
0
votes
0answers
30 views

Repeat a region of an atlas

I'm using libGDX and I've switched from using a Texture instance for each wall in my game to an atlas. The wall texture you see was repeated alright: As you can see, it skips textures when I switched ...
-1
votes
0answers
17 views

How to keep sprites in sync with non-box box2d polygon shapes

By non-box box2d polygon shapes, I mean polygon shapes that are made by specified vertices, instead of using the setAsBox method of box2d polygonshape class. I know this much: CycleShape and box ...
0
votes
1answer
121 views

Use a different language for engine and game

Just a quick question that I haven't been able to find an answer to, I am creating an engine for a game, I have begin making the engine in C++ but I want to make the game in java. My question is, is ...
1
vote
1answer
117 views

How to allow to slide rectangle to not colliding with corners between two rectagles?

I am detecting each side of collision between two rectangles, and wen I collide them, lets say, with the left side, it also detects collision on the top side when I move to the top, and the downside ...
-2
votes
1answer
50 views

Making a Java Swing game a browser based game [closed]

I have made a game in Java using Swing for the GUI. It is a network game relying on the client-server model. Basically the game is a turned-based chess-like game. It has a connection menu, game ...
0
votes
1answer
59 views

LibGDX - Animate Player using Finite State Machine in Ashley ECS

Hi everyone this is my first question on this forum hope you can clarify my doubt. I'm gonna start by saying that im not very good at english so my apologies. So I have a big school project and I'm ...
0
votes
0answers
11 views

IllegalStateException while rendering font via slick-util TrueTypeFont

I tried to load a font via Font awtFont = new Font("Times New Roman", Font.BOLD, 24); TrueTypeFont font = new TrueTypeFont(awtFont, true); and then call ...
0
votes
1answer
69 views

How to create an even gamescore?

Currently I'm doing an android game. My problem is the score. The game speeds up in every round and currently I'm counting the score like this: ...
-1
votes
1answer
31 views

trying to work out coords based collision [closed]

In this game I'm working on, both player and enemies are represented by 32x32 sprites(not using bounding boxes). I'm trying to make a system where if the x and y coordinates of the player and ...
0
votes
1answer
52 views

Correctly drag object with mouse

I already have a MouseMotionListener with the mouseDragged method implemented. I can drag an object with the mouse, but it doesn'...
1
vote
1answer
117 views

My Java Game's movement looks awfull. Maybe Problem with Thread.sleep

I have a big problem with my Java games. In every game I make the movement of the player and objects just looks awfull. The framerate is 60 fps without any problems. But the movement looks extremly ...
0
votes
2answers
89 views
0
votes
1answer
76 views

Billboard quad in same draw call?

I am currently drawing a isometric world in 3D, meaning the floors and walls are all quads aligned to the original axis in the world and using a rotated orthogonal camera to "distort" the images into ...
0
votes
0answers
60 views

How can I use the NDK to make games?

I want to use NDK to use my existing C++ code for a game. I know there are two ways to use NDK: I can use Java to create GLSurface and opengl context; I can use NativeActivity class to entirely write ...
0
votes
1answer
55 views

Cannot find folder when building game to .jar LibGDX

Whenever I run my game from my IntelIJ IDEA the game runs fine. It finds every folder and every asset in there. But whenever I build my game with :desktop:dist and ...
0
votes
0answers
25 views

Developing RCON for Squad

I have found in the internet Java RCON Library - https://github.com/Kronos666/rkon-core, but then I entered IP, port and password and asked server to send available commands - server didn't respond. I ...
0
votes
0answers
32 views

libgdx - can't drag/click on Dialog

I'm having problem with Dialog. I have Dialog (let's say MainDialog) with button. After the button is clicked, another Dialog pops up. Everything is fine, but I can't drag nor click the buttons from ...
0
votes
0answers
71 views

How can I fix this MineCraft Forge OpenGl error?

I am making a MineCraft Forge 1.12 gun mod. The gun works but I only need to add some animations for reload and aim. So I have tried something but I gives me an error every time. ...
0
votes
1answer
38 views

How can I speed up the shapes drawing on high-density devices?

I have a game that should draw many shapes on the canvas and in every frame these shapes position will change, the game is running smooth but after adding more shapes some jerk arise and it drops some ...
2
votes
2answers
47 views

How can I efficiently change the color of a BufferedImage?

I am trying to change the color of a white BufferedImage image. I do know that you can use .setRGB(x,y,rgb) and simply run some ...