Sign in to follow this  
irreversible

A brief discussion on design: handling visibility

Recommended Posts

I'm trying to put together some form of visibility control for a top down strategy game/experiment and I'm considering going out on a limb by introducing fog of war in a way that I don't think has really been done before.

 

Basically the idea is to give the player vision of only the things that his units can see while masking out the rest of the terrain pretty almost completely. In essence this is simplified fog of war from any strategy game that has one. Here's the idea in action: close up, the player can see the unit's immediate surroundings. Each unit has its vision radius, which is further compounded by environmental factors.

 

For reference - the green blobs on the map are the Shetland islands off the northern coast of the UK. This should provide a sense of scale. The first image is also the minimum zoom at which I would assume the player plays the game (they can zoom in closer):

 

[attachment=26875:close.jpg]

 

As they zoom out, however, it quickly becomes apparent that what is visible in practice is a noticeably small portion of the actual world. Here's the same area from a bit further out:

 

[attachment=26876:closer.jpg]

 

Zooming out completely reveals the true limited nature of visibility:

 

[attachment=26877:wholeworld.jpg]

 

The last screenshot contains the whole of Northern Europe.

 

All of this is pretty much standard, but my idea is to:

 

1) provide the player with no permanent visibility at all, meaning that any area that isn't near a unit is permanently shrouded

2) provide the player with an adaptive system that reduces the shroud based on something like their cartography skill and the number of times they have traversed an area with a unit

3) the same as 3, but the player has clear visibility of only the active unit. This means that the minimap (which would be pretty much redundant before the player is given the ability to actually map the world) only shows units that have direct line of sight between each other. Cycling through units would provide no sense of position or relevance at all - the units could easily be just barely out of each other's sight or they could be half a world apart. The player would have no immediate way of knowing.

4) if the above two seem too limiting, resort to Civilization style fog of war: any tile that the player can see directly is fully revealed and any tiles they have not yet discovered are shrouded completely

 

I'm personally rather fond of approach 3, but I do realize that penalizing the player's ability to orientate may seem excessive - especially nowadays. The point here is, though, that one of the focuses of the game will be on exploration and I want the player to be wary of haphazardly sending out units - after all, when Columbus set sail for the new world, stars and the Sun were the only things they had to go by. Mapping the world at the time was very much prone to error and maps were usually very crude. My objective is to think of a way tap into this sense of exploration without ruining the gameplay in the process.

 

I'd appreciate some quick thoughts on how to best achieve this. Does this (in particular number 3) seem like an interesting approach or does it rather feel annoying?

 

I don't really have a working prototype yet so I it's not really possible to mess around with the idea, but some thoughts and discussion would still be nice smile.png.

Edited by irreversible

Share this post


Link to post
Share on other sites

It appears the starting basis for the player is: "You have multiple units which have been spawned at random positions in the world. You can communicate with each unit individually ... go forth and explore." Sounds interesting to me, either with a random map, or based on a real world map.

 

 

 


an adaptive system that reduces the shroud based on something like their cartography skill and the number of times they have traversed an area with a unit ... the player has clear visibility of only the active unit.

 

I personally like that basic idea.

 

Some suggestions:

 

Even with just a piece of paper and a pencil, traversing an area multiple times to "remember" it shouldn't be necessary. Once should be enough, unless it's a foggy day, or raining, or... The retained information can include only limited info on adjacent (unentered) cells - i.e., "seeing" an adjacent forested cell need not include info on what the forest may be "hiding" unless that adjacent cell is actually entered. The forest may, in fact, be hiding an "enemy" unit or resources (water, building materials, etc.), which, if you don't explore that cell, tough luck.

 

If the goal (or one of them) is to explore, the adaptive part of the system could allow the user to link unit visibility regions - if, for instance, two separate units "see" the same landmark. Something like "Link unit M's cell #whatsit with unit N's cell #whosit and show me what that overlay looks like." That link may result in a garbage map if the linked cells are not, in fact, the same one in the actual world. The map of that "guess" could indicate conflicts - e.g., one unit saw a forest in cell #X, but the other unit saw a river in that cell. Display a question mark or "WTF?" for that cell in the "combined" map.

 

Note: units shouldn't have to see each other for this to happen. E.g., "Yesterday, unit 7 saw a hut beside a river. Today, unit 3 saw a hut beside a river. I wonder if that's the same hut?" Try it and see if things seem to be compatible.

 

More obviously, with regard to unequivocal landmarks: "Unit 7 passed through John O'Groats two turns ago. Unit 3 just entered John O'Groats. I now know where the units are in relation to each other and can combine their visibility maps."

 

Your choice, but once the user has combined maps successfully, all units sharing the map should be able to "see" the combined map. Sort of like bees exploring the world individually, but sharing the info when they return to the hive and "dance" for each other.

Edited by Buckeye

Share this post


Link to post
Share on other sites

Aww I wrote some stuff and accidentally hit backspace...

 

Anyways, I had the following idea:

 

First, the map has to be randomly generated.

 

You can only see the portion of the map directly/indirectly seen by currently active unit (units should share their view if theyre close enough).

 

Now, the player can draw freeform maps (either using some kind of pencil, or annotated points, or hexes, whatever). The map is in no way linked to the real world (it wont show where your units are, it shows nothing, everything is added on it manually).

 

So if the player sends out an exploration team, they get pushed around a bit by wind, end up in a storm, and after 10 years find land, the player has barely any idea where they are.

The player will explore around a bit with this exploration team, drawing a local map (centered around the "landing point" for example).

Now, the player also has a local map for the main base.

Then, the player can create a 3rd map, name it "global map", and drag and drop the two local maps onto this global map as single entities, positioning and rotating them in an attempt to make their relative positions as accurate as possible (perhaps the player knows the approximate direction the exploration team went, and the approximate speed, and hopes they didnt do a 180 turn on the way)

When further information is received, the player can adjust the global map by repositioning the local maps.

There can be as many maps as the player wants, and any map can be included in any other maps as many times as the player wants. So the player could have a map for each continent (filled with local maps), and a global map with the continents glued together.

 

Now, this mapping process takes time and effort, so it should obviously be central to the gameplay to make it worth implementing.

 

The maps are needed for efficient long distance navigation, so what can we do to make that really important?:

  • Unique resources found in far away places (find a way around the globe to get there faster? Maps should wrap around and be of random size so you never really know if you got around the planet or if you covered 25% of the map or if you circled it 4 times)
  • Knowing where an important location is on one local map, but needing to know where it is relative to another to be actually able to get there. Eg Exploration Team finds a map to a treasure. The map is relative to their current location and the player can use landmarks to figure out where the treasure is on that local map. But the Exploration Team lacks the resources to go after it, because of course its on another continent entirely. So, you need to know where the treasure is relative to Main Base in order to send a stronger team for it. In order to do this, you need to have a reasonably accurate global map where both the local map of Exploration Team and the local map of Main Base have been placed. If you have such a map, you will immediately know where to go from Main Base to get to the treasure. If you dont have a map like that, youre not getting there any time soon.
  • Knowing where the enemy is relative you in all directions once you find them. Maybe you only explored to the west (Wherever that is...) and find the enemy far away, but if you explored east you might have found them much closer to you. If you have a good global map, you would realize this immediately, but if you dont know the size of the planet, youll have no idea.
  • Maybe you need to create maps for traders or allies to properly interact with them. If your maps suck, the traders will never get to you and neither will your allies when youre in trouble. (it could be interesting if you could share your maps with your allies in multiplayer, so they can use them as parts of their global maps, or maybe teams have a combined pool of maps editable by the entire team)

 

Overall this could be fun, but the games will have to be very long (not a problem if single player. But for multiplayer It might make sense to have big teams where people can come and go, but the maps remain. Thats how maps evolved in real life anyways... Difficult to implement well though)

Edited by Waterlimon

Share this post


Link to post
Share on other sites

 

It appears the starting basis for the player is: "You have multiple units which have been spawned at random positions in the world. You can communicate with each unit individually ... go forth and explore." Sounds interesting to me, either with a random map, or based on a real world map.

 

 

 

That's not quite what I had in mind, although the basic idea isn't too far off. The player still starts with a hamlet or a city, which is surrounded by claimed land. Visibility is always present on all tiles that belong to the player. However, departing from said country borders (especially when doing so across a body of water) should yield an unpredictable experience. That's where the "single unit visibility" only bit comes in.

 

The one problem I have with it, though, is that since I'm using a hex grid as basis for the world, there is always a definite sense of east-west/north-south relationship, which reduces the sense of sailing into the unknown. A few solutions that pop to mind are:

 

1) disable the grid from the player's point of view. Land features, borders and such still use it to maintain regularity, but unit movement is not limited to tile-to-tile. Rather, the player is left with the impression of RTS-style continuous movement while - especially at sea - the elements can subtly alter the unit's true direction, introducing a sense of randomness. The player, while able to minimize this randomness, is not able to fully control it. This would mean that the camera be rotated relative to the direction of the unit while a unit is in focus.

2) disable the grid on sea, which feels like a silly idea

3) do something super stupid, such as keeping the entire grid relative to the unit (eg rotating the grid itself based on the unit's direction). This would be a fun way to mess with the player, but it would probably also end with me finding a horse's head in my bed one morning

 

 

If the goal (or one of them) is to explore, the adaptive part of the system could allow the user to link unit visibility regions - if, for instance, two separate units "see" the same landmark. Something like "Link unit M's cell #whatsit with unit N's cell #whosit and show me what that overlay looks like." That link may result in a garbage map if the linked cells are not, in fact, the same one in the actual world. The map of that "guess" could indicate conflicts - e.g., one unit saw a forest in cell #X, but the other unit saw a river in that cell. Display a question mark or "WTF?" for that cell in the "combined" map.

 
Note: units shouldn't have to see each other for this to happen. E.g., "Yesterday, unit 7 saw a hut beside a river. Today, unit 3 saw a hut beside a river. I wonder if that's the same hut?" Try it and see if things seem to be compatible.

 

 

I actually like the idea of landmarks a lot! The way these might work is by inserting a considerable number of them and treating each as one element regardless of its size. This would make sense if the player had the opportunity to name or rename these landmarks.

 

An example of a landmark would be a forest, which is propagated from a seed tile to any number of adjacent tiles, which are then linked as a region and can be assigned a name - either automatically or by the player.

 

Vision linking in my view would then occur in three cases:

 

1) when the player is within their kingdom's borders

2) when two units can see each other

3) when two units can see the same landmark

 

 

Now, the player can draw freeform maps (either using some kind of pencil, or annotated points, or hexes, whatever). The map is in no way linked to the real world (it wont show where your units are, it shows nothing, everything is added on it manually).

 

 

While it sounds pretty cool on paper I think this would, at best, have been viable in 1995 when players didn't yet expect the game to do everything for them. Writing down codes and passwords was commonplace then and in fact several manuals included separate pages for notes.

 

Nowadays this would have to be automatic.

 

One thought that I did have is to indicate the unit's position on the map as within a region as opposed to a specific location. This does, however, necessitate some form of cartography to which the region is relative, which would still have to be handled automatically. I cannot think of a good way to do that off the top of my head.

 

 

 

Then, the player can create a 3rd map, name it "global map", and drag and drop the two local maps onto this global map as single entities, positioning and rotating them in an attempt to make their relative positions as accurate as possible (perhaps the player knows the approximate direction the exploration team went, and the approximate speed, and hopes they didnt do a 180 turn on the way)
When further information is received, the player can adjust the global map by repositioning the local maps.

 

 

This idea I like! Mapping the world would effectively become a fun little minigame.

 

While I don't think the player can be made to draw a map themselves, merging this idea with the notion of landmarks could be very interesting indeed: a local map is created when a unit encounters a landmark. As long as a relationship between any two or more landmarks can be maintained, they are positioned on the same local map. When a continuous chain of established landmarks is broken, updating the local map is discontinued and the region is placed on a chalkboard-like canvas for the player to place, much like a puzzle tile. Ultimately the player links together enough of these regions to reveal the entire world. As part of a reward system, by properly connecting two or more local maps, the shroud is removed from the world itself, which in turn makes navigating these known territories easier. The way two local maps can be linked is by having at least one landmark overlap on both. Although, this raises a few algorithmic questions:

 

1) how should the game distribute landmarks to maintain a sense of discovery and risk?

2) how can regions that are distinct be ultimately linked and added to the global map?

3) how are seas and oceans handled?

 

While the first two can be solved using one of three methods - 1) by giving later units a larger view distance, 2) by allowing land features (eg mountains) to provide greater sight range or 3) by allowing the player to construct special buildings/improvements such as a Lookout Tower to establish a connection between two landmarks that are further apart - making this algorithmically at the same time fun and robust (eg guaranteeing that all parts of the world can be linked while still making it a challenge) may be non-trivial.

Share this post


Link to post
Share on other sites

One thing to consider with landmarks is this:

 

What if a unit walks from the main base to some far away place? If landmarks are reasonably common, this would create a big continuous map linking those two far away locations. This would also happen for every explorer you send out (except maybe not naval units as seas wont have landmarks), so youd never end up with more than one map per landmass (unless your units start out spread randomly around the map).

 

The reason I proposed the user manually draw the map on some kind of virtual paper or whatever, is that this introduces inaccuracies in shapes and distances. So, youll benefit from sending more explorers on different routes to get more data. And the above issue wouldnt be a problem anymore because the only value youd get from mapping the long windy path of an explorer onto the main base map is that you know the exact relative location, but with manual mapdrawing this is no longer possible (too many inaccuracies from a constantly moving explorer with no nearby reference point).

 

Manual mapping would be pretty tedious though so if long games are not possible (singleplayer or some kind of weird persistent multiplayer), perhaps there is a way to simulate the map inaccuracies:

  • Each unit can be assigned a map to which they draw (drawing may be enabled/disabled, like on the sea its too unpredictable and would just produce useless noise)
  • Units draw vertices (landmarks) and edges (approximate distance/direction with some randomization to create the inaccuracy) on the map
  • When a new edge is added between two already existing vertices, run some algorithm to adjust the existing edges to make it all match up. For example, consider two units each going on a route 4 vertices long. In the end, they both find a common vertex, meeting there. However, before they met, on the map one unit was 2x further than the other! so, now that the endpoints need to match, you gotta run the algorithm. You have the error (displacement between unit As and unit Bs approximated endpoint position, which should be the same point), and you have to somehow evenly distribute that error into all the edges on their paths (eg the longer path would get shortened a bit, and shorter one would get lenghtened, and some direction changes too)

The algorithm seems like you could find something online if you used the right terms. At least it would be interesting to implement. As a fallback, you can always task the user with applying the algorithm. Maybe every time you connect 3 landmarks, forming a triangle, with a small enough area, all the land inside that triangle is revealed (note: the revealed land might not align at all with another bit of revealed land, so you cant just render a big hexagon map, youd need multiple views of it at different rotations. And this lack of alignment would immediately tell the player that something on the map is wrong).

Edited by Waterlimon

Share this post


Link to post
Share on other sites

What about something like the system of sailing directions or "Rutters" that were typically used in that era?

 

Say, you send a ship off to do some exploring.  They map out where they've been, reach whatever destination, and then head back to port.  Until they have successfully returned to port, the knowledge that that unit has gained about the world is limited to just that unit.  Once they get home, the knowledge that they have gained starts to disseminate, but, again, any ships that are already at sea shouldn't instantly receive the benefit of that information, they would have to return to port first and update their charts.

 

This could end up being a pretty big headache to keep track of...

 

It might make for some interesting mechanics though.  Say, you know your enemy has sent an exploration fleet out to scout out the New World.  Rather than having to do your own scouting, maybe you could ambush their fleet on the way back home, and steal their charts, denying them the benefit, and getting it for yourself.  Except maybe the sailing instructions are coded, and you need to do some espionage/research/coerce or bribe the enemy captain to get the full benefit out of them.

Share this post


Link to post
Share on other sites

This all sounds rather tedious and non fun for the player.

Orienting in game with no maps is kind of fun (dayz) , revealing random maps as you discover them is kind of fun (civ), however hiding map terrain you have already been to in a map centric game to me sounds somewhere between masochistic and insulting.

If you want orientieering in the game, consider remove all non local maps. 

Edited by DaveSF

Share this post


Link to post
Share on other sites

Navigation on a mostly invisible map will be hard. So, don't destroy the experience of exploration (that is, you have it explored and it is known now). I use a two layered "fog of war" in my game, this is how it works:

1. The map is hidden at the start, only the parts which are visible by your units are displayed.

2. Once a tile(hex in your case) was discovered once, it is marked as known.

3. Display all known and visible tiles. Known tiles, which are currently not visible, are rendered in an other way (eg. gray-scaled instead of colored).

4. Enemy units are only displayed, when the move on visible tiles.

5. You have the option to mark tiles as permanently visible by placing torches (in your case it could be an outpost ? ).

Share this post


Link to post
Share on other sites

A good amount of nice feedback here - thanks!

 

Ashaman - that's pretty much the way Civ and other strategy games handle visibility, save for point 5. I'm currently considering an amalgam of what was discussed above and how this standard way works. Eric seems to suggest the closest thing to what I have in mind:

 

What about something like the system of sailing directions or "Rutters" that were typically used in that era?

 

Say, you send a ship off to do some exploring.  They map out where they've been, reach whatever destination, and then head back to port.  Until they have successfully returned to port, the knowledge that that unit has gained about the world is limited to just that unit.  Once they get home, the knowledge that they have gained starts to disseminate, but, again, any ships that are already at sea shouldn't instantly receive the benefit of that information, they would have to return to port first and update their charts.

 

This could end up being a pretty big headache to keep track of...

 

It might make for some interesting mechanics though.  Say, you know your enemy has sent an exploration fleet out to scout out the New World.  Rather than having to do your own scouting, maybe you could ambush their fleet on the way back home, and steal their charts, denying them the benefit, and getting it for yourself.  Except maybe the sailing instructions are coded, and you need to do some espionage/research/coerce or bribe the enemy captain to get the full benefit out of them.

 

In essence, I'm considering splitting mapping land and sea into two parts. Moving on land works as you would expect. While I genuinely like the landmarks approach outlined above, I think both Waterlimon and DaveSF have a point - it's just too unpredictable and complicated slash frustrating. Also, I don't think it would bode well if the player's trivial comprehension of terrain was somehow better than the computer's and they ended up cursing at the game for treating them like an idiot.

 

That being said, if the aim is to capture a sense of exploration, movement with limited visibility on the sea actually makes sense, since there are no points of reference to go by other than what ever navigational tools might be present on the ship: by restricting the player's view of the surroundings to what the ship can currently see and providing them the player with navigational tools that indicate NSEW within a margin of error will allow them to assess in which direction they are and ought to be moving. On top of this the game will somewhat randomize the direction of the vessel  at each turn to throw them off. As such:

 

1) the sea is always covered in a shroud and will never be revealed on the main map - instead the player will have fair visibility from the shore and the option to send out ships to explore what's beyond

2) mapping faraway lands is done the way you'd expect (eg there's no distortion/obfuscation) and any remote areas that are discovered appear on the main map

3) however, the player cannot see the position of their ships on the main map - instead, the ship might have its own navigational map, which places the ship on it, but within a margin of error. These navigational maps perform as rutters, mentioned by Eric and will be merged with the main map only after the ship returns intact

4) to reduce navigational clutter, the player can automate connections to faraway places once a beachhead/colony/hamlet has been established. The time taken for the AI to automatically navigate between the two, though, will also be subject to randomization and while the player can take control of a ship at any time, there will always be a chance that the it will arrive at a somewhat different place or be lost to the elements/pirates along the way

 

The reason I started this thread was to get yous guys' thoughts and gut feeling on this and I'd like to say that you've been awesome! Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this