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
1answer
96 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, ...
2
votes
1answer
104 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
23 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
77 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
151 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
70 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
243 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
66 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
51 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
86 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
96 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
38 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
94 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
72 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
136 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
190 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
106 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
55 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
466 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
107 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
477 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
75 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
131 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
174 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
130 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). ...
3
votes
1answer
613 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 ...
3
votes
1answer
306 views

Overcoming fill rate and generation bottlenecks in voxel engine

I decided to make a voxel engine using octrees. I am instancing entire cubes and sending the sizes and positions to the vertex shader. I currently have 2 major problems: Problem 1 - Because the ...
9
votes
1answer
338 views

Procedurally-generated 2D curved roads on map

I've been experimenting with algorithms to automatically generate road maps for a game I am working on. I'm using the "Kingdom Rush" games as a reference point as they have some great-looking maps. ...
3
votes
1answer
688 views

Create a 2d circular maze

How can I create a 2d procedurally generated circular maze like the following picture:
4
votes
1answer
89 views

Help Improving Map Generation

I've recently attempt for the first time to implement a map generation system and while it does work, it doesn't work exactly the same I want but I'm not really sure on what changes I can make it to ...
2
votes
1answer
75 views

Securing feasibility in procedurally generated endless runner

I am currently in the concept phase for an endless runner I want to develop with libgdx in Java. As I can not preassemble an infinite level, the generation of obstacles and power-ups needs to be "...
2
votes
1answer
302 views

Basic Random Tile Map Generation

Currently I've got a map like this: It's pretty simple but what I want is that area of tiles to be random, with the number of tiles present being random (Within a minimum and maximum amount of tiles ...
0
votes
2answers
170 views

Perlin noise terrain: 3 coordinates from one

I am making a game with procedural terrain, like minecraft. I have a perlin noise function which takes one integer and returns a number between zero and one. However, for terrain, I need a single ...
3
votes
1answer
250 views

Procedural Star Generator

I want to develop a procedural galaxy / starfield generator. A rather simple approach would be to use some pseudo-random algorithm to repeatedly create a star and its properties (such as position, ...
2
votes
1answer
91 views

Random generation of a board

So I have four "boards" made of 16 sprites (4x4). Each board is parented to an empty GameObject. I would like to randomly generate their positions but I am not sure how. However, they should still be ...
3
votes
1answer
171 views

Redistributing sprites in procedural generation according to player movement

I am making space arcade with procedurally generated background consisted of nebulas and stars sprites, which spawn on Awake() in certain borders around player. Mobile phones have limited capacity ...
0
votes
0answers
168 views

Unity Mesh Optimization

I am making a Minecraft style game and I am looking for a good way to hide block faces that are underground or blocked. Thank you for any suggestions. Below is my code. ...
6
votes
1answer
269 views

3D terrain generation: geological slices and noise function

Everyone knows how to use Perlin noise to generate the surface of a 3D world. You may use one or several octaves to generate more detail. It is also known how to use 3D Perlin noise to generate, to ...
0
votes
1answer
191 views

Procedural generation background works with one type of prefab and doesn't work with another

I have background generation script with 2 arrays. One contains stars prefabs with sprites and another contains nebulas prefabs with sprites. Both have identical types of variables as generating ...
0
votes
1answer
89 views

How can I generate random levels like in “Square it!” game?

In this game, you have a 2d field with some free squares and two colored squares which you can move but only together (they'll move only if the spot is still "free"). And you have to fill whole free ...
0
votes
1answer
144 views

Locking value when creating tweaking dependent values

I have several values which adjust them self In Unity Inspector when I tweak one of them. So total sum of these values stays constant. (which is 100 as 100%) Sometimes it is hard to get specific ...
1
vote
2answers
264 views

Procedural dungeon algorithms for a more open dungeon

I'm working on a game that I want dungeon generating in, but I plan on having ranged weapons in it, so I want it a bit more open. I'd like to avoid corridors and I don't want to use a grid of custom ...
1
vote
1answer
54 views

Prioritizing prefabs in array for procedural generation

I am trying to create procedural space background with a bunch of sprites of nebulas and stars. I have made few prefabs with different types of sprites attached to them. I have created an array ...
1
vote
2answers
185 views

Background generation with sprites in 2D dimension in Unity

I am making 2D game with Unity. I want to create a procedurally generated background with a bunch of sprites (space background, I have sprites of nebulas and stars). I want some area around the player ...
8
votes
1answer
177 views

How can I procedurally find a wall that separates two or more points on a grid-based map?

I'm trying to generate walls that cut off a given point from other given points. The attached image shows the sort of thing I'm after: Blue separated from Red. Blue separated from Red and Yellow. ...
2
votes
1answer
144 views

Unity - Background made with procedural shapes?

I would like to know how to make a background like Super Hexagon managed to do: a hexagon in the middle and equally sized trapezoids. There's a screenshot below & the here is the effect in motion. ...
1
vote
2answers
95 views

Voronoi graph - traversing from vertex to vertex

I'm working on a Unity Project in C# I've built a 3D Voronoi Diagram using the csDelaunay library from PouletFrit and using the X and Y values from a 2D diagram to instead setup some Vector3's with ...
1
vote
1answer
333 views

High-level advice on procedural river (Unity3D) [closed]

I'm working on some procedural content for Unity3D - in C# My main aim is to build a flat plane (or maybe later a terrain / mesh), with a single river running through it, based on a seed value. I ...
1
vote
2answers
209 views

How can I generate a random 2D surface

I'm trying to build an old game (Lander) where you try to land a spaceship on a flat platform. But I have no idea how to generate a random surface. Something like in the picture would be nice. Edit: ...