Friday 5 January 2018

Cornucopia

Finally starting to get somewhere with the feature creator which there is a class Cornucopia for it, because my naming skills are perfect. I had problems with reverse connections and the way next feature is adding a connection to previous feature later. I have two examples to show with rooms as features. Later features can be anything, but mostly corridors. The minimum size of rooms are 5x5 tiles, but they could be as small as 3x3 to squeeze them in smaller spaces.


This first example is actually a very rare "failure", because it has five starting points (rooms) as feature parameters, but no clones at all! I was amazed when I saw this, but it's possible that rooms are made in a place where they can't clone, because they can be only made in a solid rock, not on top of the basic dungeon which is a drunken walk generated cave. However, when you increase starting points it's less likely for this to happen.


This second example is more from extreme end where almost all free space is used by clones that all started from five starting points. It's possible to reduce this kind of generation by giving each feature less than 3 exit points to only clone from 1 to 3 directions randomly. Also the percentage value of created floor tiles can be a limit to the amount of features.

Sadly, this routine is far from ready. One problem seen here are double walls between rooms which are the result of features looking for free space without generating over the existing room walls. But it's possible to remove double walls later and expand the space of one of two rooms sharing a wall.

No comments: