Hunt-and-kill algorithm rocks. It handles everything I need for map gen, including spawn points, room placement, and the maze like map.
This commit is contained in:
parent
0f8e61797f
commit
a0b785cb2a
8 changed files with 62 additions and 336 deletions
|
@ -14,15 +14,7 @@ class WorldBuilder {
|
|||
$components(components)
|
||||
{ }
|
||||
|
||||
void partition_map(Room &cur, int depth);
|
||||
void make_room(size_t origin_y, size_t origin_x, size_t width, size_t height);
|
||||
void add_door(Room &room);
|
||||
void set_door(Room &room, int value);
|
||||
void place_rooms();
|
||||
void tunnel_doors(PointList &holes, Room &src, Room &target);
|
||||
void update_door(Point &at, int wall_or_space);
|
||||
void stylize_room(int room, std::string tile_name, float size);
|
||||
void generate_rooms();
|
||||
void generate_map();
|
||||
|
||||
DinkyECS::Entity configure_entity_in_map(DinkyECS::World &world, nlohmann::json &entity_data, int in_room);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue