Page 1 of 1

Looking for paths-inside-village-algorithm

PostPosted: Tue Oct 15, 2019 20:50
by Sokomine
Wanted: Algorithm or code that connects the houses of a village in a (for the player) convincing way with paths for mobs and players to walk on and doesn't look too bad visually ingame. Drops/climbs of more than 1 node at a time are not allowed. Usage of slabs and/or stairs in order to not to have to jump are highly desired. Building bridges or changing the terrain to some degree would also be ok.

Given: Positions of the doors of all the houses in the village (those are the places that ought to be connected) and a heightmap (ground level at each x/z spot is known). Places where houses stand are marked as not passable (i.e. extremly high) on the heightmap; places outside the mapchunk also count as not passable. A mapchunk is usually 80x80 nodes in size.