Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
AleCx0428239330dIs 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.
-
Demolishun34958330d@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.
-
AleCx0428239330d@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?
-
SoldierOfCode1802330dYou 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.
-
Demolishun34958330d@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.
Related Rants
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.
rant
doors