We’ve been working on the first map – “Diemen’s Land” – for Hurtworld for quite some time now. We’re starting off with a monster – a 5km squared sprawling expanse full of weird valleys, deadly mountains, and places you’ll take one look at and want to make a base on. It’s been a huge learning curve for everyone, and it turns out to be a really tricky task. Starting off, we assumed it would just be case of throwing down some hills and mountains, a few trees, and we’d be set!

One of the biggest problems in designing a good, open-world map turns out to be occlusion. Occlusion is when something blocks you from seeing something else. For instance, if you’re in a valley, you can’t see the next one over. The rocks and hill between you and the next valley occlude it. This is great, for a bunch of reasons! The first is entirely about performance. If we can guarantee you can’t see it, we don’t have to render it, which means that if we can generally guarantee a certain level of occlusion, we can push the graphical fidelity more for close-range objects. Secondly, in terms of gameplay, we’ve found it feels better. The world feels bigger, there are more discreet zones to claim, and it decreases the odds of some fine upstanding Hurtworldian sniping you from across the map.

With Occlusion

Without Occlusion

Now, I’m a programmer, which means I’m lazy. I want everything done for me. So, potentially, I could run to every single point in the map, and see how far I can see from that particular point. Or! We could use some simple programming to figure out where problem areas are. I wrote a simple script that does exactly that. We go through the map bit by bit, and put ourselves 2 metres above the ground, and then we raycast (which, in laymen’s terms, is just asking “do I hit anything in this direction, and if so, what and where?”) all around us.

We can then say, well, this is a good distance to be able to see, and this is an unacceptable distance. Let’s say anything below 200m is fine, and anything above that but less than 500 is okay, but should be minimised. Anything above that however, is a bad area, and we should put more stuff there to block a player’s view. We can then give every point on the map a score, and show that score in an image. So what does this look like? Well, for the sake of experiment, let’s look first at what it’s like without any rocks or props in the level. White is areas where the player can see a long way, black is where they’re totally occluded in all directions. We can also spit out an exact percentage that tells us the amount of map that is a problem, which is the red percentage.

 

 

Not super great huh? We get around half of the map with an unacceptable amount of oclussion. I think we can do better. Now let’s try throwing some rocks in!

 

Mmm, Interesting! We’re really getting somewhere now. From this map, it’s pretty easy to see some areas that need some work. We can even integrate this map directly into the level, for some really fine control and feedback about the amount of occlusion at any point.

You can see that there’s a couple of hills that are still pretty white – I’d better get back to it!

– Sean