Skip to main content

All Questions

Tagged with
4 votes
1 answer
527 views

Single-player obstacle-avoidance space game

I was wondering what I could do to improve the gameplay of this game, as well as the graphics. I would like to use LWJGL, but the rendering library isn't important. I just need to find out ...
Rigidity's user avatar
  • 143
1 vote
2 answers
142 views

RPG Map Initialization

I am working on an RPG in Java and I am using a tile-based map. The characters will not be building, so I will not need to store the maps outside of the game, but I feel as if there is a more ...
WeaponGod243's user avatar
4 votes
1 answer
3k views

A simple Java game where the player guesses the word

It's a simple word guessing game. The game picks a random word - you guess a letter until it's correct, the game automatically starts a new one. Is my code readable? Am I doing anything that could be ...
APersonOnStackExchange's user avatar
5 votes
3 answers
1k views

Java version of card game "higher or lower"

First of all, I have my basic main method which does pretty much nothing: ...
Clint's user avatar
  • 111
1 vote
1 answer
64 views

Path Following Algorithm for Entity

Within my game there are many entities, where each entity has a path (Array<Vector2>) assigned to it. No path to follow (indicating that the entity should ...
Mario Ishac's user avatar
6 votes
2 answers
968 views

Collision Detection in a 2D shooter game

I have the following code that works just fine for collision detection. The only problem is its size and its performance. I'm trying to do it and many other things 60 times per second, which doesn't ...
Plqsmic's user avatar
  • 197
5 votes
1 answer
107 views

Draw the tiles of the islands that are within bounds, using LibGDX

I am new person regarding LibGDX. I have written the below render method. I have a randomly generations oceans (where there are islands at random positions). Within the below code, ...
Mario Ishac's user avatar
4 votes
2 answers
171 views

Optimized updates of a grid-based particle system

I've been working on a game somewhat similar to this one for a little while now. My game is based around a 'board,' which is filled with different types of particles that react with one another and ...
paleto-fuera-de-madrid's user avatar
7 votes
3 answers
1k views

Moving game objects along an A* Path

I am having a game with a lot of GameBodyObjects and some of them are moving, some of them are not. When I calculate A* for the moving objects it gets really slow ...
durisvk10's user avatar
  • 171
5 votes
1 answer
352 views

Collision detection method

I think everyone has some code they are embarrassed and not proud of and today I have decided to show mine. I'm not sure how to go about making this more efficient. At the time I was just happy it did ...
SJJ's user avatar
  • 51
2 votes
0 answers
88 views

Don't Update Every AI Every Tick

In my game there are AI characters that try to either steal your gold or destroy the walls of your castle. Previously I simply updated them all every second, but with a large number of characters on ...
bazola's user avatar
  • 8,589
4 votes
1 answer
3k views

Tetris random piece generator

I was inspired by this Reddit /r/dailyprogrammer challenge: Contrary to popular belief, the tetromino pieces you are given in a game of Tetris are not randomly selected. Instead, all seven pieces ...
JSextonn's user avatar
  • 686
5 votes
2 answers
3k views

Unexpected Low FPS while drawing images

I am in the process of making a game, and during this endeavour, I have come across problems maintaining a good frames per second while drawing my sprites. When I draw my background image, my frames ...
Colourfit's user avatar
  • 185
5 votes
2 answers
293 views

Movement around a large map

I'm trying to make a small shooter game, where you can only see a small portion of the map around you. The map will also be much larger then the actual JPanel (The panel is 1000 by 1000, the map ...
Acuzik's user avatar
  • 53
2 votes
2 answers
178 views

My spaceship is slow to explode after being hit by the asteroid

I am making a game for my computer science class. My professor's requirements are: Write a Processing program that draws a triangle in the middle of the window. Rotate the triangle when the left and ...
Ping Lin's user avatar

15 30 50 per page