This is a "Wang 2" tiled map generator that I've been working on with @Locomule, with a critical component (hash function) added by @DadOfMrLog. Now we have the logic looking good, can we get the scrolling speed up? https://scratch.mit.edu/discuss/topic/224607/
There's a bit of an explanation as to how it works at https://scratch.mit.edu/discuss/topic/224537/ This version is a little more complex than the last one, because it lets you define the limits of the map, ie you are not forced to create an infinite world.