![]() we run the X loop once and we take room ones location and add 1 to x for each loop iteration and place a tile resulting in 1x 0y place a tile. ![]() we just need to break that down into steps, this can be done with a for loop. ok so for this example we need to move 1 space to the right and 3 spaces up. lets make a arbitrary choice to begin with moving toward X. lets say you have a room at 0x 0y and another at 1x 3y. to create the path you just need to know where to place the path tiles and we can do that with some simple math. ![]() ok so at this point the rooms are created & placed, and the spanning tree will tell you to connect room a to b. this is basically a way to ensure that every room connects to at least one other room, you can also add in different criteria to affect how the paths are created. for this you are going to want to implement a spanning tree. the next part is a little more tricky, creating the pathways. for this you could simply get a random point in range for each room and set the room to that point, simple. to begin you would need to create and place the rooms. Just based on the image provided it should be a relatively simple task. Now as a disclaimer ive never played the game mentioned but i have created procedural dungeons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |