Refactoring and new features!


Hello folks! This week we implemented a couple of extra features to our prototype build of ProDnD v3.0 and I’m so eager to share them with you!

Last week, we talked about the UI implementation and the basics of the noises. This week we’ll going to talk about the improvement of map generation and newly added features.

The main screen now looks like this.

At the right side of the screen, we discarded Water, Dirt and Mountain sliders and replaced them with Below Water Line and Below Dirt Line. The reason is, the water overrides Dirt and Dirt overrides Mountain. Top of the height map is always filled with Mountain tiles as well as the most lowest points of height map is filled with Water, so we only need the sliders to adjust the dirt/mountain lines and dirt/water lines.

When you adjust Below Dirt Line, the mountain coverage changes as the slider moves. More the slider bigger, less the mountain coverage and vice versa

This is the same with the water slider, but the reverse.

To make user experience more intuitive and lessen the clutter for inexperienced users we added two new setting modes

  • Advanced Settings
  • Edge Roughness

In the Edge Roughness  instead of showing every setting, we predefined the map settings and make them selectable as a dropdown menu with the options Low, Medium and High. The settings of the map (Frequency, Lacunarity, Octave Count and Persistence) determines how the map is smooth, rough or detailed as we talked in the last week’s blog, and are accessible under the Advanced Settings.

You can see the difference between the Low, Medium and High Edge Roughness results:

At the left of the screen, we added a Seed input field. You can write a string or a number to produce different results. When you enter the same number or string, you can retrive the same result again.

But the implementation wasn’t that smooth, we encountered a huge problem where some places of the map looks empty, some patches that weren’t tiled. 

This happened because some values in the height map were greater than +1. Usually the noises produce values between -1 and +1 and we implemented the app according to this. But sometimes the values go greater than +1 and since the code doesn’t cover the values, code doesn’t put a tile on them. In the end result, they look like empty patches. To fix this we simply add a condition; if the value is bigger than the Below Dirt Line Slider, put a Mountain tile.

So that’s how the week’s been like. Hopefully we will implement many features and share this exciting project with you! Stay in tune!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s