# Tagged Questions

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

40 views

### Linear Gradient with angle forumla

EDIT: Ok so the question here is how to you generate a linear gradient along a vector. Here is the function i'm looking for: function CreateGradient(x,y, x1,y1,x2,y2) { // x and y are the point ...
149 views

### How do I apply domain warping to my marching cubes voxel terrain in Unity?

So, in GPU Gems 3 there is a cool warped terrain that i seek to replicate. Currently, I'm generating the terrain fine, but I want to add that warp effect. // Do this before using 'ws' to sample the ...
147 views

### How do I create the terrain mentioned in GPU Gems 3

So, i want to create this style of terrain: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html However, as much as I scour the web trying to find ways to implement this inside Unity, I can'...
193 views

### How do I perform interpolation between noise values sampled at a lower resolution?

I'm doing some experimentation with terrain generating using a method similar to that described in this blog post by Markus Persson, where I use 3D simplex noise as a "density" value. Like him, ...
88 views

### How can I apply Perlin noise to generating an asteroid from cubic voxels?

I know I can use Perlin noise to generate randomised terrains, but for my current project i want to generate random asteroids of non-uniform length, width depth etc. My first thought was to apply ...
2k views

### How can I ensure procedural levels in an RTS are fair?

I've seen that symmetry and coherance is important in RTS level design, but I'm lazy and want to do procedurally generated levels. How can I ensure I generate a fair playing field when procedurally ...
376 views

### How to generate a city street network?

I would like to create a city generator for a game, but I am facing a problem at the very start of the generation: the road system. As it is a medieval world, I don't want a grid plan like many ...
91 views

### How do I implement level generation based on graph grammars?

I'm looking to do some pseudo-random map generation using graph grammars (graph rewriting). However, most of what I can find online on this is purely academic and, while helpful, doesn't have any ...
107 views

### Why create meshes instead of using Planes?

I'm working on a top down 2D game in Unity and I want to create levels dynamically. All tutorials I find tend to talk about generating meshes so I've followed some great tutorials such as this one. ...
146 views

### What is the state of the art in procedural character animations? [closed]

I'm a programmer and I'm interested in programmatic character animation — walking or running, bipedal or many-legged: what is the state of the art today? I heard about NaturalMotion's Euphoria system ...
53 views

### Why does my world generation code perform poorly on large inputs?

I'm writing some code to procedurally generate some islands in real time. The idea is to choose some points for each chunk, and for each tile calculate the distance from those points, then combine it ...
117 views

### Diamond-Square algorithm output is random and noisy

I have implemented a rough interpretation of the Diamond-Square algorithm in C++ to create some semi-realistic fractal terrain, but the output just seems like a random y value at each point rather ...
41 views

### Generating a set of islands in real time

With thismethod I can create multiple separated islands just by randomly choosing a point as the center for a gradient. Now what I want to do is to have a system of real time generation like the one ...
110 views

### Creating a set of islands by subtracting gradient values from a Perlin noise

The answers to this question explains fairly well how to create a big island in the center of the screen by setting up a gradient and then subtracting its value from a Perlin Noise. Anyway they ...
325 views

### Procedural Generation, Game Updates, & Butterfly Effect

NOTE: I asked this on Stack Overflow a few days ago but had very few views and no response. Figured I should ask on gamdev.stackexchange instead. This is a general question / request for advice on ...
125 views

### How to generate tile patterns in one dimension, then in a second dimension?

I'm trying to do a 2D Game that tries to emulate the Crossy Road game logic with the Java's GUI programming environment as a college project. I'm having issues designing the way the 'roads' are ...
112 views

### Sine-based Tiled Procedural Bump

I am trying to implement this formula to generate bump but I am facing some issue. The result doesn't look the same it's much darker. Here is my result (without same parameters) but it is much ...
40 views

### Dual Marching Cubes QEF Explanation

I've been stumped by trying to fully wrap my head around the formula presented for the QEF formula presented within the dual marching cubes paper. The formula that is presented is such: w = actual ...
62 views

### Gameobjects disappearing when changing renderer.material.color

I'm generating an array of objects using this code: while(currentPosition.z < poolSize){ var ringObj = GameObject.Instantiate(ring) as GameObject; ringObj.transform....
232 views

### 1D Perlin Noise Game in Unity

I'm working on a 2D side-scrolling game in the Unity engine. I am using the 1-Dimensional Perlin Noise function and using pseudo-code. I can't use two links so I'll provide a link to imgur with the ...
55 views

### How i can make a spherical world with Cubiquity in Unity

I would like to make a spherical planet with cubiquity in Unity 5, how could I do it with a for (), so I could one cubic planet. Can anybody help me?
78 views

### Procedural generation of jagged peaks

I would like to generate random cave type backgrounds similar to the one shown below. I doubt anything I generate will look as good as the image, but something with that feel of sharp, jagged peak ...
61 views

### What is the mesh generation technique shown in Chrome Music Lab?

The Google toy of the day, https://musiclab.chromeexperiments.com/Spectrogram, features a continuously scrolling 3D render of a shape with cross sections that seem to equal the spectrograph of sound ...
1k views

### How can I generate a (relatively) linear dungeon path?

We developing a concept for an action side-scroller. What we need is a way to generate a (relatively) straight map. By this I mean something like... It's clear to see that this map follows one ...
208 views

### How do I generate random mountains in a sidescroller?

So I'm trying to make a simplified Terraria style world using Perlin noise. I got that working and the terrain is randomized. However the terrain always looks like like a weird cosines curve. Hills ...
240 views

### How does one generate mountains out of a Fourier transform?

I am watching this IGN video of No Man's Sky in which the founder/programmer of this game talks about how different is his game from other games. Here he talks about how mathematical equations instead ...
173 views

### Game states & passing data between scenes

I'm not entirely sure if I'm doing this right, but I always considered the scene system in Unity as some sort of state management (rather than e.g. a level system) which allows to group the contents (...
248 views

### What is best method for 2D pathfinding in procedural world?

I have been researching path-finding for 2D games and would like to create a system that allows A* to perform as best as possible over a near infinite world. This system is intended to manage not only ...
103 views

### Random layout rooms with intersecting walls

I am trying to layout few rectangle rooms on un unlimited map. The main condition is that every next room has to intersect with one of already placed with at least one point of the wall. The number,...
75 views

### Show procedural map without running the game?

Currently I have a script that generates prefabs by code and I'm wondering if I could show a certain "seed" of that map without actually running the game. The reason why is that I often want to tweak ...
69 views

### Floating point determinism with respect to procedural generation, clustering and GPU offloading

I've been designing a distributed procedural generation system for a while now in my spare time and one of the problem's I've been thinking about recently, with respect to the broader architecture, is ...
185 views

### Terracing mountain features

I'm looking to replicate a procedural terrain effect I found on a portfolio/blog site a few days ago. Quoting the site, the terracing was generated through, "multiplying [the final height] by some ...
103 views

### Simplyfing/dissolving octree to simple boxes by adjacent octants with similar traits

I am looking forward to create a navigation volume to be utilized by AI actors. The approach I am trying to tackle here is to first generate an octree and associate with respectable flags/data (type, ...
153 views

### Vector math to calculate the rotation and drift of a tectonic plate?

I've been following the excellent Experilous procedural planet generation post, trying to recreate it in Java using libGDX. My planet is simpler, as it lacks any distortion of the mesh. It's just ...
197 views

### How to achieve a layered terrain simlar to Godus

I'm currently playing around with a few examples and techniques for terrain generation and suddenly remembered the game Godus - seen below. Youtube clip of Godus Looking at the material above, it ...
49 views

### What is the best way to group lots of squares into one VBO?

I'm making my first game in OpenGL, using procedural generation, and it is a similar concept to Terraria. At the moment, I have one, very small VBO for a square ('block') and an EBO for its vertices. ...
211 views

### Procedural Islands Voronoi Pattern

I'm trying to keep this as simple as possible, as I've found out the last few days this is a very difficult topic. I'd like to generate multiple flat islands, formed by a voronoi diagram. I've ...
41 views

### Terrain Generation - Only draws first sprite and last row on the X axis

So, I have a problem where I'm trying to loop trough columns of sprites, that later will be drawn to fill a specific area. But it only renders the first sprite and the last row of sprites on the X ...
320 views

### Procedural Dungeon Generation Connect Rooms With Passageways

I've been working on a simple procedural generation class which currently places rooms on a x, y grid and selects a starting room. Each room needs to be connected with passageways so the player will ...
115 views

### How To generate spiky terrain in 2D?

I am learning game design, and wanted to know how one can automatically generate spiky terrain (something like this: Cavernaut, notice, the terrain at the sides?). I have heard about midpoint ...
56 views

### How to generate mesh at runtime using raycast points?

I'm trying to make a clone of the trail/line renderer with the difference that everything is perfectly flat, i.e. the faces are not designed to face the camera. I'm using two raycasts to get the ...
94 views

### Adjacency in procedural generation of dungeon

I wanted to make a procedural dungeon experimenting a new approach, it works nice for random-meaningless content (in example a procedural background to a level), however when I want it to be not-so-...
112 views

### How should I store a procedurally generated grid level of an infinite size?

I have a 2d grid level. It infinitely grows. If it was not of infinite size, a 2D array would be perfect, as I need to constantly have each grid talk to its neighbors. For example, with a 2D array,...
165 views

### Adding terrain features to a perlin noise heightmap

I'm currently using Perlin Noise to generate heightmaps and model moisture levels as well as tree density to create terrain (in the form of 2D tilemaps - think dwarf fortress). How can I generate ...
85 views

### How can I randomly generate achievements?

Novice programmer here. To challenge my self i want to create an achievement system that randomly generates achievements for me based on a set of trackable metrics within my game. To keep it as ...
134 views

### Marching Square Generated 2d Terrain: Dealing with more than 2 tile types

I need some help with my random map generator. First, I use a noise generator (something like Perlin noise) to create my tile array. For now i'm using three tiles: water (0), beach (1), and grass (2)...
317 views

### Removing seams between procedurally-generated spherical terrain tiles

I'm working on procedural planet generation project in Unity. To create a sphere, I use the following technique: Create six planes arranged as faces of a cube Normalize all vertices' positions to ...
227 views

### Diamond square algorithm

I'm working on generating terrain on already generated landmass. The landmass and ocean around it consist of hexagons. Hexagons aren't really a concern for me, because I can always interpolate the ...