Levels are now expanded out as you travel down and the stairs are only placed at the end of the level instead of randomly.
This commit is contained in:
parent
82216b8307
commit
59a6882b70
11 changed files with 57 additions and 10 deletions
|
@ -13,6 +13,13 @@ LevelManager::LevelManager() {
|
|||
create_level();
|
||||
}
|
||||
|
||||
LevelScaling LevelManager::scale_level() {
|
||||
return {
|
||||
30 + (5 * int($current_level)),
|
||||
20 + (5 * int($current_level))
|
||||
};
|
||||
}
|
||||
|
||||
size_t LevelManager::create_level(shared_ptr<DinkyECS::World> prev_world) {
|
||||
auto world = make_shared<DinkyECS::World>();
|
||||
|
||||
|
@ -22,7 +29,9 @@ size_t LevelManager::create_level(shared_ptr<DinkyECS::World> prev_world) {
|
|||
save::load_configs(*world);
|
||||
}
|
||||
|
||||
auto map = make_shared<Map>(GAME_MAP_X, GAME_MAP_Y);
|
||||
auto scaling = scale_level();
|
||||
|
||||
auto map = make_shared<Map>(scaling.map_width, scaling.map_height);
|
||||
WorldBuilder builder(*map);
|
||||
builder.generate(*world);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue