RedP
Member
Hi, so recently I started to feel more confident in my programming skills and started to mess around with grids and lists, until I decided to try to do a random dungeon with premade rooms, and I can’t understand how it works, I mean, I understand the grid stuff and how each room corresponds to a cell in the grid, my problem is to understand what I have to write in codes so that my game knows which cell in the grid is adjacent to one that I already have a room??? And so on, how do I get the grid to choose a random direction from another room??
I'm using this tutorial that I found as a basis:
My problem is in item 5, how do I "choose a random adjacent cell for my grid to set to 1" ??
I'm going crazy trying to find a solution.
Thank u!!!
I'm using this tutorial that I found as a basis:
My problem is in item 5, how do I "choose a random adjacent cell for my grid to set to 1" ??
I'm going crazy trying to find a solution.
Thank u!!!