7/21/2013 – Map Data

I can’t wait to show off my beard in the next KS update. It has become truly absurd.

Every day is a little stream of victories, especially now that Hannah is on organizational duty full-time. (Apart from her day job.) All distractions from my life have been eliminated. It’s get up at first light and chip away until it’s dark – and it’s working.

The main quest is 1/3 playable. Locations built, characters & events scripted, the whole nine yards. I still want to tweak the hell out of it, and there’s plenty of really rough work in there – but it’s playable, dammit. Another 2/3 is ‘playable’ – not as solid, and there are some holes and shortcuts, but it’s getting there. You can go from place to place and make story stuff happen in the right order. And the final 1/3 isn’t playable but it is fully written, and many of the locations are built. The main quest is broken into three acts so that final 1/3 will probably be left out of the beta – it’s a natural stopping point. Stopping there will also make it easier to ensure that beta save files will be usable when the final game is released. (I still have bad memories from the Fallout 2 days when their patches would force me to start from scratch.) The final 1/3 is without a doubt my favorite part of the game and contains some of the biggest surprises so knowing that people will experience it after we’ve squashed all the bugs during beta playtesting helps me relax a bit.

A few days ago I finally managed to pull all the map data – splats, color overlays, region data, audio data – out of the inaccessible Resources folder and into the fully moddable external Mods/ChunkMaps folder. Hooray, fully modifiable world! I also created a couple of master PSD files that automate the slicing up and naming of map data, which again I’ll make available for modders to use. This step has ended up saving me far more time than I had expected. I was editing audio data chunk-by-chunk when needed and it was pretty laborious, but now I can edit whole regions with a single brush stroke and export them as little 64×64 pixel slices.





Coastline / Tide:


Audio Map (Above ground):


Along the way I finally figured out a way to create a usable world map without blowing right past our texture memory limit. FRONTIERS uses color overlays on our terrain and the plan has always been to use those images as map tiles. Actually, let me back up – the plan before discovering my texture memory limitations was to use the hand-drawn map for the world map, but once I realized that wasn’t feasible I decided to use the color overlays. They’re pretty detailed – 512×512 (1024×1024 in file, just in case I can find a way to free up more room for them) but there are a few problems with them. First, they don’t have a coastline, and without a coastline you can’t really tell where you are, especially when you’re zoomed in.


My first thought was to create a mask for the overlays to carve out a coastline, but texture memory was a problem here too – for the mask to look remotely acceptable it had to match the resolution of the overlay textures, so 512×512 per chunk. Even if I just used an alpha-only map that takes a big bite. The other problem is that even at 512×512 the overlay textures start to look pretty chunky when you zoom in far enough to navigate through a city or town. A detail overlay helped a bit but it was still pretty ugly. I decided to shelve the problem for a couple of months while I hammered out other things.

Then about a week ago Hannah suggested that I try to make the chunkiness work for me instead of against me. That gave me an idea. There are a couple of well-known techniques for making an image look like a painting – if you’ve played with Photoshop you’ve seen them in action – and I knew there are screen-space shaders that can do that sort of thing in real time. With an overlay like that big fat pixels don’t matter – they just get rounded off:


Just to be clear, this isn’t a one-time filter that gets applied to the texture – it’s a camera shader, so the look is preserved no matter how far you zoom in or out. This style also lets me to use the 64×64 coastline textures as a mask, since the smooth rounded edges no longer look incongruent with the sharp overlay image.


I can’t say I’m thrilled with the final look of the map – a hand-drawn version would have looked sooo much cooler – but it also doesn’t look like a smeary, unusable mess either. The last thing to work out is the label fading – as you zoom in, labels for larger locations fade out and smaller locations fade in. The code is done but it’s going to take a lot of variable tweaking to get the different fade levels feeling right. I’ll probably save that for the beta, though.

Read more here: 7/21/2013 – Map Data