4
Demolishun
341d

For the room closeness part of my algorithm I changed it to check against a point on the edge of the room. I determined this point by doing a vector intersect with the room geometry. The vector is determined by center to center of the rooms. Not the closest point on the outside of the rooms to each prospective room, but close enough. That is what I am drawing with yellow dots.

I can use these points to approximate door positions and corridor placement. This is for completely random rooms and corridors. However, for predefined rooms with strict entry points I will have to figure out how to connect those doors to other random rooms. Or I just predefine door locations for all rooms.

I dunno the best way at this point. Doing pure random has benefits. Doing predefined rooms has benefits as well. Will probably hack together a mixture of the two.

Comments
  • 1
    Is this with the intention of building something akin to a roguelike? I am making the assumption base don the need to do a random closeness connection between rooms that will be established when a player reaches a door.
  • 1
    @AleCx04 I am just trying to draw corridors and make doors. I will eventually set a type corridor for the squares between. I am visualizing that my algo is doing what I want right now.
  • 1
    @Demolishun I see, so, and this is me trying to poke into ye crazy brain, your room connections happen separate from the level designer and more on a need-by basis?
  • 0
    You could take inspiration from how one would(manually) usually connect rooms and check which "close" rooms have a direct straight line between them and choose that to be the corridor, and for any room that didn't have that make a larger arching corridor.
  • 0
    @AleCx04 I want random levels, but predefined structures. So maybe a level will have a barracks with a defined entry points. But everything else in the level is random. So the barracks would be placed, rooms around it placed, and finally connect all the rooms. I don't want to have to design levels. I want generated content. But I think some structures should be predefined for rooms with special purpose.
Add Comment