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

learn more… | top users | synonyms

10
votes
3answers
2k views

Algorithm for determining random events

I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on. Say there are 4 classes of events that can happen, with varying events in those ...
3
votes
1answer
510 views

Generating random tunnels

What methods could we use to generate a random tunnel, similar to the one in this classic helicopter game? Other than that it should be smooth and allow you to navigate through it, while looking as ...
12
votes
6answers
1k views

Weighted Random Distribution

I am currently contributing to a particle system for our game and developing some emitter shapes. My uniform random distribution along a line or along a rectangular area works fine - no problem. But ...
9
votes
3answers
925 views

Reduce the number of edges of a graph, keeping it connected

I'm designing a game with random generated dungeons. I'd like to view this as a connected, undirected graph in which nodes are rooms and edges are doors or corridors. Then I choose a "side" node as ...
21
votes
5answers
1k views

How do I avoid “too” lucky / unlucky streaks in random number generation?

I'm currently dealing with a multiplayer combat system where the damage dealt by the players is always multiplied by a random factor between 0.8 and 1.2. In theory, a truly random RNG may eventually ...
6
votes
3answers
2k views

How do I shuffle cards for a card game?

I am trying to develop an card game for Android Can anyone suggest me how to write code for effectively shuffling the playing cards?
35
votes
7answers
10k views

How to generate random level from a seed?

How would I go about using a random seed to generate a game level? The same seed should always generate the exact same level. For this example it would be a Worms style level. So each level would ...
42
votes
14answers
2k views

How to generate a universe? [closed]

If I wanted to generate a universe/galaxy like that of Elite or Spore, what would be some good programming reference materials and algorithms to take into account?
5
votes
2answers
2k views

Random World Generation [duplicate]

Possible Duplicate: How are voxel terrain engines made? I'm making a game like minecraft (although a different idea) but I need a random world generator for a 1024 block wide and 256 block ...
12
votes
3answers
752 views

Biased, conservative random walk

I have a sprite which has Velocity and Position, either stored as Vector2. At each Update cycle, velocity is added to the position. I would like to give the sprite a third vector, Target. New targets ...
16
votes
3answers
2k views

How can I generate floating land masses for a Minecraft-like engine?

I am creating a Minecraft-like engine in XNA. What I want to do is create floating islands similar to the one shown in this video: http://www.youtube.com/watch?v=gqHVOEPQK5g&feature=related ...
25
votes
6answers
985 views

Have any video game designs used non-uniform random numbers in interesting ways?

A variety of video games use uniformly distributed numbers to decide the outcome of an event, such as a "50% chance to hit" almost always means to check if a random floating point number from 0-1 is ...
23
votes
3answers
2k views

Random seed function for map generation?

I am looking for a function to generate a random tile-based map as the visual boundaries of the map change (by going through the map). I want the map to be infinitely large, and have maze-like ...
10
votes
4answers
2k views

Procedural terrains in 3D: what has been done ? Are there common algo and/or theories about it?

Besides programming, modeling an environment takes a great deal of time. I don't know about the work time involved, for example, in a WoW dungeon level, or other beautiful city-like, future ...
9
votes
2answers
826 views

What is a good method to randomly generate edges between graph nodes?

I am doing a random map generator for a 4X space game. Each node in the game is place at a random (x,y) coordinate on a 2d grid. A node can have one or more bi-directional edges to another node ...
7
votes
4answers
212 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. ...
5
votes
2answers
962 views

Algorithm for random flight of a fly

I'm new to game development. What is a good algorithm to model the random flight of a fly? I've been looking at path-finding algorithms, but they don't give any interesting random behaviour.
4
votes
6answers
363 views

Data structure for random outcome from a hit probability table

The basic idea of a hit-table is carried over from pen & paper role playing games. You roll a die or a number of dice representing your ability to attack an opponent. Your opponents defense is ...
2
votes
2answers
2k views

How do I randomly generate a top-down 2D level with separate sections and is infinite?

I've read many other questions/answers about random level generation but most of them deal with either randomly/proceduraly generating 2D levels viewed from the side or 3D levels. What I'm trying to ...
2
votes
2answers
223 views

Looking for an elegant way to represent fixed parts of a randomly generated level map

I'm coding from scratch a small experimental game on a medium-sized random rectangular square tile map. (Say, a map of a dungeon.) There are several types of tiles (for example: floor, wall, monster, ...
2
votes
6answers
912 views

Random Position between ranges

Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block. Blocks will ...