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
2 votes
2 answers
654 views

I can manage to achieve this but the code seems to be much longer than it should be. Velocity is given an initial value, either positive or negative and then is ...
Hasen's user avatar
  • 194
1 vote
0 answers
125 views

I am developing a simple text-based game from scratch in Java. In this game, the user is able to collect items and store them in an inventory. My question is: how should I organize the internal ...
CCD's user avatar
  • 111
1 vote
1 answer
352 views

How can I set an actor to an absolute / fixed position on my TiledMap, such that it does not follow the camera when I pan around? Currently my code looks like: ...
Claire's user avatar
  • 11
0 votes
0 answers
84 views

I've been in trouble for weeks now and I don't understand why it doesn't work for me! I have tried so many things and I just can not understand. I try to get one player to get a knockback as soon as ...
RonDev's user avatar
  • 3
1 vote
0 answers
33 views

I'm trying to make a board game, there the player has to press four buttons to make the L. It can be mirrored or rotated, it just has to be an L. But if the player press four buttons and make another ...
Yan Oguino's user avatar
1 vote
1 answer
509 views

tl;dr The question is rather simple: how unsynchronized can internal clocks be between different machines? Context We have a "hybrid" approach where the Clients are authoritative on certain ...
payne's user avatar
  • 113
-1 votes
1 answer
1k views

Iam trying to create a 3D game in Libgdx, so I created a 3d World with physics, and added just a small terrain and capulse (the Player) . I want to make the game first person, so I created a player ...
Osama Gamal's user avatar
-1 votes
2 answers
115 views

I'm working on a 3D game engine, currently I load ALL of my 3D modells into the memory when my game starts, but obviusly there will be hundreds of 3D modells, so somehow I should unload them when they ...
user140927's user avatar
1 vote
0 answers
157 views

I am trying to run the Particle Editor that comes with LibGDX in Netbeans. The gdx-tools-1.9.10.jar file shows up in my dependencies, and I can see all of the ...
Charlie Armstrong's user avatar
1 vote
0 answers
443 views

I'm able to create a custom cursor no problem using the following code running in my GameScreen's Show method: ...
Hasen's user avatar
  • 194
0 votes
1 answer
264 views

The error in question is [Inferred type 'I' for type parameter 'I' is not within its bound; should extend 'net.minecraft.item.Item'] on the following snippet of code ...
Scott's user avatar
  • 1
0 votes
1 answer
329 views

I'm trying to start LWJGL 3 development and I am having an issue with getting things working. I have created a new Gradle project and successfully built the HelloWorld example from https://www.lwjgl....
Robin Elvin's user avatar
1 vote
1 answer
206 views

In my top down shooter game, the player can face in any of the 8 compass directions using the keyboard. Depending on the direction, the player will have a 90 degree field of view to turn based on the ...
Hasen's user avatar
  • 194
1 vote
1 answer
269 views

The tiles for my top down 2D shooter are 32x32 and the player and enemies are too. But obstacles like walls and other things can of course be smaller than this - the smallest being 8x8. This causes a ...
Hasen's user avatar
  • 194
1 vote
1 answer
134 views

My model must support transfer textures but I can't do this using mesh + modelBuilder.part Opacity is tested correctly on only half of the model. ...
Yuu's user avatar
  • 21
-3 votes
1 answer
52 views

I want fish to increase speed when score gets high, or when the fish eats some balls ...
user140701's user avatar
3 votes
1 answer
3k views

I am a novice programmer and just learned about the concept of saving and loading games. The way I am doing it is to write data into a text file and read it afterward. However, I realize how insecure ...
KacyDillon's user avatar
1 vote
1 answer
504 views

Take this image for example, the game is called Realm of the mad god, and it has this side panel filling the whole screen height with the player info. To reproduce it, Is there any way to make the ...
juanSenna's user avatar
0 votes
2 answers
364 views

I have a formula which returns a Lerp Vector3 value in integers but the problem is it never reaches the desired target value. It'...
Hasen's user avatar
  • 194
0 votes
1 answer
620 views

I need to use glyphlayout so that I can centre the text, but I found if I do the text gets distorted due to the spacing being incorrect. ...
Hasen's user avatar
  • 194
0 votes
1 answer
2k views

When I build normally my android app it execute without no problems, but when I go to File -> Buil and Run and I eneble Development Build and Autoconnect to profiler I got this error ...
eflores's user avatar
  • 11
0 votes
1 answer
88 views

I made a raycasting engine with wall textures. Before adding the texture the engine was silky smooth. With textures it has small lags (or stutters) when i move around and i would like to know why. My ...
Frédéric Bélanger's user avatar
0 votes
3 answers
1k views

I am having this exception on title. I have been following a LibGDX programming PDF, everything was working perfectly and then this code have been implemented, and it isnt working anymore. I should ...
juanSenna's user avatar
2 votes
1 answer
351 views

Suppose I have this picture: I have a map like this created in Tiled already. I would like to draw collision lines (the green ones in the picture) without having to make it a polygon. As far as I know,...
Rohan's user avatar
  • 135
0 votes
0 answers
73 views

I'm programming in Java. I have more than 200 MB of images used in my games, something like 100000 40x40ish images. I initially wanted to load them all during app initialization but it took like 2 ...
Axel Carré's user avatar
1 vote
1 answer
149 views

How can I draw an image inside a rectangle? I am introducing myself in the manipulation of images for games, I have a window and inside there is a rectangle that deforms. I would like to fill the ...
molo32's user avatar
  • 111
1 vote
1 answer
225 views

I'm in a dilemma over using Enum Types or using class objects in that particular part of my java project. Let's suppose I have an array where I constantly add and remove things from it, but I also ...
vikAy's user avatar
  • 123
0 votes
0 answers
51 views

My game server currently launches a thread for each connected client, and handles all data exchange through that socket in a server-blocks-until-client-requests fashion. The problem derives from the ...
roymcclure's user avatar
1 vote
1 answer
447 views

Hi everybody I am making small game using pure Java 8 and rednering it by Java AWT Graphics2D method . My question is how to make that user can change the quality ...
user avatar
0 votes
1 answer
128 views

I am getting this error on creating body in contactListener ...
Shubham Agrawal's user avatar
0 votes
1 answer
411 views

I am developing a game (in Java) that is going to have a lot of textures and images in it. What is the most efficient way to load all the textures? I was thinking on pre-loading all the images ...
Tair Galili's user avatar
0 votes
0 answers
152 views

I have implemented a gif-button for my libgdx game that allows the player to store the last few seconds of gameplay as a gif. It works by storing frames in memory, and encoding them into a gif if the ...
Kasuyakema's user avatar
0 votes
0 answers
10 views

My game consists of a player that hopes between ropes. For now, I created the player and the rope classes. Each one contains details about the object and its movement patterns. What is the next step ...
aqw's user avatar
  • 21
-1 votes
1 answer
73 views

I would like to render 4 similar ropes in my game that are equidistant on a landscape mode display. How can I proceed? My screen is 1920*1080, at 420 dpi. Is there any way that I could link the ...
aqw's user avatar
  • 21
2 votes
1 answer
135 views

I am trying to build this game where the player hops between a number of ropes. For now, in addition to my main activity that I kept empty, I built two additional classes: ...
aqw's user avatar
  • 21
0 votes
1 answer
91 views

There is an online game in which you can collect things of different values: ordinary, epic, legendary. The cheapest things are ordinary, the more expensive are epic, and the most expensive are ...
nikitafrolov547's user avatar
0 votes
1 answer
281 views

I have an inventory UI which is a table in scene2d. Then the table had a bunch of Containers which are basically inventory slots. They have a transparant grey background color. Then in each container ...
TJRC's user avatar
  • 131
1 vote
0 answers
386 views

I left this question on "normal" stackOverFlow but they recommended I asked you guys! I am new to making games in Java but I made some games using the paintComponent method, however I felt like I was ...
DubstepZedd's user avatar
0 votes
0 answers
58 views

I'm developing a little game that has a bunch of different items. I categorize the items in separate classes (consumables, armor, weapons) that all extend Item.class. Then I use one main Items class ...
TJRC's user avatar
  • 131
1 vote
0 answers
653 views

I'm developing a small Java digital card game project. In my game, players can perform skills when using cards. Each skill does different things, like deal damage, heal etc.. I'm looking for a way to ...
uchi23's user avatar
  • 11
2 votes
1 answer
1k views

I am coding an Asteroids game in Java. In the real arcade game, asteroids are made of irregular shapes like this: When I code, I can only set asteroids to 1 or another specific shape, like this: ...
Laser Infinite's user avatar
0 votes
0 answers
84 views

I am making small isometric game, where I want to do something when user clicks a tile. I can simple do it by mouse location, but I want to be able for zooming and moving camera. It will be 2D game ...
user avatar
0 votes
1 answer
294 views

I'm trying to create an android game using libgdx with a Titlescreen, you just press start and your game startes. However I'm having difficulty trying to get these buttons to work. The titlescreen ...
stayutazen's user avatar
2 votes
1 answer
616 views

Any one have any ideas on how I can serialize / de-serialize an ObjectMap<Enum, ObjectMap<String, Object>>(); (Object is usually a String Integer ...
Macmanmatty's user avatar
1 vote
1 answer
513 views

I am working on a simple game with topdown movement, but I am unable to get the collisions to work properly. I know the collision detection itself works, but the constraining of the player is where I ...
Marc Rozendaal's user avatar
1 vote
1 answer
1k views

I have a University Project to create a simple game in Java. To challenge myself am trying to utilise sprite sheets. My issue is that the whole Sprite sheet is being shown rather than the section that ...
RhysGP15's user avatar
0 votes
1 answer
83 views

I am looking up tutorials on how to make 2D games, and I can just copy and paste their code but I would rather know what it means and how to do it. Suppose you have a 2D game window that has a map ...
David Rees's user avatar
0 votes
1 answer
187 views

I am following a tutorial on YouTube for making a 2D game. There is no clear explanation on what its actually doing. I get bit-shifting and & operator but I don't know what they mean in this ...
David Rees's user avatar
1 vote
2 answers
259 views

I'm trying to write a Java class to generate Perlin Noise from a Cartesian coordinate. I'm trying to follow this tutorial but I am struggling to understand the theory. Specifically, how do you divide ...
joshua jackson's user avatar
1 vote
1 answer
535 views

I've scoured gamedev for around 45 minutes, but I'm unable to find a detailed approach to implementing a movement and collision system for games - specifically, when to use which process, and what to ...
Robo Mop's user avatar
  • 111

1
3 4
5
6 7
69