![]() ![]() Each designed room holds a list of potential doors. The next is that the rooms should not connect to each-other arbitrarily. Still, this (somewhat) quadruples the amount of rooms the generator can pull from. In the above example, rooms can be mirrored horizontally or flipped vertically - due to limits of the tileset, rotations are off the table. Further, this allows one to rotate or mirror the rooms. ![]() ![]() To this end, each designed room holds information about the coordinates of its corners, and thus also where its centre is. The first is that the position of the tiles in the generated world should be different than in the designed world, so that a room can be created at any arbitrary position. When a new room is to be generated, it then chooses a random index and then copies each tile and doodad of the predesigned room into the new map. An algorithm is then able to look at the rooms and "cut them out" - specifically, a grid data structure is made which holds a common index for each designed room. Most of the rooms seen in the above are designed by hand. The basic part of the algorithm was kind of explained in the previous post, but let me go over it again in a bit more detail now that I have actually made it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |