Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
107 views

I am working on coding a bot for Minecraft in Java. The first step is to find trees in the world. I am using mcp-reborn (so basically the source code) but answers in Forge can also be useful to me. I ...
Day Trip's user avatar
1 vote
1 answer
164 views

I am using ParticleEffect with a texture stored inside TextureAtlas. The code below shows how I load a particle: ...
matej-m's user avatar
  • 13
2 votes
2 answers
2k views

I have been trying to implement pathfinding in Minecraft for a while. Everything is in blocks, so this shouldn't be too difficult. I have gone through a lot of different posts and articles but I haven'...
Day Trip's user avatar
2 votes
1 answer
96 views

(Sorry if this has already been asked, I couldn't find any other question or source describing my problem) Okay so basically Square textures load and display just fine. But for some reason, when ...
DindinYT37's user avatar
0 votes
0 answers
227 views

build.gradle For Compile ...
Mentos's user avatar
  • 1
1 vote
0 answers
205 views

(I asked the same question on StackOverflow but didn't got an answer. It's the first time I post here so idk if this is not allowed or anything, so if it is please tell me) I was following ThinMatrix'...
Renan Lima's user avatar
1 vote
2 answers
298 views

I followed this tutorial called "Ray Tracing in One Weekend" by Peter Shirley. And I implemented the java version of it for studying Ray Tracing. Everything was all right until Diffuse ...
Whatssuppp's user avatar
1 vote
2 answers
1k views

I'm trying to shoot a bullet from the tip of a gun. This gun is a Sprite object and it is constantly being rotated to point towards the mouse. The issue is that the point to shoot the bullet from is ...
Albert Beaupre's user avatar
0 votes
0 answers
718 views

I am working on a mod in Minecraft Forge/MCP using Java. Aiming a bow is controlled by your head pitch and yaw rotation. Right now I have a math function that automatically looks at the target. But I ...
Day Trip's user avatar
0 votes
1 answer
471 views

I am trying to predict where a player will be next based on where they are now in Java. I have their XYZ position, their XYZ motion, but I don't have their speed. How can I predict where they will be ...
Day Trip's user avatar
0 votes
1 answer
210 views

The dedicated server would be a lobby where all the players connect and find matches. Once a match is found the server hooks to two players and sends them off on a p2p network. Once the match is over, ...
jermsmcerms's user avatar
0 votes
1 answer
727 views

I'm working on a mod for Minecraft in Java. How can I make something happen every half tick? If I run my code in the tick function, my code is called 20 times a ...
Day Trip's user avatar
1 vote
1 answer
5k views

I want to code some basic pathfinding for my bot in Java. Below is a 2D grid representation of the 3D world. 0s being the places you can go, and 1s being the places that you cannot go. ...
Day Trip's user avatar
0 votes
0 answers
191 views

Im working with an Java based ECS framework called "Artemis ODB". Its great so far but it lacks multithreading or jobs. So i wanted to add them by myself. I actually wanted to give each job ...
genaray's user avatar
  • 517
0 votes
1 answer
244 views

I've been making a game engine in lwjgl and I have been trying to get an ai to move from one point to another. I used a lerp method but the speed is dependent on the distance between the two points, ...
user avatar
0 votes
1 answer
206 views

I have created an inventory in which you can select some objects that you can spawn. This is a button in a table in a inventory class. Spawning is done via left mouse button (just click on some ...
mirzak's user avatar
  • 101
1 vote
0 answers
220 views

I've gotten back to making lwjgl games, and I'm trying to make a sort of wave type vertex shader. I call this to make it wave: ...
Pale_Gray's user avatar
0 votes
1 answer
1k views

I'm trying to create a sort of "graphing calculator coordinate system" where you can zoom into a point by scrolling with the mouse wheel. I'm using javafx's transformation matrices (Affines) ...
user156844's user avatar
0 votes
0 answers
281 views

A quick note about my server is that it executes game logic in 250ms intervals. I am trying to wrap my head around how to do this. The main issue I have is currently that I have the map of entityIds ...
Althaen's user avatar
  • 103
0 votes
0 answers
171 views

I recently started a project with some friends, Its a simple java game and im having issue getting the Collision and enemy movement working properly. Using this: ...
Crxzy's user avatar
  • 1
2 votes
1 answer
372 views

I'm trying to implement a Shader that turns any RGB values below 190 into black. LIBGDX code: ...
Rainma22's user avatar
0 votes
1 answer
255 views

...
GoldCredential's user avatar
0 votes
0 answers
90 views

I am creating a multiplayer Online quiz game in Android Studio using Java. I am having players registered using Firebase in my app. Ok so the main thing is , I'm having different set of quiz ...
Kumar Harsh's user avatar
0 votes
1 answer
139 views

Recently, I have been thinking about a hangout game, not really need to go into detail, because I am focusing on creating the engine itself. Basically just to make my brain not hurt while making the ...
Pale_Gray's user avatar
0 votes
0 answers
145 views

Edit I've rewritten the loader to duplicate data if only one element (v, vt, vn) is different. I get a much better result, but it is still incorrect. The seams on the mesh match what they should look ...
TheIceCubeDude's user avatar
0 votes
1 answer
115 views

Like the title says, how do I get the player from the LivingEntity so I can make this knockback effect on the amethyst sword? i want the amethyst sword to give knockback 10 to any entity i hit and in ...
BFZ's user avatar
  • 1
0 votes
0 answers
44 views

I'm trying to replicate an odd feature of an 2.5D online Fighting Game named Grand Chase - that I believe it's is made to hide the latency between players. However, I do not know what exactly is this ...
Luiz Henrique's user avatar
0 votes
1 answer
1k views

EDIT: Recently got it working by making a batch file that does this: set /p CP=<cp.txt java -cp %CP%;testing.jar me.pale.main.Main and cp.txt is this ...
Pale_Gray's user avatar
0 votes
2 answers
142 views

I am following this YouTube tutorial by TheCherno to make 3D graphics using Java Standard Library. Display.java ...
Aritro Shome's user avatar
0 votes
0 answers
195 views

For my layout, I have a Table in which I add TextButtons with a height of 20. I also set the height of the table to 30. When I now increase the height of one button to 30, the height grows not ...
ryetheapartmentred's user avatar
0 votes
0 answers
43 views

Recently, I've been making a 3D game, and I have more progress! I am trying to implement lighting, but when I want to change the directional light uniform manually, it gets weird. Here's an example ...
Pale_Gray's user avatar
0 votes
0 answers
69 views

I've been working on my first game recently, and I've built a player tracking camera that works great, but my goal for the game would be to have a camera that is fixed for each area that the player ...
cactushead's user avatar
0 votes
1 answer
480 views

Currently my program can only render my vertices as white and changes in my vertex and fragment shader don't change what gets rendered for some reason i.e: (...
user8380672's user avatar
0 votes
1 answer
411 views

I'm currently making a 2D RPG in pure Java (yes, I know other frameworks/engines exist xD). I just created a resizing algorithm and I've noticed that different resolutions result in different FPS ...
ElliottV4's user avatar
0 votes
1 answer
152 views

I'm making an inventory system for my pure Java game right now. Currently, the game runs at a 60UPS, and inputs are checked each update. I have inputs set up using arrays of the current update and ...
ElliottV4's user avatar
0 votes
2 answers
1k views

I have coded a simple video game in Java. It works fine on all computers that have Java installed. However, I would really like to play it on my smartphone and it would also be nice to be able to play ...
Saitou Gin's user avatar
0 votes
0 answers
141 views

I making a 3D game like Minecraft in LWJGL 2 and now, I want to move player camera with mouse like Minecraft. Here are the codes I have: com/kg/kgcraft/KGCraft.java: ...
sbh's user avatar
  • 1
-1 votes
1 answer
350 views

Recently, I've been making a 3D game and I have been having trouble with making multiple shaders. I've researched this for a bit, and told that I had to use ...
Pale_Gray's user avatar
0 votes
1 answer
220 views

Recently, I am making a 3D game. I want to do special post processing effects, like pixelization. I used this to load do everything with FBOS, but it's kindof weird... In some code for the ...
Pale_Gray's user avatar
0 votes
1 answer
382 views

I am currently programming my first game in Java and I'm having trouble structuring it. My biggest concern is regarding the game loop. Currently I have implemented a class with only a main function ...
gina16's user avatar
  • 1
0 votes
2 answers
219 views

I am working on a 2D game in Java. My goal is to place a ball as close as possible to the center without overlapping the balls that are already there. How can this be done?
gina16's user avatar
  • 1
0 votes
1 answer
337 views

I am writing a chess game using Java and Swing, And I wanted to get the tile position on which a mouse clicked. I searched through internet, but all of them were really off, and never accurate. When I ...
anonymous's user avatar
0 votes
0 answers
23 views

I am writing a chess game using Java and Swing, And I wanted to get the tile position on which a mouse clicked. I searched through internet, but all of them were really off, and never accurate. When I ...
anonymous's user avatar
1 vote
1 answer
425 views

I had an old pure Java 2D top-down game that I'm trying to reformat a bit. Before, I had a bit of a messy game loop that didn't use delta timing for any movements or animations. Now, I'm trying to ...
ElliottV4's user avatar
0 votes
0 answers
53 views

Recently, I've been making a game. I do not want to try to use VAOs and VBOs because I cannot wrap my head around that stuff. But, in order to use custom shaders, I need an arraylist of things to add ...
Pale_Gray's user avatar
0 votes
2 answers
389 views

Recently, I am trying to make a 3D game in LWJGL 2, not LWJGL 3, just because I am more familiar with LWJGL 2. Since LWJGL decided to shut down their legacy wiki website, I've been researching alot ...
Pale_Gray's user avatar
1 vote
0 answers
1k views

I have a game with massively parallelizable logic, which I intend to write calculate on the GPU (Java/LibGDX). I am planning to implement a logic for it through a fragment shader, instead of a compute ...
Dávid Tóth's user avatar
1 vote
1 answer
829 views

After some months on libGDX, I chose to make a little java game library based on LWJGL. I have already tried to do it, but got stuck on this same problem: how render text on screen. The first time, I ...
DynoZ's user avatar
  • 25
0 votes
0 answers
65 views

I am programming a 2D game. When a ball is launched it should decelerate and eventually come to a stop. I have implemented the deceleration part but when the ball nearly stops it starts accelerating. ...
lucyKel's user avatar
0 votes
0 answers
230 views

I'm developing a 2d isometric game on a engine made by myself (as a way to practice Java), however i'm stuck on what it seems to be a math problem. I wish I could have some help on how to implement a ...
Luiz Henrique's user avatar

1 2
3
4 5
69