Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [procedural-generation]

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

1
vote
3answers
133 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
51 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... ...
0
votes
1answer
49 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
79 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
51 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
34 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 ...
0
votes
1answer
69 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 ...
1
vote
2answers
143 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
163 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
105 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
28 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 ...
0
votes
0answers
40 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 ...
41
votes
3answers
5k 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
68 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
0answers
56 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
130 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
179 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
28 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
68 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
69 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
223 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
69 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
72 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
154 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
207 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
26 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
1answer
200 views

C# 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
164 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
84 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
264 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 ...
2
votes
1answer
102 views

Workflow for creating spherical heightmaps

I'm wondering how I can create a spherical heightmap. In my ideal workflow, you'd see a 3D sphere that you can edit using procedural terrain techniques (like World Creator) and that spherical terrain ...
0
votes
1answer
391 views

How do I generate a sphere mesh in Unity?

I'm making a game and I need a way to generate a sphere mesh in Unity for whatever reason. It needs to be generated by code and not be a pre-made sphere or a sphere primitive as I need to edit in ...
0
votes
1answer
198 views

How to use grammars for procedural generation?

I am working on a system to procedural generate a house using this article. I am trying to understand how grammars work and are made I have found very little information on the topic online. From my ...
2
votes
2answers
189 views

Generating different maps using Perlin Noise with a seed

I am developing a 2D game in python and I could get Perlin Noise working with this code: ...
1
vote
0answers
55 views

Unity3D - How to create flat map render based on endless noise data

The Project I'm working actually on a Endless Map Generator (with chunks, height-map noise, threading system, etc..) This is actually what "dev data display" look like: The Goal Now I want to ...
0
votes
1answer
170 views

Using Reflection to access an array from a ScriptableObject in Unity

I am trying to get access to a set of stored variables inside a scriptible object in Unity. This class (SectorDeclaration) has a method to pull a variable with a string of the variables name from it: ...
2
votes
0answers
54 views

Non-Perfect maze generation with objectives [duplicate]

I need an algorithm that can generate mazes with these requirements: Allows for random structures to be made (Ex: a center spawn area, objective points and 'Caverns (corridors with 2 or more ...
3
votes
1answer
80 views

How to paint regions of a map with visually different colors

I'm learning some concepts of procedural content generation. Now I'm generating a map with regions and each region has a diferent colors generated in a pseudo-random way. My problem right now is ...
1
vote
3answers
175 views

Combining Minecraft and Dwarf Fortress: Simulating autoplay in a pseudo-infinite procedurally generated world?

One of the interesting things about Dwarf Fortress (and other procedurally generated games like Civilization) is that the game simulates multiple AI factions interacting with each other over time (...
5
votes
1answer
211 views

Pathfinding in Procedural cave generation

I'm learning THIS tutorial about procedural cave generation using cellular automata with Unity. I want to implement pathfinding on some enemies, so I need to make a quantization of the procedurally ...
2
votes
1answer
116 views

Coherence between 2d tile maps

In dwarf fortress, there are 3 levels of maps in the screen you pick your starting position, and they all coincide with each other perfectly. I am assuming that the top level tile accounts for lets ...
0
votes
0answers
61 views

Draw objects that move on an “infinite” map

I'm generating a game map using a mod function, so when I reach the boundaries of the map, I start generating the map again, I can generate the tiles by moving my character correctly, and when I reach ...
8
votes
2answers
681 views

Town generation algorithms

In this RPG.SE post a long-lost page with several online generators is mentioned. I'm particularly curious about the way towns were generated. Take this image for example: Although a lot of things ...
2
votes
2answers
113 views

How to better refactor loops in procedural world generation?

One of the steps for cell-based dungeon generation is deciding the amount and location of exits for each room. My current set up consists of the following: Define my exits. There are 15 types of room ...
4
votes
3answers
709 views

How can I tile Perlin noise to more accurately represent a world map?

I'm currently working on my game. I would like to generate the world map with Perlin noise, and wrap it just like a real world map. I've found a algorithm to create a map wrapped along X and Y axis: ...
1
vote
0answers
89 views

Spawn network objects in generated map

In my game, the server generates a procedural map, after send generation seed to generate it on the client. The client generates exactly the same map. In the map, I need to synchronize objects with ...
4
votes
1answer
169 views

Randomly generated maps in Multiplayer

I am currently trying to get randomly generated maps work in multiplayer but I have so many difficulties trying to figure out how. How do other games implement this(Minecraft, Terraria, Don't starve)? ...
1
vote
1answer
228 views

Algorithm to generate random shapes that fill up a rectangle?

The final result can be like this I've thought up several approaches: Generate random curved lines to "cut" the rectangle (or generate random dots and form the line from the dots) Break the ...
1
vote
0answers
168 views

How is terrain editing implemented like a sculpt tool?

Some creativity/sandbox games have a terrain editing feature. When thinking of a terrain, I'm thinking of a grid of vertices. The elevation of each vertex is then determined by a heightmap (image). ...
4
votes
1answer
945 views

How can I generate roads such as those in the game Twisty Road?

Here is a link to see the gameplay: https://www.youtube.com/watch?v=03PzsgO-uAM How could I procedurally generate the path upon which the ball rolls in Unity/C#? As an amendment suggested by ...