Programmatic generation of content (graphics, sounds, level-design,...) using random or pseudo-random processes, usually on the fly.
Questions tagged [procedural-generation]
535 questions
12
votes
1 answer
Looping through a formula that describes a spiral to generate XY coordinates
I'm trying to generate a spiral galaxy in the form of xy (2D) coordinates -- but math is not my strong suit.
I've gleaned the following from an excellent source on spirals:
The radius r(t) and the angle t are proportional for the
simpliest…

Nick
- 2,872
- 3
- 34
- 43
11
votes
2 answers
Ensuring a partially connected digraph is strongly connected
Context
I am building a 3d game using procedural generation. I am trying to connect a number of pre-generated rooms in such a way that no matter what, a player can always reach any other room in the map. The rooms have "possible entry points" to…

kazagistar
- 1,537
- 8
- 20
10
votes
4 answers
Does anyone have good resources on 3D procedural generation of terrain or fractal terrain generation?
See title. Any help is appreciated!

Xavier
- 8,828
- 13
- 64
- 98
10
votes
8 answers
Generating random points within a hexagon for procedural game content
I'm using procedural techniques to generate graphics for a game I am writing.
To generate some woods I would like to scatter trees randomly within a regular hexagonal area centred at <0,0>.
What is the best way to generate these points in a uniform…

mikera
- 105,238
- 25
- 256
- 415
9
votes
3 answers
Galaxy Generation Algorithm
I'm trying to generate a set of points (represented by a Vector struct) that roughly models a spiral galaxy.
The C# code I've been playing with is below; but I can only seem to get it to generate a single 'arm' of the galaxy.
public Vector3[]…

Chris Bampton
- 199
- 1
- 8
9
votes
2 answers
What is a good strategy for constructing a directed graph for a game map (in Python)?
I'm developing a procedurally-generated game world in Python. The structure of the world will be similar to the MUD/MUSH paradigm of rooms and exits arranged as a directed graph (rooms are nodes, exits are edges). (Note that this is not necessarily…

David Eyk
- 12,171
- 11
- 63
- 103
9
votes
0 answers
Antialiasing of procedural wood texture in GLSL
So I've been delving into "Texturing & Modeling: A Procedural Approach" recently and started writing my first procedural textures in GLSL. What gives me the most headaches though is the topic of antialiasing. It's obvious how to do it in simple…

Alemarius Nexus
- 340
- 3
- 12
9
votes
1 answer
Cliffs terrain generation in minecraft-like game
I want to generate something like this:
I use Perlin Noise with sharp curve, my code produces those cliffs:
.
for (int x = 0; x < sizeX; x++)
{
for (int z = 0; z < sizeZ; z++)
{
int floorY =…

Vlad
- 3,001
- 1
- 22
- 52
7
votes
3 answers
Information on L-Systems
I am about to start a project for university to build a procedural city for a pre existing project.
I was wondering if any of you have had any experience coding L-Systems before and know a good place for me to start out. I have done a bit of work…

Craig
- 1,199
- 1
- 13
- 27
7
votes
1 answer
Wave generation with the "Hugo Elias" algorithm please! Java
I appear to have hit a wall in my most recent project involving wave/ripple generation over an image. I made one that works with basic colors on a grid that works perfectly; heck, I even added shades to the colors depending on the height of the…

Lost_Soul
- 95
- 7
7
votes
2 answers
How is L-systems for road networks modified?
Greetings each and all!
I'm currently looking into procedural generation of a road network and stumbled upon the L-system algorithm. From what I understand from various scientific papers on the subject, and further papers on the papers on the…

Karl Nilsson
- 183
- 1
- 9
6
votes
4 answers
What languages or methods allow graphics & music demos to fit in 64kb EXEs?
How is it possible that in a 64kb compiled exe, these programs can generate such crazy visuals, complete with matching music?
An example: Ars Nova By Phantom Lord (YouTube video of the demo running)
This program's only 64kb in size! How did they do…

Synxmax
- 2,226
- 1
- 22
- 38
6
votes
5 answers
Why does switching from Mersenne twister to other PRNGs in Gradient Noise Generator give bad results?
I've been trying to create a generalized Gradient Noise generator (which doesn't use the hash method to get gradients). The code is below:
class GradientNoise {
std::uint64_t m_seed;
std::uniform_int_distribution…

Krupip
- 4,404
- 2
- 32
- 54
6
votes
1 answer
Procedural generation of stars with skybox
I am attempting to procedurally generate a star-filled background in OpenGL.
The approach I am taking is to create a skybox with a cubemap texture. Each side of the cubemap texture essentially consists of a 2048x2048 black image with randomly…

Alessandro Power
- 2,395
- 2
- 19
- 39
6
votes
2 answers
Unity 5: Automatically specifying the triangle list for the vertices of a mesh
Is there a way or algorithm for automatically specifying how a list of vertices should be connected?
For example lets say I have this (in 2D for simplicity):
*(0,0) *(2,0)
*(-1,-1) *(1,-1)
So I add the vertices in the order…

Amposter
- 787
- 2
- 8
- 27