Currently we have pre-made dungeon levels in our game, but we are working on an algorithm, that generates random dungeons for our game. The generation part is okay, but there is jumping in our game, so the player can jump over certain sized gaps (lets say ~5 tiles). (See the image and yellow lines) The jumping area is filled with tiles that act as walls when on the ground, but as ground when the player is "gliding over".
My idea was to make some kind of "concave hull" around the dungeon (see the picture and the white outlines) and fill the empty insides with "jump tiles". Even then, there would be a problem, that the gaps inside are not necessary small enough (see the big hole in the middle of a map with blue and yellow linese).
So how can i detect when the empty areas are not to be filled with jump tiles (blue lines) and when i should add the jump tiles (yellow lines).
I had no luck finding anything useful by searching about concave hulls and convex hulls (red lines in the image).
Aucun commentaire:
Enregistrer un commentaire