Wednesday, October 23, 2019

Faster worlds!

Well, it's been a while, but things have been happening.

I've just about finished rewriting the global generation functions. The revised version of Undiscovered Worlds can now generate global maps just as the original did, complete with terrain, climate, rivers and lakes, and so on. Here are some examples:








As you can see, these maps look very similar to those of the original version - as you'd expect given that I've mostly been translating the same routines. I've tweaked some of them here and there though, and also other changes (features!) have appeared without my intent. For some reason, the new version has more of a tendency to produce long island chains, which I like. It also has a tendency sometimes to leave areas of sea unconnected to the ocean. I'm not sure why, because it's supposed to remove all such areas, but I don't mind leaving it as the occasional disconnected sea isn't a bad thing (like the Caspian Sea).

The main difference is the massive decrease in generation time. The old version would take somewhere between one and two minutes to create worlds like these. As you can see, these ones are popping out in round about seven to fourteen seconds. The quickest I've seen so far is five seconds, the slowest is eighteen. I think this alone makes it worth doing this port as the app becomes so much more useable.

I'm wondering whether it would be worth increasing the size of the global maps. At the moment, one pixel represents 32km. I could double the width and height and make it so that one pixel represents 16km. That would mean a corresponding change in the regional maps - previously, one pixel there represents 2km, but if I were to change the scales, that would mean that one pixel would represent 1km. I wouldn't change much about the actual generation, because to be honest I think that that scale would more accurately represent the size of mountains etc. that I already have. It would slow down the world generation, of course - presumably quadruple it - but the extra level of detail and realism might make that time cost worth it.

Anyway, the next step is to create the regional map level! That's where an increase in speed will really help, so I'm hoping it will come out well. Time to get grappling.