Questions tagged [procedural-generation]

Procedural generation is the construction of content based on algorithms and calculations rather than by hand.

Filter by
Sorted by
Tagged with
0
votes
0answers
35 views

3D terrain generation with overhangs/caves

3D terrain with 2D noise function as heightmap is kind of 'easy'. Make a plane and adjust height based on the noise. How would one start working on 3D terrain with overhangs/caves? There are some ...
0
votes
1answer
35 views

FMB alteration based on derivative and noise value

I'm still working on my procedural terrain generation and kind of sniffing ideas from Sean Murray (No Mans Sky programmer). So I watched this GDC17 presentation, but some things just don't make sense ...
0
votes
1answer
34 views

Derivatives usage in FBM core

So I learned now about derivatives and fbm, but can not figure out the effect of this code example (credits https://www.iquilezles.org/www/articles/morenoise/morenoise.htm, bottom of page): ...
0
votes
0answers
21 views

Zooming into generated map

I have generated a 1024 X 1024 heightmap using Open simplex noise. Now i want to zoom into a 64X64 area. Every pixel in the 64X64 is not 16X16 on the larger scale. I tried just generating the area, ...
0
votes
1answer
35 views

Domain warping with Perlin noise

I'm trying to achieve the effect from https://www.iquilezles.org/www/articles/warp/warp.htm with no success. Here is the experiment http://jsfiddle.net/fro5y0jm/15/ with canvas. Any ideas?
-1
votes
1answer
56 views

Analytical derivatives for noise

Lately i'm doing lot of research regarding procedural terrain generation. I do a lot of learning from www.iquilezles.org. I'm now familiar with such things as perlin/simplex noise, fbm, domain warping,...
19
votes
2answers
4k views

Continents with Simplex noise

How do I turn Simplex noise like: into something like: or The noise has too many white spots and varies too much to represent things like continents. Where it's water, water, water, and then land ...
1
vote
1answer
38 views

How to seamlessly handle multiple procedural 2D levels in Unity3D?

I have a dungeon generating algorithm, but I would like to generate X levels, which are all connected somehow. I have a few approaches, but all of them has problems and questions, and I wonder how i....
1
vote
1answer
70 views

How do I create a spherical world to explore?

So to preface this question, I have done a lot of research on this, but most of it has proven unhelpful, possibly because I'm not sure the proper way to phrase what it is that I'm trying to ask, so I ...
0
votes
0answers
50 views

Generating procedural 2D perlin noise

I've been searching around for a week after a C# implementation of a 2D seed based procedural noise generation function. I'm trying to implement a way to generate orespawns on a 2D plane. The plane is ...
1
vote
1answer
47 views

Saving and loading a GameObject's full state easily in Unity3D?

I'm working on placing predesigned tilemap rooms in my procedural dungeons, and I would like to design the items' and monsters' placement in these special rooms as well. Currently I "compile" my ...
0
votes
1answer
69 views

How do I use this Perlin Noise texture to change the mesh?

Using the Unity docs page on Perlin noise, I made this script: ...
1
vote
1answer
44 views

Saving predesigned tilemap “rooms” and access them in script in Unity3D?

I'm working on a top-down rogue-like in Unity3D, and I already have some kind of dungeon generation. The next feature I'd like to implement, is to predesign some kind of "event rooms" (i.e. boss ...
2
votes
1answer
50 views

Quick way to approximate a truncated gaussian distribution?

I'm doing some procgen stuff and I need a truncated gaussian distribution. Basically, I need a way to get the same thing as this: ...
1
vote
0answers
33 views

How to make Procedual Context Sensitive Mesh Generation during Runtime

In the game that i am trying to make i essentially generate an infinitely generating maze that has no dead ends and each corridor is of the same width. i have successfully managed to create this ...
0
votes
0answers
26 views

How to generate point based on a map

I am making a multiplayer game in Unity, with a socket.io server in NodeJS. I am using a globe, with a texture to represent the world in Unity. Let's say something similar do this. Now, there I am ...
0
votes
0answers
44 views

How can I spawn objects in a volume without intersection?

I am generating a 3D scene that involves spawning lots of 3D objects in a finite volume. I need to avoid intersection of objects.
2
votes
1answer
92 views

How to set the UVs of a procedurally generated road mesh?

I want to create a road through a c# script in Unity. I created a mesh like this. The "vertetices" first adds the left and then the right points. Then set the UV the same order and value as "...
5
votes
2answers
229 views

How to make procedurally generated terrain look realistic

I generated a terrain using a technique from this blog post, everything worked well and I got the wanted result. This is what my generated island looks like: As you can see the terrain have a polygon ...
28
votes
6answers
6k views

Procedurally generate regions on island

I currently have islands that look like this: And I want to procedurally subdivide it into regions, like this: What algorithm does what I'm looking for? Do you have suggestions on how to create ...
1
vote
3answers
192 views

How can I create procedurally placed points in an infinite world?

My issue is that I need to create consistently placed points in an open world. This means that optimally, I would have some function that takes an area as an input and outputs all the points that ...
0
votes
1answer
157 views

How does a minecraft biome finder generates map

How does chunkbase biome finder generates map base on seed? I was curious if chunkbase knows the secret formula for generating the map? Or it uses other math formulas such as scaling, mapping etc... ...
1
vote
1answer
116 views

Procedurally placing buildings on noise-field

So, I have a procedurally generated planet. In my case it's 3D (hexagon/pentagon globe) but for simplicity let's assume it is a 2D grid. I have distributed resources over this planet, using Simplex ...
1
vote
2answers
97 views

Alternative for using game object/prefabs for level generator

I just finished the Unity Tutorial for creating a simple 2D roguelike Mobile Game. Now I wanted to make my level bigger; finding or creating my own algorithm isn't the problem. My problem is that ...
0
votes
1answer
74 views

corridors between rooms not generating; dungeon generator

So i'm following this tutorial http://www.rombdn.com/blog/2018/01/12/random-dungeon-bsp-unity/ to make a randomly generated dungeon. everything works fine, until it reaches the bit where the corridors ...
0
votes
0answers
37 views

How can I diminish my voxel terrain's height smoothly instead of randomly?

I have a script that is supposed to diminish height smoothly when an int is lowered, I tried perlin noise to make it lower like it would if it where terrain, which is the goal I'm after, but it only ...
1
vote
1answer
99 views

How can I get old Minecraft style terrain biome selection?

I'm using this post as a reference for what I'm doing. The real thing of interest is this: As you can see, this is a Whittaker diagram, with temperature and rain considerations. So would this be ...
2
votes
2answers
169 views

How to guarantee that player fits rooms of a cave created by Cellular Automata?

I've implemented a cellular automata algorithm to generate a cave for my game and now I need my player object, which occupies 3x3 tiles in total, to be able to pass between the rooms. The problem is ...
5
votes
1answer
372 views

Procedurally generating non tile based top down 2d game worlds

I’ve been fascinated by procedural generation for over two years now. I have played around with many types of noise generation and even wrote some myself. I’ve been looking into water erosion and ...
3
votes
3answers
134 views

How to make obstacles spawn randomly but still leave a way for player to pass?

I'm trying to make a game like Crossy Road: In this game, you control the character(the frog in this case) to go across the streets, and you have to prevent your character from being hit by a car. ...
0
votes
1answer
66 views

Unity: Change the type of a Texture2D to “Normal map” through script

I am making procedural terrains through c# script, and while I achieve to produce a texture, a heightmap and a normalmap to Texture2D, it seems they are not being ...
1
vote
0answers
124 views

Generating Mesh using Compute Shaders

I am working on a game project in unity which has a procedurally generated terrain made up of 16*128*16 chunks of blocks. The map size is going to be finite (Possibly up to ~100*100 chunks). Currently ...
40
votes
3answers
6k views

How can bays and straits be determined in a procedurally generated map?

I've got a procedurally generated map using Voronoi cells, with a defined sea level and a believable height map. So far, I've been successful in labelling certain geographic features: land, ocean, ...
0
votes
2answers
69 views

Separating scene generation and scene starting in Unity?

I'm working on a game, where the map is generated, and: The map is generated in an Awake(), so when an object's Start() is called, the map should be fully initialized. But the scene's physics world ...
2
votes
1answer
142 views

trying to create a triangle with procedural code

Using Godot3, I have a camera and added a MeshInstance node to the Spatial node and attached this script. Why am I not seeing any triangle yet? ...
1
vote
3answers
224 views

How to make pathways/corridors in a randomly generated dungeon?

I am trying to make a random dungeon generator using Unity. I have been able to setup the rooms properly and connect them to each other using a minimum spanning tree algorithm. I have attached an ...
0
votes
1answer
246 views

How does a game like Minecraft generate new chunks in realtime?

I imagine looping through all 65,536 blocks with a noise function to set their type would be very slow. And Minecraft usually generates a ton of chunks at once. I read in one source online that ...
1
vote
0answers
29 views

Seaming between procedurally generated terrain meshes in Unity

I have been generating procedural terrain for an upcoming project however I am coming across a seaming effect between the tiles: I have searched for solutions including this video. Here is the code (...
0
votes
2answers
77 views

Problems generating procedural mesh

I have this code below that I found on catlikecoding that generates a procedural grid that I want to apply noise to, however once I go over a certain value it does expand vertically. Can anyone see ...
1
vote
2answers
93 views

Select Unity Prefab from enum choice

After a couple tries, I still haven't found any solution to this problem of mine. Currently, I have a script inheriting from MonoBehavior which creates a map with Perlin Noise. Let's call it ...
2
votes
1answer
481 views

How to UV map a procedural cylinder mesh? (Unity)

I have a script that generates a procedural cylinder. Each side is a quad that consists of two triangles. The two triangles share vertexes, so, a side with two triangles is defined by 4 points. The ...
1
vote
0answers
73 views

Connecting varying tilemap layouts at possible connection points?

I'm building an isometric 3D ARPG in Unity3D, and I have a tilemap, for example a dungeon. I have tiles marked where a door could be placed. I select a random "could-be-a-door" tile from the ...
0
votes
1answer
74 views

What aspect of performance should I be optimizing my code towards? (asynchronous chunk modification)

Preface I realized that the root of my question is a little simpler than all of the details below make it out to be. All other things being equal, what is the most important system aspect to optimize ...
1
vote
1answer
206 views

Diamond Square Algorithm - How to fix horrible diamond shaped artefacts and spikes?

I was attempting to follow this article explaining the implementation of a wrapping version of the diamond square algorithm. I tried running it with dimensions of 128x128 and a "feature size" of 16, ...
3
votes
2answers
239 views

Procedural terrain generation is very slow

I've been trying to create procedural generated 2d terrain (similar to a game like Terraria) using Simplex noise. I was able to get the noise function working, and I set up a grid of 16 by 16 tiles ...
1
vote
0answers
28 views

Discrete line inside a 3D matrix

First of all a little premise: I'm following this tutorial on YouTube for procedural 2d cave generation in unity using cellular automata and I'm extending it in order to make caves in all three ...
2
votes
2answers
566 views

How can I improve performance when looping and comparing values on dictionaries?

On my quest to creating 0 garbage when procedurally generating points I've stumbled upon a performance issue when comparing values to another values stored inside Dictionaries. Initially I used ...
0
votes
1answer
170 views

Map generator sometimes doesn't work

I am making a dungeon map generator and am currently trying to make it place empty rooms. It first checks if the space is empty and then places a room. The problem is that most of the times it ...
2
votes
2answers
89 views

2D walled map generation

I want to make a 2D walled map. the walls must be L,T,+,-,| shaped. (made from vertical and horizontal lines) There must not be a complete closed block (i.e. all parts of the map must be connected). ...
0
votes
3answers
296 views

How to build a better game save?

I am making a roguelike card game like dream quest, and I want to improve my dungeon/level save method. Here's what my levels look like: I checked dream quest saves but I don't like their method ...