Algorithms or methods to produce events or behavior that is random in nature.

learn more… | top users | synonyms

0
votes
0answers
18 views

some images on grid are not being displayed using random . [closed]

So I have an image that is going to be presented in a grid in random spots and I have a 2d array that will check if a position in the array is available or not. the problem is that not all images are ...
2
votes
1answer
182 views

How do “procedural” and “random” generation differ?

To my understanding, everything that isn't directly created by a human is called "procedural". Procedural generation systems have different complexities and may consist of various algorithmic ...
1
vote
1answer
21 views

change the position of f3d objects randomly in action script

I have a f3d object and have different boxes to place the parts of the f3d objects.When i click on the button change the position of the boxes randomly. How it possible?This is the code for random ...
0
votes
0answers
50 views

How do I procedurally generate a different animal randomly with object oriented programming in C++? [duplicate]

I am working on a puzzle game, which generates a different animal every time they. reach a cage at the top of the screen. I have the object code written down so that it respawns at the bottom again to ...
0
votes
0answers
16 views

Working with random numbers in Unity [duplicate]

I am randomly trying to generate few regions ( grass, ice, snow and water ) for one of my games inside Unity. Every time the game starts, these regions are randomly generated but at the same time I ...
1
vote
2answers
127 views

Random Placement of Objects on a Tilemap

I have read many topics on random world generation on this site and others, and I roughly understand most of it. What I can't see is how to randomly place objects on the generated tile map I get. Say ...
0
votes
1answer
93 views

Tiling 2D textures in random order

I am wondering what the best way to make a random set of 2D textures. Currently I have tried the follow code but I am aware that when this comes to collisions that would be an issue. Therefore I would ...
-1
votes
1answer
118 views

Are random generated mazes a nuisance? [closed]

To me, random generated maps such as in Diablo2 were often a nuisance. Many times, you find yourself in a dead end and have to find another way. However, Diablo2 became a very popular and addictive ...
2
votes
3answers
138 views

Persistence of Random

Sorry if this is such a simple thing, but for some reason I can't get my head around it. Imagine you have a world, that you have "seeded" with a value. You base all your randomisations off this ...
1
vote
1answer
64 views

What does the “random element” do in Cellular Automata

I'm reading this post on TutsPlus regarding procedural level generation using cellular automata. My question arises in this code snippet: float chanceToStartAlive = 0.45f; public boolean[][] ...
16
votes
2answers
1k views

Algorithm for procedureral 2D map with connected paths

Problem to solve: Generate a random 2D dungeon map for a tile-based game where all rooms are connected. I am looking for better solutions than what I currently have. My current solution is that I ...
0
votes
1answer
66 views

Enabling Unity GUI drawtexture permanently?

I'm trying to get an image to show in Unity based on a certain criteria. I would like the position of the image to be randomized every time on play. However since GUI.DrawTexture shows the image for ...
0
votes
1answer
51 views

How to simulate random scope movement?

I want to simulate that random and soft movement that lot of games got (like BF3) when you use the scope of a sniper gun, so the question is how to achieve that.
0
votes
3answers
212 views

Ensuring that a randomly generated galaxy wont place stars inside one another?

I'm attempting to build a game with a spiral galaxy design. In doing so I followed a short guide on making the rough layout of the galaxy. My code works, but the "stars" (I'm bad with variable names, ...
1
vote
2answers
126 views

How do I make a daily challenge on a game with randomly generated levels?

I am currently making a game with randomly made levels, but I have an interest in making everyone play the same level in a daily challenge section, like Spelunky. At first I thought about letting the ...
0
votes
2answers
81 views

How can I make a power-up spawn system semi-random?

Basically I'm working on a similar game to achtung die kurve (http://curvefever.com). I'm almost done with the game, however I'm not completely fine with the way power up spawning works. As for now, I ...
12
votes
4answers
1k views

Generating tile map

I am programming a tile based game and I have some basic tiles (grass, dirt, etc..), but I can't figure out how to make good random map generation, because when I do some really random selection, if ...
0
votes
2answers
169 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 ...
5
votes
3answers
822 views

Is Unity's Random seeded automatically?

I seem to recall Unity's Random is automatically seeded; checking the documentation it doesn't say it outright, but a certain interpretation of their words might seem to imply it. The seed is ...
1
vote
2answers
55 views

Server side random selection of players

Assuming I have a simple client-server game, where the server picks random players on a very frequent base, I was wondering what is the best way to select a random player (According to the following ...
0
votes
1answer
821 views

How to randomly spawn object using instantiate

I'm trying to spawn objects which move in one direction until they hit a player or the barrier. The spawner is a cube which moves between two points to spawn the object at different locations. The ...
1
vote
1answer
2k views

Unity Move sprite from point A to point B

Pretty new to Unity and i'm trying to make a very simple iphone game. , I'd like to know how to move a sprite (2D) move from random point A to random Point B not just that, but i want it to change ...
11
votes
2answers
375 views

Axis Aligned Spatial Division : Divide space into random rectangles?

I need a method to divide 3d space into random axis aligned box shapes. For now I am currently dividing the 2d space for testing purposes. The most immediate approach I came up with was to define a ...
2
votes
1answer
83 views

Space between randomly generated objects

Im not sure there is a going to be a simple answer for this question but Ill ask anyway. I am programming an endless scrolling game where the player's character is constantly "falling." As they fall ...
0
votes
1answer
2k views

How do I randomly spawn objects in 2D game?

How do I randomly spawn few different sprites on screen so they're not overlapping or half visible on render. The sprites should immediately start shrinking until they disappear. I've tried to ...
1
vote
2answers
182 views

Client-side dice rolls in turn-based game

I'd like to create a turn-based multiplayer game on Android. I'm thinking of using Google Play Game Services and get rid of any other webservice to create and host games. The problem is the game ...
8
votes
4answers
398 views

Modify random distribution functions :: Make it less likely to get multiple similar values in a sequence

I want to generate a sequence of numbers for procedurally generating planets in a galaxy sector. Each planet should be placed randomly, however it should be very unlikely that two planets are directly ...
0
votes
1answer
80 views

Android Jump&Run - Random map generation [closed]

I'm pretty new to game development but I work on an android app. It's a 2D Jump and Run game. I do it in Eclipse and the map is readed out of a txt file right now. But I want to do a Jump and run ...
2
votes
0answers
103 views

Why do unidentified items seem to solely exist in roguelikes? [closed]

Playing a variety of games I noticed that some concepts are "trapped" in the realm of roguelikes. One of the most intriguing game-play elements in roguelikes is the unidentified item. The unidentified ...
3
votes
1answer
242 views

How to create a grid based on random shapes?

How to create a "grid" using actionscript like the image below? Basically you have an area of 1100x615 which should be filled with shapes that could be rotated and scaled... Collision detection ...
1
vote
1answer
386 views

Unity seperation of prefabs with two dimensional terrain generation

I have the following function: public void Spawn () { GameObject g = ((GameObject)Instantiate (hills [Random.Range (0, hills.Length)], new Vector3 (0.0f, ...
2
votes
1answer
66 views

Get a random vector

I'm trying to make a small pariticle-like simulation, and I'm trying to make each parrticle go a random direction from one point (mouse pos). The problem is I don't know how to get the random vector ...
2
votes
3answers
183 views

How control probability of win-lose in tile-matching games?

In a random puzzle game, such as a match-three game, how can you control the probability of a winnable starting condition?
6
votes
3answers
372 views

How can I distribute powerups “fairly”? [closed]

I'm implementing a Bomberman-esque game in which players try to eliminate each other on a square tile-based arena. I'm currently implementing powerups that give the player who collected them a bonus ...
5
votes
3answers
156 views

Pathfinding Search for Path of Specific Length

I am creating a roguelike. This question applies to random map generation. First, I generate areas using a BSP algorithm, where I randomly divide the map into areas. Then, I generate a graph of the ...
0
votes
2answers
85 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]; }
0
votes
1answer
75 views

Implementing a Random Picker by Supplying an Outcome Table (Similar to a Drop Table)

Whilst trying to vary the draw color of some randomly positioned sprites, I really wanted to be able to just supple a table with 2 columns (colour and chance of picking) to some helper function that ...
-1
votes
1answer
48 views

Movieclip to spawn in in a set perimeter

I like to make a movieclip randomly spawn in a set area. But theres a little more to it, usually you'd have something like the X pos set to something like 250 (say the centre) and the Y pos set to be ...
0
votes
1answer
56 views

Whac-A-Mole like

am trying to make a game that have a "whac-A-Mole" game principle The problem that am facing is that i don't want the "enemies" to get out from holes at the same time, not even in a different close ...
0
votes
1answer
243 views

Using a permutation table for simplex noise without storing it

Generating Simplex noise requires a permutation table for randomisation (e.g. see this question or this example). In some applications, we need to persist the state of the permutation table. This can ...
0
votes
1answer
95 views

How can I ensure reasonably spaced out enemies

I have a simple javascript game and I'm initializing their positions on the y axis using random numbers. How can I ensure that they are reasonably spaced apart? My simple algorithm is: y = ...
7
votes
4answers
258 views

Fair dice over network w/o trusted 3rd party

Though it should be a pretty basic problem, I did not find a solution for it: How to play dice over a network without a trusted third party? The M players shall roll N dice, one player after another. ...
11
votes
3answers
329 views

How to divide hex grid evenly among n players?

I'm making a simple hex-based game, and I want the map to be divided evenly among the players. The map is created randomly, and I want the players to have about equal amount of cells, with relatively ...
-3
votes
1answer
146 views

Is there a proper way to come up with random numbers?

In my game I have some powerUps which are gain when enemy is killed. Is there a proper way to come up with random numbers? here is what i am thinking: double rand = Math.random(); if(if (rand < ...
0
votes
2answers
122 views

Is my calculation of chances correct for my AI?

I'm working on a turn based game where one part is pretty much like playing "Memory": remember where a specific card is located in a grid. My AI works like this: If a card is peeked (turned around ...
6
votes
3answers
525 views

Need ideas for an algorithm to draw irregular blotchy shapes

I'm looking to draw irregular shapes on an x,y grid, and I'd like to come up with a simple, fast method if possible. My only idea so far is to draw a bunch of circles of random sizes very near each ...
8
votes
7answers
395 views

Make a fake random distribution?

Sometimes a "real" random event seems unfair and makes players frustrated. For instance a enemy has probability of 20% to cause double damage("critical hit"). Thus he could make 4 critical hits in a ...
2
votes
3answers
213 views

How should I distribute the values of equipment stats when I know the average value?

I am making a Diablo-like game and I want to randomly generate the stats of the loot that gets dropped. I'll use "damage per second" as an example. I've filled a spreadsheet with two columns of ...
1
vote
2answers
192 views

Monster attack is not randomising right [closed]

I have a code that I've been messing around with and the monster attack (monster.ma) isn't randomising after the first time it's called upon (elif statement). I've tried to make it a tuple since they ...
-1
votes
1answer
108 views

Advice on developing a random event engine [closed]

I am looking into creating a random event engine like the one found in the Paradox Interactive’s Europa Universalis franchise. They use a ‘mean time to happen’ mechanic that applies various ...