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
1answer
24 views

Google Play Game Services Detecting Top 3 Players

I used Google Play Services Leaderboard in my Libgdx game. This is what I want to do; I would like to give awards to the best 3 players in this table. How can I help you? It automatically connects to ...
0
votes
0answers
10 views

libGDX box2D not setting user data

I am working about box2D. Even if I set userData, when I retrieve it via getUserData(), it returns null. Using debugger, I noticed that object passed to setUserData() is not null, but on the next ...
0
votes
1answer
26 views

Mcreator (Minecraft Mod-making) Compile Error

I'm trying to make a tool pack but every time I get the message: ...
0
votes
2answers
66 views

Vertexes passed to OpenGL becoming zero

I've got two methods of test code. The first uses a single VBO with the vertices and texture coordinates interwoven to draw a square to the window. The second uses an array of three VBOs to define the ...
0
votes
0answers
30 views

First person camera turning 3D

I know how to make the effect of moving an object on the z axis, and strafing, but how do you make the effect of the view turning, I don't use any 3d libraries or engine
1
vote
1answer
21 views

LibGDX Bounding system with tiledMap, 3D model player and ortho cam

Begins explaining my achieve: as I said in my last question, I am tryna makin' a 2D game with 3D player as Factorium. For hours I am tryna to make a kinda of bounding system: 1)Camera will follow ...
0
votes
0answers
22 views

How to restart my Snake game after Game Over

I'm new into programming and trying to implement a way to restart my snake game after the game is over. I tried several ways but none worked out for me. Can someone maybe help me? ...
0
votes
1answer
28 views

LibGDX make player rotate towards mouse pointer (Player facing mouse)

I am tryna makin' a 2D game with a 3D player (kinda of Factorium). I got stuck on the rotating of the player. I'd like it look always torwards to the mouse. e.g. If I move mouse on the top-left of the ...
0
votes
0answers
15 views

How to Show Daily Notification Using Libgdx Alarm Manager?

In a game written in Libgdx, I want to show users some daily notifications with the help of alarm manager. These notifications will be independent of Firebase. In other words, I will not send the ...
1
vote
0answers
41 views

How can I fix glitchy Collision on my 2D game?

Update: I fixed the Negative axis glitch but the Invisible wall glitch still exists I have made a 2D game in Java and I rewrote collision as I added chunks. I have been having problems with the ...
0
votes
0answers
39 views

How to Add Google Play Games Services Leaderboard to Libgdx Game? [closed]

** I have a game developed with Libgdx game engine. Reskin did. Now I'm trying to add a leaderboard to the game with the Google Play Service. I tried ways on the Internet, I didn't. Can you tell me ...
1
vote
1answer
38 views

Skill button cooldown

When a spell is on cooldown I display a "unfilling" black bar over the spell GUI until the cooldown is reached. Problem is when i have more than one second of cooldown the scale of the "...
0
votes
1answer
37 views

Check if point lies within coordinates

Let's say I have min (0,0,0) and max (1,1,1). If I have 3 points, lets say a (0.2,0.4,0.2) b (-0.5,0.8,0.2) c (2,0.3,0.1) How would I go about calculating it those points are within the coordinates ...
0
votes
1answer
31 views

Rotation on one object affects all others

I am making a game using LWJGL. I have encountered a problem with rotation, looked it up, found a solution, and added it, but it doesn't entirely work. In the code below, the bottom section is ...
0
votes
1answer
30 views

LIBGDX: Shoot a bullet using mouse position

I want to shoot a bullet towards my mouse position but I think that my math is probably wrong since the position the bullets travel to isn't the right one. Here's my code ...
0
votes
0answers
15 views

LibGDX TiledMap Rendering

For the life of me I cannot figure out why these lines keep appearing on my rendered tiled map. Every time I resize my libgdx window, the tiled map creates lines all across the screen. I have adjusted ...
0
votes
0answers
26 views

LibGDX normal vector of a plane

I'm currently developing a 3D game with LibGDX, and I'm a bit stuck, and couldn't find any definitive answer. I have a plane, part of a bigger g3db file, to which I'd like to get a normal, to ...
0
votes
1answer
41 views

It is possible to process data on relay servers?

I have a small game engine done in Java, and re-creating it on C++. While re-creating it i've decided on adding basic p2p online multiplayer. However, after reading more about networking, there are ...
0
votes
1answer
32 views

How can I add a button that opens a pop-up?

I have developed a game with a libGDX game engine. I want to create a button on the game screen and add a popup to this button. How can I do this? My current code: ...
-1
votes
1answer
25 views

Mathf.PingPong equivalent in Java

I am making a 3D game with java using the Processing 3 framework. I need the Mathf.PingPong() function from Unity so that I can make a bouncing ball. Unfortunately, ...
0
votes
0answers
20 views

How can a make a game end and display win message when the mouse/figure is placed/clicked on a certain tile?

I am trying to make a game, kind of like Minesweeper, but instead of looking for mines, you are looking for a 'hidden base' that is hidden under one of the unturned tiles. I am new to this and have no ...
0
votes
1answer
30 views

Iterating through map : need help getting cluster of flags (points) while avoiding duplicates

I have a grid style game where I make use of objects called flags which have points attached to them. I want to be able to look at the map and find the tile(position) where it maximizes the points (...
0
votes
1answer
49 views

Swept AABB: finding collision normal in 3D?

I was following this tutorial which explains how to detect and resolve a 2d swept aabb collisions. I got the detection part working on 3d, but know I need a way to properly make a response, like ...
0
votes
0answers
72 views

FPS drop on rendering

I am trying to create my own game in java (without OpenGL, LWJGL etc) and I am having a problem with the rendering. My map is pretty big and the game redering the entire map at once which cause a ...
0
votes
0answers
51 views

How to integrate Firebase to Libgdx?

I have an android game built with libgdx and what I'd like to do is to add some kind of authentication so I can connect the game with user data to firebase database. I have some experience with ...
0
votes
1answer
76 views

A* algorithm: need help fixing path that come in contact with obstacle

I am using A* as a pathfinding technique for my AI; it works fine until it gets close to an obstacle (in my case rocks). Right now it just continues the loop if it finds a neighbor thats a rock. It ...
0
votes
0answers
24 views

What does “ShapeRenderer.ShapeType.Filled”, “ShapeRenderer.ShapeType.Line” and “ShapeRenderer.ShapeType.Point” do in libGdx

I am creating a game and I wanted to include collision detection when I came across this: shapeRenderer.begin(ShapeRenderer.ShapeType.Filled); What is this and ...
0
votes
0answers
88 views

Java Game: Using minimax or similar algorithm for AI battles

Game Info: Type: grid based ship game; where ships are one-directional (meaning they can only use the allowed moves in the direction it is facing) Allowed Directions: NORTH,SOUTH,WEST,EAST Allowed ...
0
votes
1answer
71 views

Java A* Algorithm: going to a specific tile that moves you to another tile

I have my AI to where it only looks at the 3 tiles in front of it for pathfinding which depends on the direction. However during pathfinding it may check a tile that is a action tile. An action tile ...
1
vote
1answer
60 views

Java Game: A* Algorithm (searching only cells in front of character)

Game Type: grid tile map that is turned based Directions allowed: Left, Forward, Right (to reverse directions you must either use two lefts or two rights) - both left and right moves diagonal but ...
0
votes
0answers
40 views

box2D vs manual collision handling in libGDX

I am developing a fairly simple game with Zelda-style physics where the only moving objects will be characters and other entities, however I am using a randomly generated (all in code, no .tmx) tile ...
0
votes
0answers
18 views

Determining IF & WHERE a line intersects with a 2D plane (in 3D space) [duplicate]

The following problem I'm working on is for one of my favorite past-times: game development. Problem: We're in 3D space. I'm trying to determine if a line between two vectors in said space is passing ...
0
votes
1answer
27 views

How do you register two or more keys properly?

I am experimenting with KeyListeners and I thought about how do I register two or more keys, this is my code so far: ...
0
votes
0answers
40 views
0
votes
0answers
18 views

Why doesn't my fmx TiIeMap render?

I've a .tmx map made with Tiled. In my map there is one Layer and one Object. I'm able to load the object but I don't understand ...
0
votes
0answers
24 views

LibGDX program crashing on on StepSimulation call

I am trying to add a Character Controller to a Discrete Dynamics World in Bullet via the LibGDX wrapper and everything seems to work, but when I attempt to update the world via the StepSimulation ...
0
votes
0answers
34 views

Problems arise when using a VBO compared to a uniform for mat4

I've been learning LWJGL and was originally using instancing and using a uniform to send all the mat4 data to the shader for the individual positions. I'm trying to switch to using a VBO for this ...
1
vote
2answers
239 views

Crash when Setting Up Minecraft 1.12.2 Mod in IntelliJ

I'm trying to set up a Minecraft modding environment in IntelliJ. (I've settled for 1.12.2 as this version still by far the largest stable platform for Forge modding with the best support.) Anyway, I'...
2
votes
0answers
26 views

Synch clocks between client and server in Java

We're developing a simple boggle game in Java for a college project (purely academic purposes, so we're trying to keep it simple). Our application is composed by a client portion and a server portion. ...
1
vote
0answers
21 views

Parallax camera is not independent from the stage camera

I have a weird camera problem that I can't solve! I add my actors to the main stage and use its camera too. Actors are constrained within the screen viewport. I also have a second camera that I use ...
0
votes
3answers
59 views

Java - how to reduce iteration loops for enemies

I have many places in my code where I'm iterating through the enemies array and it seems to me it could be optimised somehow, but I can't see how it can be done. For example these two loop checks: <...
0
votes
0answers
38 views

Java simple dust cleaner game simulator

I am working on a dust cleaner simulator on Java, in this case the shape of the cleaner is a circular ball. The program is quite simple, the user puts in the width and length of the "room" ...
0
votes
1answer
53 views

2d gravity simulator - smaller object orbiting towards center of bigger object

In my libgdx test game, I have initially created 2 circle objects (stellar) about which I will say more in details below. However, my goal is to simulate gravity in 2d, where smaller object orbits ...
1
vote
2answers
124 views

Calculate aim angle dead zone range

In my top down 2D shooter game the player has a shoulder mounted gun which rotates and aims automatically at enemies - that part is all working fine. Since the player can rotate as well, the gun is ...
2
votes
1answer
142 views

Potion effect never wears out

I am writing a mod for Minecraft (in Java, duh) and want to apply a random potion effect like this: ...
0
votes
0answers
45 views

Efficient method for Sprite Stacking in LibGDX

What would be a very efficient method for creating a suede 3D effect by stacking sprites much like the game like NIUM in LibGDX I find it easy to create a rudimentary system that stacks textures in a ...
0
votes
0answers
50 views

How to change the border color of a button in libGDX?

How to change the border color of a button. I know how to change the background, but I don’t know this, although I reviewed the entire documentation. And is it possible to find out whether the button ...
0
votes
1answer
56 views

Weird black lines when rendering in my Java Game Engine

I have an issue regarding weird horizontal and vertical lines that occur in my game engine. The lines is in the background color. It occurs when I draw a lot of tiles in this way: ...
0
votes
1answer
25 views

Android Game - Screen Flickers When an Entity Removed From The List

I am using Canvas in my android game. When I remove a no longer displayed entity in my entity list, all other entities are flickering for a brief time. When it's not removed, there is no such problem. ...
0
votes
0answers
119 views

Game server multiplayer architecture

I'm planning to build a big browser multiplayer game with gameplay very similar to agar.io but rpg. Game will be containing rooms as It's done in agar.io. 50-100 players max per room. Realtime. 10ms ...

1
2 3 4 5
67