Vast improvement in the world generation, with more reliable pathing, cleaner generation code, and an ability to do a random or direct walk to create paths. This also works with enemies if I want.

This commit is contained in:
Zed A. Shaw 2024-12-03 19:17:20 -05:00
parent c7607533ce
commit 0b4392dbcc
7 changed files with 151 additions and 77 deletions

View file

@ -44,7 +44,7 @@ void System::enemy_pathing(DinkyECS::World &world, Map &game_map, Player &player
if(ent != player.entity) {
Point out = position.location; // copy
if(game_map.distance(out) < config.HEARING_DISTANCE) {
game_map.neighbors(out, false);
game_map.neighbors(out);
motion = { int(out.x - position.location.x), int(out.y - position.location.y)};
}
}