Bay 12 Games Forum

Dwarf Fortress => DF Suggestions => Topic started by: Carp McDwarfEater on December 26, 2012, 06:07:43 pm

Title: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 26, 2012, 06:07:43 pm
You would think this topic would have been brought up before or implemented, but a search for 'fog of war' just brought up some threads on adding lighting systems. Basically, my suggestion is that if an area cannot be accessed by your dwarves and none of your dwarves have been there for a while, it should eventually just be undiscovered. For example, if you dig into a cavern but immediately wall off the hole, you will instantly be unable to see any creatures moving around down there, which would make sense since your fortress would have no way of knowing if a forgotten beast had appeared. You would still be able to see the actual terrain of the cavern, like the walls and floor, for some time until the dwarves that saw it eventually forget what it was like. After that, it just becomes another patch of black on your screen, like all the other hidden caverns.

This would also apply when you dig out a room and have constructed walls built around its perimeter and to your annoyance the once-exposed rock behind the constructions is still visible, or when you wall in your fortress. If your dwarves are stuck underground, it doesn't make sense for them to know if siegers are still camped above, if migrants came, or if the traders are up there wanting to sell you some stuff. Depending on the player, it might be a good feature to not be bothered by migrants and caravans, or a bad thing to not know what's going on above.

Any thoughts about this suggestion?
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 26, 2012, 07:28:51 pm
It makes sense, although you should be able to keep a "map" of the area; just because no one has looked into the king's sealed-up tomb for a couple years doesn't mean no one remembers where it is. This would reduce issues like accidentally digging into caverns or whatever that you SHOULD know are there.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 26, 2012, 09:31:40 pm
Yeah, the main reason I want this is just so that if I wall off a part of my fort that was flooded or something, I don't have to see that ruin in all its ugliness.
Title: Re: Fog of War for Fortress Mode
Post by: CrzyMonkeyNinja on December 27, 2012, 09:41:34 am
Yeah, the main reason I want this is just so that if I wall off a part of my fort that was flooded or something, I don't have to see that ruin in all its ugliness.
Agreed. I sometimes mine a bit of wall that I don't want to, and in order to make the fort look nice again, I need to construct a wall and end up with a weird-looking double-wall-for-no-reason thing. I'd like to be able to fix that.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 27, 2012, 09:52:51 am
Of course, you'd want some indication of what was there, for reasons mentioned above.
Title: Re: Fog of War for Fortress Mode
Post by: Scoops Novel on December 27, 2012, 10:46:05 am
It would give a reasons for sentrys, as well. I may be wrong, but setting up patrols is fairly hellish at the moment right? If so, lets have that tuned first.
Title: Re: Fog of War for Fortress Mode
Post by: Mechatronic on December 27, 2012, 11:15:39 pm
I think something like this would be good eventually, probably in conjunction with adding light sources. I'd rather make areas not currently in view greyed out or something so that you can still see the terrain but not creatures or any changes that have occured.
Title: Re: Fog of War for Fortress Mode
Post by: assasin on December 28, 2012, 01:59:28 am
Maybe there could be a fog of war if no actual dwarves are around. Might make scouts important for offsite wars whenever that update is released.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 28, 2012, 10:36:47 am
I think something like this would be good eventually, probably in conjunction with adding light sources. I'd rather make areas not currently in view greyed out or something so that you can still see the terrain but not creatures or any changes that have occured.

The part about areas staying greyed out was in the original post. I agree that you should be able to still see the terrain, but only for a time. I guess there could be an option in the raws to enable or disable the undiscovering of terrain.

And as for having sentries and only being able to see things within sight of dwarves, I don't know. It would make it difficult to check cisterns, lever rooms, and other places my dwarves rarely visit. As I said on the original post, if a place can be accessed by your dwarves I think you should be able to still see it. Fog of war would only apply to sealed off places.
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 28, 2012, 08:08:18 pm
Why would the dwarves ever forget the terrain?
That just doesn't make sense to me. It's just an obtuse feature that adds frustration.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 28, 2012, 08:44:56 pm
If you walked through a park once, could you give a perfect description of where every tree and hill is a few months later? Five years later? But still, I can see how some might hate this feature, so you should be able to easily disable it in the raws.
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 28, 2012, 08:47:04 pm
Actually I have an uncanny memory for places. So maybe.
I'd definitely remember where any walls etc were.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 28, 2012, 09:06:11 pm
Well, if you could remember where all the walls and such were in a cavern, then it shouldn't be much of an annoyance if your dwarfs forgot and it was undiscovered. And if you couldn't, then why would you expect your dwarfs to?
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 28, 2012, 09:07:33 pm
Well, if you could remember where all the walls and such were in a cavern, then it shouldn't be much of an annoyance if your dwarfs forgot and it was undiscovered. And if you couldn't, then why would you expect your dwarfs to?
I meant in a real place. Not in Dwarf Fortress.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 28, 2012, 09:17:25 pm
If you walked through a park once, could you give a perfect description of where every tree and hill is a few months later? Five years later?
No, but I could still remember that there were hills, about so steep and high, about so many, about this many trees. And I don't draw maps. Dwarves should at least be able to remember the presence of such things.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 29, 2012, 11:36:21 am
Yeah, the main reason I want this is just so that if I wall off a part of my fort that was flooded or something, I don't have to see that ruin in all its ugliness.

This is really the only reason I mentioned dwarves forgetting about areas. It could be slightly annoying at times, but the terrain being forgotten would be a gradual thing. If you've sealed off a cavern for three or four years then I don't find it that unreasonable that your dwarves would forget exactly what was down there. It probably wouldn't matter to most players because chances are if they were going to do anything with the cavern, they'd have done it by then and not sealed it off.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 29, 2012, 04:13:50 pm
It wouldn't make sense that they'd forget the general layout of the caverns, though. Some way of remembering the general layout while forgetting the specifics would be needed. That, or maps.
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 29, 2012, 04:19:34 pm
If you want it for aesthetics, then wouldn't it be more useful to have an order to have the dwarves forget a certain area, done similarly to traffic zones; so that anything you've hidden is highlighted while in the orders menu.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 29, 2012, 04:39:34 pm
Like hidden items?
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 29, 2012, 05:07:03 pm
Like hidden items?
Yes, but for the game tiles.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 29, 2012, 05:14:20 pm
If you want it for aesthetics, then wouldn't it be more useful to have an order to have the dwarves forget a certain area, done similarly to traffic zones; so that anything you've hidden is highlighted while in the orders menu.

I hadn't thought of that. But yeah, I'd be happy with the ability to hide map tiles.
Title: Re: Fog of War for Fortress Mode
Post by: Baccar Wozat on December 29, 2012, 05:55:25 pm
It would make more sense, but if we're gonna have areas that you can't see because you haven't been to them in awhile, you might as well have Line-of-Sight (LoS) routines which are more commonly found in roguelikes.

It would be a real programming feat to have LoS for more than one dwarf at once. (Though if anyone can, Toady can.)

Fog of War, on the other hand, is something found in Empire-likes, and creates the impression that an area you can see is empty when it isn't.
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 29, 2012, 06:34:46 pm
It would make more sense, but if we're gonna have areas that you can't see because you haven't been to them in awhile, you might as well have Line-of-Sight (LoS) routines which are more commonly found in roguelikes.

It would be a real programming feat to have LoS for more than one dwarf at once. (Though if anyone can, Toady can.)

Fog of War, on the other hand, is something found in Empire-likes, and creates the impression that an area you can see is empty when it isn't.
If it was instantly forgetting where something was once it's out of LoS, then that would really bugger up the management gameplay. You'd have to send out a military squad to explore the kitchens if your brewer and cook left; so that they could provide LoS to the workshops so that you could actually give orders to them.
Title: Re: Fog of War for Fortress Mode
Post by: Baccar Wozat on December 29, 2012, 10:13:40 pm
It would make more sense, but if we're gonna have areas that you can't see because you haven't been to them in awhile, you might as well have Line-of-Sight (LoS) routines which are more commonly found in roguelikes.

It would be a real programming feat to have LoS for more than one dwarf at once. (Though if anyone can, Toady can.)

Fog of War, on the other hand, is something found in Empire-likes, and creates the impression that an area you can see is empty when it isn't.
If it was instantly forgetting where something was once it's out of LoS, then that would really bugger up the management gameplay. You'd have to send out a military squad to explore the kitchens if your brewer and cook left; so that they could provide LoS to the workshops so that you could actually give orders to them.
What Dungeon Crawl Stone Soup does in that instance, is keep everything already shown before, but if not currently in sight, it's darkened 50%. That way everyone knows where things should be, even if they aren't anymore.
Title: Re: Fog of War for Fortress Mode
Post by: Graknorke on December 29, 2012, 10:20:08 pm
It would make more sense, but if we're gonna have areas that you can't see because you haven't been to them in awhile, you might as well have Line-of-Sight (LoS) routines which are more commonly found in roguelikes.

It would be a real programming feat to have LoS for more than one dwarf at once. (Though if anyone can, Toady can.)

Fog of War, on the other hand, is something found in Empire-likes, and creates the impression that an area you can see is empty when it isn't.
If it was instantly forgetting where something was once it's out of LoS, then that would really bugger up the management gameplay. You'd have to send out a military squad to explore the kitchens if your brewer and cook left; so that they could provide LoS to the workshops so that you could actually give orders to them.
What Dungeon Crawl Stone Soup does in that instance, is keep everything already shown before, but if not currently in sight, it's darkened 50%. That way everyone knows where things should be, even if they aren't anymore.
So like adventure mode works basically?
The only issues I have with that are that the flickering would be really distracting, and it feels like the kind of feature that ends up like more of an annoyance than a genuine challenge.
Title: Re: Fog of War for Fortress Mode
Post by: Carp McDwarfEater on December 29, 2012, 10:48:35 pm
The system I described would only have fog of war over areas inaccessible to dwarves, so there wouldn't be that problem. Line of sight was never mentioned, because I don't think that would work well.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 29, 2012, 11:44:23 pm
It was mentioned, just not by you.

It would make more sense, but if we're gonna have areas that you can't see because you haven't been to them in awhile, you might as well have Line-of-Sight (LoS) routines which are more commonly found in roguelikes.

It would be a real programming feat to have LoS for more than one dwarf at once. (Though if anyone can, Toady can.)

I agree, LOS is stupid.
Title: Re: Fog of War for Fortress Mode
Post by: Fluoman on December 30, 2012, 01:35:57 pm
Add an option in the nobles screen: "map drawer" with precision settings like in record keeping.
There, you have someone to "remember" the layout of caverns and hills and so on.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on December 30, 2012, 01:52:40 pm
Cartographer.

Anyways, maps open up some interesting idea, like exploration, selling maps, selling bad maps...
Title: Re: Fog of War for Fortress Mode
Post by: PTTG?? on January 02, 2013, 12:34:43 pm
From a programmatic standpoint, the simplest way to do this is, every in-game "day", pick a random tile somewhere on the map, or perhaps one tile in each currently loaded chunk, or something like that. If that tile is underground and out of sight to any Dwarves, then visually hide it.

Problem 1: Currently, substantial portions of the "undiscovered" areas of the map aren't loaded. Hiding them won't unload them, and shouldn't. So there will need to be some level of awareness of things like invaders entering areas that are unknown to the Dwarves but have been loaded. Handling edge cases like this could be troublesome.

Problem 2: This results in at least one additional bit of information about each and every tile on the map. This will bloat saves and slow the engine, perhaps significantly. These concerns might not be worth the gain.

Still, an interesting idea if these problems can be addressed.
Title: Re: Fog of War for Fortress Mode
Post by: GreatWyrmGold on January 02, 2013, 12:45:00 pm
Problem 1 is wrong. IIRC, every tile is always "loaded".
Problem 2 is right, but I'm not sure how much of an impact it would be. Certainly not as much as the extra calculations would be.
Title: Re: Fog of War for Fortress Mode
Post by: darknessofthenight on January 02, 2013, 05:05:26 pm
What if when you walled of an area it kept its appearance exactly? i.e not showing that new trees have grown but showing the trees that were there last time you looked.
Title: Re: Fog of War for Fortress Mode
Post by: Carric on January 02, 2013, 05:25:16 pm
Perhaps there could be an option to "Show hidden, previously discovered areas" which could be toggled on and off? That way if you want to know if the cavern is there, you turn it on, and if you don't want to ruin your fort's beauty, you turn it off. Problem hopefully mostly solved.
Title: Re: Fog of War for Fortress Mode
Post by: blaster339 on January 04, 2013, 06:31:12 am
Its a good idea, but you should make bind it to a button so you can turn it off or on anytime since I think having no fog of war is pretty useful
Title: Re: Fog of War for Fortress Mode
Post by: zwei on January 04, 2013, 09:04:35 am
What if when you walled of an area it kept its appearance exactly? i.e not showing that new trees have grown but showing the trees that were there last time you looked.

I would render it in grayscale to show that it is "flashback" area, but yes, rendering it in latest known state is best way of doing it. IIRC, adventurer mode does this.

It would also look neat when you lockdown fortress to outside go grayscale and stop updating.

Still, biggest issue is selecting which tiles are out of sight and which are not because simple "can dwarves path to it?" is not going to cut it:

You can have inaccessible area, but dwarves can see it (from top of the wall, across moat, throught window or fortification)
You can have accessible area, but unvisited for years (distant part of caverns, tomb of hero...)

So you do need some sort of LOS.

Thou it would be pretty cool to see army unit on recon mission light-on and off tiles as they move through forested landscape.
Title: Re: Fog of War for Fortress Mode
Post by: Robosaur on January 04, 2013, 04:19:52 pm
I think there should be a "hide area" designation that causes a selected area to become unrevealed.