Questions tagged [procedural-generation]

Programmatic generation of content (graphics, sounds, level-design,...) using random or pseudo-random processes, usually on the fly.

535 questions
2
votes
0 answers

Create pseudorandom seed from string in C#?

For a pseudo random generator (game-related) I need to create a seed from a string. It's not for security, but I still prefer this seed to be as random as possible. I don't use GetHashCode(): the implementation might differ per .NET version. I'm…
Dirk Boer
  • 8,522
  • 13
  • 63
  • 111
2
votes
1 answer

How do I find beginning/end vertices of branches on an L-Systems tree? (p5.js)

I'm trying to get the x, y coordinates of branch endpoints on a simple L-Systems tree. The idea is to create a p5.Vector(x, y) and push it to an array. Right now, I'm able to draw ellipses marking the desired points by setting their origin to (0,…
2
votes
1 answer

Generating obstacles on NxM board

I have NxM board. I want to add K obstacles to it, but in a way so it is still possible to get from each empty space to every other empty space. I want it to look something like this where blue squares are obstacles. In other words, I have a graph…
2
votes
1 answer

Wrapping Voronoi Diagram

I'm working on creating a procedurally generated fantasy-style map using the cells of a Voronoi diagram to determine terrain. During the tectonic plate generation I realized that it's really important to have wrapping edges during generation to…
2
votes
1 answer

Shift Rotation of Objects being Spawned within a Circle Formation - Unity C#

I am spawning a series of cubes/cylinders in a circle, than doing the same thing directly on top of the previously spawned objects, 8 times. This creates a sort of structure, made with Unity elements. Here is what is currently looks like :…
2
votes
1 answer

Separate array of points into multiple arrays of points if they are far apart

I hope I am clear here, I will try to add images to help people understand my problem. I have a very simple Perlin noise lake generator: that outputs a lake as an array of points: [ {x: 0, y: 0}, ... ] Using a simple tracer to generate a…
2
votes
1 answer

Unity mesh has black spots

Hello I have followed a video series on YouTube made by Sebastian league on procedural generation and I have followed his whole video series, however on my part there are black spots in the mesh, only on water regions. I'm using global mode for…
2
votes
1 answer

Game levels are unexpectedly generating on top of each other

I have been working on procedural generating levels. I have created boxes who have a spawn depending on their opening. If a box has a left spawn. the left spawn will know that it needs to create at least 1 door on the right. This seems to be…
mafiaf
  • 99
  • 1
  • 6
2
votes
2 answers

Generating a solid shape with N tiles in a 2D array

I am making an asteroid generator that creates a 2D array of bools. The generator takes an int parameter, size, that should determine how many True cells will be in the 2D array. How can I guarantee that there aren't holes in the output array and…
2
votes
2 answers

How could I calculate neighboring tiles to generate edges and corners for a 2D tile map array?

I have a simple method that generates 2D island maps from SimpleX Noise, however it's leaving one larger issue. It works well, but it leaves sharp corners. What I would like to do is take this and calculate neighbors to add the correct tiles for…
Merlin
  • 929
  • 12
  • 33
2
votes
2 answers

What is the "correct" way of combining Voronoi Diagrams with Perlin Noise for Texture Generation?

I am working on a project revovling around procedural terrain generation. I currenly have 2 seperate parts, one which generates my Voronoi Diagram, while the other deals with the generation of the whole terrain. The terrain is currently generated in…
2
votes
1 answer

How to normalize Perlin Noise Values to range [0, 1]?

I am using a numpy array to hold Perlin Noise values. I have been told that Perlin Noise values in a 2D array are in the range [-0.7, 0.7] respectively, but this doesn't seem to be true. At least not for Caseman's "noise" library when I adjust the…
LuminousNutria
  • 1,883
  • 2
  • 18
  • 44
2
votes
1 answer

Dynamic Multi-Dimensional array for 2D Procedural World Gen

THE GOAL I'm building a world generator that should be able to dynamically add "voxels" to some sort of list as the camera nears the edge of what already exists. Each voxel should be as efficiently accessible as possible since a few hundred voxels…
Ian Gungee
  • 33
  • 4
2
votes
1 answer

How to find amount of doors in a room in a procedural generated dungeon?

To preface, I'll elaborate a bit more about what the current project is. I'm working on a game that puts the player in a room-based dungeon. Rooms are entered/exited through doors. Here is the generator() method I have for my floor creator. The…
jlars789
  • 155
  • 9
2
votes
1 answer

Using Analytical Perlin Noise Derivatives on a 3D Surface

I'm trying to learn about creating and using analytical derivatives of perlin noise to quickly generate normals. I've been experimenting with code from one of Catlike Coding's tutorials, and while I get the idea of assuming the 'up' axis is 1 and…