0
votes
2answers
100 views

Make objects slide across the screen in random positions

I want to make an object appear randomly at the right hand side of the screen and then slide across the screen and disapear at the left hand side. I am working with libgdx. I have this bit of code but ...
0
votes
2answers
75 views

How can i Randomize Unique Numbers in Java [duplicate]

So i'm making a game where i have to randomize 52 numbers from 1 to 52 so the order has to change i use this class Deck { Random r = new Random(); int[] Card = new int[52]; }
3
votes
2answers
427 views

How to zoom randomly generated maps?

I made a Java program which generates a random map based on Perlin Noise + Poisson Algorithm + Voronoi Diagram. Here you can see a generated map. White are caves, black is empty. The problem is ...
2
votes
3answers
681 views

Using random numbers with a bias

I appear to be awful at describing the question so I'll try and describe the problem. I want to add a random amount of heads to my creatures but I want to be able to determine several things. a) The ...
8
votes
2answers
742 views

Random Zelda-style map generation

Im trying to randomly generate a map of rooms connected by doors, and I've succeeded in generating one using this code: public void generate(GameContainer gc) { rooms = new ...
1
vote
1answer
526 views

Random Movement for multiple entities

I have this code for a arraylist of entities. All the entities use the same random and so all of them move in the same direction. How can I change it so it generates a new random number for each ...
2
votes
2answers
532 views

How to create reproducible probability in map generation?

So for my game, I'm using perlin noise to generate regions of my map (water/land, forest/grass) but I'd also like to create some probability based generation too. For instance: if(nextInt(10) > 2 ...