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

learn more… | top users | synonyms

3
votes
3answers
246 views

Generate a range of number with X being returned most of the time

I am attempting to write a RNG which returns a normal-like curve. For example, say I define X to be 4, I would like to generate a range of numbers from 1 to 8, but with 4 being returned most of the ...
10
votes
3answers
792 views

Random map generation - strategies for scattering/clustering random nodes

I am doing a simple 4X strategy game in space where each node is a point-of-interest (a planet, an asteroid and etc.). To randomly generate a map, I would follow the steps below Decide how many ...
25
votes
3answers
3k 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 ...
2
votes
6answers
999 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 ...
5
votes
1answer
2k views

Should I use procedural animation? [closed]

I have started to make a fantasy 3d fps swordplay game and I want to add animations. I don't want to animate everything by hand because it would take a lot of time, so I decided to use procedural ...
3
votes
3answers
372 views

How do I get the seed of a randomly generated level?

I intend to use the Mersenne twister to generate a level using a seed , but I also want to make fixed levels, so for now I'm using XML to store data of the level (~40 numbers). However, it would be ...
3
votes
2answers
371 views

Question about Monster Rancher/My Brute generators

I want to build a system based on the idea of Monster Rancher's monster generation system. First, is it legal per se? Obviously, I don't know how they built theirs and I will be generating my own ...
5
votes
3answers
352 views

Generating random values, keep trying till value within bounds are generated

Sorry for the strange topic name, couldn´t think of a good way to describe it. I´m basically trying to achieve the following: I'm placing items randomly on the screen, but these items shouldn't be ...
12
votes
6answers
2k 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 ...
22
votes
4answers
2k views

Randomly generated story

I'm developing a game at the moment and I had an idea where the game's story line would randomly generate as the player progressed and their actions would affect the story. Would this be a bad idea ...
22
votes
4answers
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 ...
8
votes
3answers
1k views

Pathfinding with multiple random paths in a Tower Defense game

I thought about random pathfinding for my Tower Defense game. A* would not work for my puposes, because I specifically need random pathfinding. Imagine a map with routes, a starting point and a ...
8
votes
3answers
3k views

Random enemy placement on a 2d grid

I want to place my items and enemies randomly (or as randomly as possible). At the moment I use XNA's Random class to generate a number between 800 for X and 600 for Y. It feels like enemies spawn ...
8
votes
2answers
991 views

Random generation of interesting puzzle levels?

I'm making a Sokoban-like game i.e. there's a grid that has some crates on it you can push and you have to get the crates on crosses to win the level (although I'm going to add some extra elements to ...
10
votes
4answers
2k views

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

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 ...
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 ...
9
votes
3answers
1k 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 ...
5
votes
1answer
377 views

Deterministic random number sequence

I have an array of lights that I need to sample from randomly, but deterministically so that all the lights are sampled. Currently I use random numbers to pick a light, and then put processed lights ...
10
votes
4answers
828 views

How do I make NPC pathfinding look believable?

Is there an "academic" way to have NPC walking randomly on a map, but having a believable comportment ? The obvious scenario is a armed guard who is walking around a basement to secure it. It's quite ...
1
vote
2answers
618 views

Random Ghost Behavior in PacMan Clone Not Random?

I'm currently programming a PacMan clone as my first ever game with the XNA Game Studio before eventually going to DirectX. As a first ever game, lots of things have given me great headaches, ...
0
votes
1answer
226 views

Combine n Gaussian Probability Sets in a limited float range

I've got a fixed solution space defined by a minimum and maximum float which has no divisible slice. You then have 0..N Gaussian distribution probability sets which I need to combine. In the end I ...
39
votes
3answers
14k views

How to generate random level from a seed? [closed]

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 ...
10
votes
8answers
1k views

Best solution for “level string”?

I have a game that generates a random level map at the start of the level. I want to implement some way to save and load the level. I was thinking maybe XML would be a good option for saving all the ...
3
votes
6answers
6k views

Tools for generating random world maps? [closed]

Looking for a tool that will randomly generate an image of a world map.
25
votes
6answers
1k 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 ...
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?