All Questions
Tagged with grid procedural-generation
11
questions
9
votes
1answer
2k views
Generating a town layout in a grid
I want to generate a town layout in a square grid (rendered isometrically, but that doesn't matter) using the following elements:
2x2 Houses
Roads, 1 unit wide
Canals, 1 unit wide
Sample layout:
I ...
8
votes
1answer
252 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.
...
4
votes
2answers
469 views
Messy results from simple cellular automata algorithm?
I wrote something that will first randomly populate a square a with grass tiles, and then from there it will calculate tile types from each tile's surrounding tiles. My ultimate goal is generate a ...
3
votes
1answer
149 views
Diagonal symmetry across a filtered array?
I wrote this code to randomly generate a square terrain that somewhat resembles an island. First, I randomly populated a square with grass tiles (1s) on a plane of water tiles (0s):
Then, I looped ...
1
vote
2answers
71 views
Letter game board creation
I currently have a game concept similar to the mobile app Alphabetty where you are given a grid of letters and are tasked with spelling words. When you use a letter in a word, it disappears and new ...
1
vote
2answers
2k views
Roguelike corridor creation; Connecting rooms
I have a simple Tile[,] that I populate with Rooms. Now I need to connect the rooms with a single tile wide corridor. At first I used A* to hook up the rooms but that, of course, get's the best path ...
1
vote
1answer
309 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,...
1
vote
1answer
134 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 ...
0
votes
1answer
73 views
How can I maintain a contiguous area when generating a tilemap using Wave Function Collapse?
I'm using Wave Function Collapse to generate a tilemap, and I'm trying to come up with a way to maintain a contiguous area during generation. As an example: ensuring all "walkable" tiles are ...
0
votes
1answer
87 views
How do I determine the player's grid position?
My original method for doing this involved taking the player's position, dividing it by the grid cell size, and rounding the result. This works for most cases except when I move my player up above y-...
0
votes
0answers
209 views
Calculating voronoi sites with a 2D grid
I've been diving deeper into voronoi cells for use in a 2D game. There's a lot out there that explains the concept and describes how to calculate them but I'm failing to grasp how best to apply them ...