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
0 votes
0 answers
24 views

I have a question about 3D in Java. How to upload and display non-skeletal animation? [closed]

I have a question about 3D in Java. I need a program to show a 3D model, which is a panel with buttons, a screen and toggle switches. When you click on a button or toggle switch, the corresponding ...
VargMen's user avatar
0 votes
0 answers
13 views

Launch4J wrapped jar produces JNILibLoaderBase errors

I created an executable jar file bundled with JOGL, then wrapped the jar into a windows executable using Launch4j in order to pass runtime java parameters. If I run the jar from a command prompt I get ...
JonB's user avatar
  • 1
1 vote
0 answers
42 views

LWJGL3. A strange graphic artifact of OpenGL 3.x

I work in java with lwjgl3. I came across a strange artifact, the source of which I have not been able to determine for a very long time. I'm drawing a large surface. When I approach this surface and ...
alfabouh's user avatar
0 votes
0 answers
17 views

I use skin composer, I want to create scene in scene composer, I can't add text buttons even though I created text buttons

I create text buttons, add every image and font, but it's still disabled when I want to add button in scene composer. I'm probably doing something wrong.
p3tition's user avatar
0 votes
0 answers
25 views

How do I go about making an enemy change depending on where the player hit it?

Currently coding in java, using cocos engine, making a low-poly game with a world which changes based on what the player does, hopefully including the aspect of an enemy changing when the player hits ...
AussieNote's user avatar
0 votes
0 answers
37 views

Brick Breaker - Adjust ball's collision angle without affecting speed

I'm working on a Java Brick Breaker game, and it's functional so far. However, I'm facing an issue with collisions. Currently, when the ball collides it simply reverses its direction. I want to ...
Zappiermike's user avatar
0 votes
0 answers
19 views

Blinking JLabel for Wordle-like game?

I would like to implement a blinking effect on a JLabel in a wordle knockoff I'm making. I think this will involve using javax.swing.Timer but I'm not sure how I ...
CodingNinja's user avatar
0 votes
0 answers
27 views

Why is my font not found?

Trying to follow this tutorial with using toasts in LIBGDX: Libgdx - notification popup (something like Toast) - on both Desktop and Android But i get this error when compiling: ...
Jonasoos's user avatar
0 votes
0 answers
22 views

Bone Indices from GLB Files

ChatGPT and I wrote a GlbImporter for a simple 3d engine written in Java. I can load any Glb model and extract and apply its diffuse textures. Extracting the bone animations is a different problem ...
Susana Hewitt's user avatar
0 votes
0 answers
25 views

Image fragments when moving up and or left

Not entirely sure how to resolve the issue as I am quite new to programming, however this seems to be my last option in terms of finding an adequate solution. EDIT: https://streamable.com/0i92xq - ...
jah's user avatar
  • 1
1 vote
0 answers
99 views

Realistic bouncing ball physics

I am trying to implement realistic physics for my game plinko. As of now i only implemented the inversion of the velocity and the distance between both objects. ...
Jonasoos's user avatar
0 votes
0 answers
34 views

How can i translate this code into java?

My only problem translating the code from this question/answer is the Vector2 method. In the web i could only find this replacement (Vector2f). But i can not import it : can't resolve reference. Also ...
Jonasoos's user avatar
0 votes
1 answer
39 views

Modifying LibGDX vector2's seems to do nothing

I have a piece of code similar to this: Vector2 test = new Vector2().setLength(20).setAngleDeg(45); But when I'm trying to print its contents (such as ...
big papa's user avatar
0 votes
0 answers
37 views

LWJGL Shader not displaying anything to the screen

My basic shader program isn't displaying anything to the screen. Please Help! Here's my code: ...
pcarroll17's user avatar
0 votes
0 answers
49 views

Only first line/column of level text file gets loaded into tile map

I'm trying to make a map using a text file, but it only does the first line / column and not the rest. I know the problem is in getTileImage. ...
Nobodyis_here's user avatar
0 votes
0 answers
21 views

Having trouble creating an unbound game using FXGL

I am trying to recreate a game like Splix.io using FXGL, I have implemented the logic of the game for one player and it works. And for my game window I am using a 800*800 window. My problem is my game ...
Pourya Aliannejadi's user avatar
0 votes
0 answers
67 views

How do I move a camera around a tiledmap in Libgdx?

I have the following code for rendering a TiledMap and moving around a Texture representing the player on top of it and the camera is setup to follow the texture around. However, when I try to move ...
Sagnik Dutta's user avatar
0 votes
0 answers
43 views

How would I make a self updating launcher for my game in Java?

I have a game I am working on, and I want to make a launcher for it. I am having trouble finding information on how to do it in Java (my video game is programmed in Java, so I do not want to use C#, ...
KSPortalcraftDev's user avatar
-2 votes
1 answer
61 views

why when i press "A" i go up but its supposed to go left?

...
Nobodyis_here's user avatar
0 votes
0 answers
49 views

Jagged peak artifacts on terrain

My terrain rendering shows these jagged peaks along the edges of some hills: Why do these occur, and how can I fix this? Here is the code I use to initialize my surface and draw a frame: ...
Ramazan ŞAHİN's user avatar
1 vote
2 answers
138 views

Is it appropriate to design heroes as items in game development?

If you were to design a multi character game like "Genshin Impact", would you design the character(hero) as a item? What is an item: in our game design, an item is an object within the game ...
Criwran's user avatar
  • 111
0 votes
0 answers
40 views

speeding up image manipulation for shadows- engineless

so my project is a ray-casted lighting system thats trying to implement soft shadows. the ray casting is working currently, so right now my focus is on performance of the soft shadows portion. i use ...
Potat.OS1's user avatar
0 votes
1 answer
91 views

Unknown enum type when modding Minecraft recipes with CraftTweaker

I want to make some new Recipes with CraftTweaker, which uses machines from the Create mod (I'm using Life In The Village 3), but I have the following error in my scripts: ...
Lucas Plt's user avatar
0 votes
1 answer
124 views

How to improve performance of LiBGDX Android app?

After creating a few bodies and a map with collisions, the app performance clearly goes down. However, RAM and CPU don't seem fully stuck, but the game experience is horrible nonetheless. GameScreen ...
ognevo's user avatar
  • 1
0 votes
0 answers
114 views

Good design for player input handling in 2d game

I am working on a java 2d game. Keeping things short, I'd like to improve my current input handling. Basically the player can move up/down/left/right with WASD, perform an attack with mouse left click ...
magister's user avatar
0 votes
0 answers
66 views

Canvas vs JPanel in game development?

I'm new to Java and I have seen that some games use Canvas and some use JPanel as the class that Game class inherits from. Here is a sample project but it's a bit old. I am not sure what should I use ...
Zielony XD's user avatar
0 votes
1 answer
224 views

How do I implement Minecraft Forge Config GUI (1.8.x)

So I have recently been working on a minecraft 1.8.9 forge mod, just to play around and see what there is (eventually I am planning on making a utilities mod with versions for 1.8-1.19, which is why I'...
MiSt Rocky's user avatar
1 vote
0 answers
28 views

Android TMX library no tile animation

Did anyone use this library? I am wondering if this library has a possibility to display tile animation? When I try to show my "abc_main.tmx" map (created in Tiled application) the tile with ...
mnietuniema's user avatar
0 votes
0 answers
21 views

Put two images on table in the opposite corners

I want to put my two images on the opposite corners of my table: one on bottom left, the second on the bottom right. How to achieve that? I have tried align() and <...
mnietuniema's user avatar
0 votes
0 answers
34 views

Position buttons near selected building in zoomed view

I am developing my first libGDX game. There is a TextureRegion (map) on which buildings are drawn. There is an implementation of camera movement and a zoom ...
Zerg's user avatar
  • 11
1 vote
0 answers
71 views

Animate buttons sliding in

I am developing my first libGDX game. I want to animate the buttons on the stage, so they transition into view instead of just popping into appearance. For example, each button should slide in from ...
Zerg's user avatar
  • 11
1 vote
0 answers
56 views

How to get the correct display mode refresh rate as a float in Java?

The following example prints 59 on my system, because the return type of getRefreshRate is int. ...
ceving's user avatar
  • 111
0 votes
1 answer
238 views

How to enable V-Sync in Java?

I have used the BufferStrategy, but my code runs still way too fast. xrandr reports that TearFree is "on" and the ...
ceving's user avatar
  • 111
1 vote
0 answers
55 views

i have a strange bug with collision, is there any way around this or do i have to pick a different method?

so lately i've been learning about abstract classes and interfaces, and i saw a neat yt video about falling sand games (think Noita) so i wanted to take a crack at it as some particles share a ...
Potat.OS1's user avatar
0 votes
0 answers
36 views

libGDX incorrect face rendering order

I want to ask why is libGDX rendering faces incorrectly. The faces are procedurally generated ModelInstances. The code which renders the models is here: ...
Dominicentek Gaming's user avatar
0 votes
0 answers
209 views

Why is my chess engine so slow?

This is my second question regarding my chess engine. I can search up to depth 6 but it takes >=30 seconds for the AI to move. Currently my engine uses alpha-beta pruning, zobrist hashing, null ...
AF_'s user avatar
  • 11
1 vote
2 answers
241 views

Why is my negamax algorithm returning negative infinity scores?

I'm currently in the process of writing my own chess engine in java and am having a little trouble with negamax. I've opted for negamax since its easier on the eyes and reduces the number of lines of ...
AF_'s user avatar
  • 11
2 votes
1 answer
46 views

How to organize game entities that are stored inside other entities?

In my GPS based game, there are certain structures the players can build that store units. For example, airbase structures store aircraft objects. Currently, the way I have this organized is the ...
user204468's user avatar
0 votes
0 answers
73 views

dynmap rendered map not loading on web page

I want to create a locator map that shows the location of all players on the server/in the world on minecraft. I am trying to use the 'dynmap' plugin to do this. I ran the command: ...
Caledonian26's user avatar
1 vote
0 answers
40 views

How to update the version of Box2D used in AndEngine?

I need help to use an updated Box2D library where the current version is > 2.3.0. I am unable to find a compatible library and do not know how to compile one for use with the Java Native Interface (...
Ankit Agarwal's user avatar
0 votes
0 answers
56 views

Eyedropper tool within Minecraft Java

I'm trying to make an eyedropper tool (one where it picks up the color the tool is being pointed at) for a Minecraft mod that uses Forge on IntelliJ IDEA. I already have the item/tool ready and able ...
leguchi's user avatar
  • 101
0 votes
1 answer
299 views

Registering recipe for Minecraft with Forge on IntelliJ

I'm using Forge on IntelliJ IDEA to make a mod for Minecraft, and I think I am stuck on where I need to register a recipe for an item. How I got to that idea: I tested it out and everything worked. No ...
leguchi's user avatar
  • 101
0 votes
1 answer
76 views

Where am I able to find the things that were imported using Java on IntelliJ?

I am trying to build a Minecraft mod with Forge on IntelliJ, and I am wondering where I can find the parts that are being imported. For example: ...
leguchi's user avatar
  • 101
0 votes
1 answer
85 views

Manage game states of a card game with MVC

I am creating a Yugioh java game with MVC. I was wondering wich is the better way to manage game states with MVC? I tought maybe I can use State Pattern in Model section with DrawPhase, ...
Zetsu_Zetsu's user avatar
0 votes
0 answers
51 views

Is there any game that can I make as a project of programming fundamentals in java under 500-1000 lines? [duplicate]

I'll be having my semester project of programming fundamentals in java. I'm a complete beginner and don't have much ideas. Since I'm fond of game dev I am thinking of making any logical and text based ...
Abdul Moiz's user avatar
0 votes
0 answers
137 views

Fix stuttering with fixed time step and interpolation

I am trying to fix my stuttering by using a fixed time step, but I seem to be missing something because it is not working. Can someone look at this and see what is missing? ...
wtcl's user avatar
  • 1
0 votes
1 answer
193 views

How will I make my character jump only when it is pressed once

I have scoured through the internet to find a solution of this but this is the only solution that I could find but it cancels the ...
dechire's user avatar
  • 13
0 votes
1 answer
3k views

Invalid maximum heap size: -XX:MaxHeapSize=4096m

I am trying to package android project in UE4.27. And getting this I tried changing environment variable _JAVA_OPTIONS: -Xmx512M -Xms512M not worked. Where can I change MaxHeapSize, please tell me ...
GEO's user avatar
  • 13
-1 votes
1 answer
35 views

Calculate index of bottom left block on a mxn grid

I am working on a board game that requires me to color the bottom left corner of the board with random number of rows and columns a different color from the other blocks. Given an m x n grid, how do I ...
Eliot Kim's user avatar
0 votes
1 answer
37 views

Algorithm to get all the blocks to the top and right of the current chosen cell in Chomp game

If I have a grid of 4x4, I want to get all the blocks/buttons in java that are to the right and top of the chosen block, how would I write an algorithm for it? For instance if the user picks the block ...
Eliot Kim's user avatar

1
2 3 4 5
69