Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Development Update – Sorting Algorithm

Improved the water adjustment algorithm so that it’s more accurate at figuring out which water block is the closest to the source.

This is important because the stream only needs to start from this one. If you look at the gif in the previous update, you’ll see that the number of red water blocks goes from 3 to 2. This is because it messed up the count of which one was the “smallest” water block that needed to be fixed.

water_readjust2

The problem is that the sorting algorithm I’m using to determine the water block with the smallest index number is incredibly inefficient and is causing a drop in frame rate at the point of contact:

profiler

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.