Dad, Solution architect and hobbyist gamedev.

Report RSS StormTorn: A simple explanation about the visibility levels

Posted by on

As I mentioned in the description, the game has discreet (hex shaped) sectors. The contents of the sectors vary - some will have islands, some will be totally empty, or you can find natural resources here, or a native tribe there. But, to make the game interesting, and exploration rewarding, most of this information is hidden until you enter the given sector.
The basic concept is that the content of the current sector (the one where the ship is) is always visible. You have also a good visibility in the surrounding sectors (first circle) and some visibility in the second circle (two steps away from the current sector.) Also, the visibility in the first and second circle must be different if the player have visited a sector already, because they will know that there is a native settlement there, obviously, so there is no point hiding it.
Technically, this is solved by using visibility levels and the visited flag. The levels are explained on this diagram to the right.
Level 1 is the sector itself, or the sea, in other words.
Level 2 is an island or similar, static object in the middle of the sector.
Level 3 object(s) are the ones which are attached to the static object. In case of the island, it can be a settlement, or some natural resource, like sugar canes, or something like these.
Level 4 objects are the dynamic ones, pirate ships, mist, and decorator objects, such as the compass.
Now, how does this work? In the current sector, the visibility level is (almost) always 4, so we show everything on and below Level 4. This practically means that everything is displayed, including the animations and particle effects. In the first and second circle, the default visibility level is 2, but for visited sectors, it is 3. The difference between the first and the second circle is more at the level of detail. Animations and some particle effects (say, the smoke coming from a volcano) will be only visible in the first circle.

I've implemented the first version of this system yesterday, but I'll still need to add some extra visuals to make the hiding/revealing less instantaneous.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: