Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][CR] Atmospheric and Environmental Modifications to Cities #7892

Closed
wants to merge 7 commits into from

Conversation

vache
Copy link
Contributor

@vache vache commented Jun 8, 2014

Applies special zone post processing to generated maps, allowing for things like looted, overgrown, and fungus covered cities.

How it works:
Cities have a zone type added to them, and overmaps have a method to determine if a location lies within a city. During mapgen, the location checks its city, finds the city zone type, and applies special post processing to it.

Screenshots:
Overgrown with Triffids: http://i.imgur.com/sAEm6lv.png
Overgrown with Fungus: http://i.imgur.com/vr6DQ6x.png
Looted library: http://i.imgur.com/i9VwHY8.png
Looted gun store: http://i.imgur.com/ar2GZbJ.png

Zones so far:
Fungal: the fungus has spread inside and outside of all locations in the area.
Overgrown: triffids have spread nature back into the city, outside areas now full of trees, shrubs, and underbrush. Some of the road has been broken through. Inside areas are mostly unaffected, since the plants want the sunlight.
Looted: one in 5 chance of a location being looted, with all items > a certain value (right now $200) and a random amount of the rest being looted, terrain and furniture being bashed up, and blood stains being tossed around.

@jeremyosborne
Copy link
Contributor

I want to see a fungal city. You should post some screenshots Dwarf Fortress style of this.

@vache
Copy link
Contributor Author

vache commented Jun 8, 2014

Updated with a little more info.

@Rivet-the-Zombie
Copy link
Member

The looted screens look awesome! Just like a proper apocalyptic environment should look.

One suggestion: how about making it so the value of looted stuff is somewhat randomized, or making it so items have a small chance of being ignored even if they're over the limit. Otherwise it seems like we're talking about the world's most thorough looters.

@jeremyosborne
Copy link
Contributor

Now I want to run into a triffid city. Nice work!

The green makes me think of the good book turned into a bad movie I am Legend, as well as the book The World Without Us. Looking forward to seeing these in the game.

@Lain-
Copy link
Contributor

Lain- commented Jun 8, 2014

This is seriously awesome. Good job!

@@ -438,8 +439,12 @@ void add_corpse(int x, int y);
bool add_graffiti(int x, int y, std::string contents);

// mapgen.cpp functions
void loot();
void entriffidate();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my new favorite word, 'entriffidate'.

@kevingranade
Copy link
Member

Very nice, can't wait to get this in.

@Zireael07
Copy link
Contributor

This is AMAZING!

@ExLeper
Copy link

ExLeper commented Jun 8, 2014

This is awesome, the looted locations will make the game feel much more alive.

@Lain-
Copy link
Contributor

Lain- commented Jun 8, 2014

A little nitpick: An overgrowth city would probably have bushes and young trees only, not full-growth trees. As the cataclysm is still recent enough.

@Rivet-the-Zombie
Copy link
Member

An overgrowth city would probably have bushes and young trees only, not full-growth trees.

A naturally overgrown one, but triffid queens can summon adult trees from nowhere.

@vache
Copy link
Contributor Author

vache commented Jun 8, 2014

My current set of things to work on is here: vache#5

I'd like to keep it mostly technical and related to specific improvements or how to handle certain changes so if you post something there, try to keep it focused on implementation details.

@EricFedrowisch
Copy link
Contributor

This is a really great idea. This seems like it will really make the cities seem less like ghost towns where everyone just got up and left and more like post-apocalyptic ruins. I wonder if it would be possible to have variety in how far the environmental changes have progressed? The pictures look like infection spots that are pretty much completely overrun. Can we get some less overgrown ones too?

@vache
Copy link
Contributor Author

vache commented Jun 12, 2014

My next goal right now is to have an individual tile intensity/density value based on the distance between the tile and the epicenter of the zone, to make zones look more natural and not full blown everywhere, then abruptly nothing.

I could also attach an intensity value to the zone itself to determine how strong the zone itself is. That could be used to make less overgrown zones, and be used to make zones grow in the future.

@EricFedrowisch
Copy link
Contributor

Making the density radiate from the epicenter makes a lot of sense. I am really excited to see this feature in game. Also are the infection zones able to overlap? May I suggest one more type as well? Perhaps "burnt to the ground" type. Either because of bombing or riots or just plain accidents I would expect to see more burnt buildings grouped together. After all, once society and order collapsed there would be no firefighters working cohesively to contain the blazes.

@kevingranade
Copy link
Member

In order to make this intensify over time, we'll need to incrementally
re-apply the template because we don't want to treat already explored areas
differently from newly explored areas.
Something to keep in mind about change over time is it will stop making
sense at all with shared maps. I can imagine ways to make it work, but I
don't want to implement any of them :P

@vache
Copy link
Contributor Author

vache commented Jun 12, 2014

Overlap isn't possible yet, but right now it should be for two zones to butt up against each other. I haven't seen it in testing yet though. Zone growth should make overlaps happen though. I'll have to take a look at that eventually, but I think that'll definitely be out of scope for an initial implementation.

Also, I have been testing a bombed/burnt out zone type, as an alternate to looted.

@kevingranade I had an idea to store a copy of the original map somewhere that could be restored, so that when the player cleared the heart or the spire or whatever else, the zone could gradually revert back to its original state over time. Something like that could be used to "reset" the world if someone makes a new character, OR we could say it's something people are just going to have to deal with if they want a dynamic world.

@kevingranade
Copy link
Member

Probably just telling them to deal with it is better, what all would get
reverted that way? Damage to terrain?
On the other hand if it's incremental we could just turn 'vine covered
wall' back into 'wall' once the triffid grove is defeated.
Seems to me that radioactive decay is a good model for this stuff, each
square has a 1/x (where x is generally HUUUGE) chance of 'decaying' into
the next version for a given time period. For example wall -> 'wall with
vines' -> 'vine covered wall' -> 'crumbling vine covered wall' -> 'heap of
vines'
The decay rate could be tuned individually, and you could even have
branching paths for decay.

@VampyreLord
Copy link
Contributor

Come to think of it, is there a possibility to assign certain zones/cities as toxic? Like you should actually wear gas masks or at least dust masks to be able to venture inside; making wearing such masks actually useful.

@vache
Copy link
Contributor Author

vache commented Jun 13, 2014

The issue with that is that the toxic gas field would dissipate as soon as you entered, and wouldn't pose a problem anymore. There could be toxic gas vents that continuously spew it around, but that wouldn't be realistic.

The reversion would probably just cover all the terrain/furniture that was changed as part of the zone processing. So, house wall turned fungal wall would turn back to regular wall, but the untransformed window that you smashed open would remain smashed. The problem with the branching and terrain changes is that it's so incredibly tedious to account for all the possibilities on both the before and after terrains.

@EricFedrowisch
Copy link
Contributor

+1 for Toxic Gas Vents. Or spore clouds in fungal terrain.

@RadaRadaRada
Copy link
Contributor

Not sure about the bloodstains and trash on the looted zones. I would think the mob looting done at the chaos of cataclysm's beginning would be more clean and bloodless. I think there could be other type of looted zone visited by survivor(s): Less damage, bloodstains, trash, occasional bodies, only survival useful items? taken instead of cost based ones. I think, some of buildings (bank or pharmacy) could be exempt from "looting" because they would look weird with empty vaults.

Areas overgrown by triffids could use some triffid specific foliage and those immobile plant enemies like biollantes and creepers. Destruction of hard terrain, like pavement and sidewalks, seems extremely excessive.

Same excessive damage complaint, but for fungal zone instead. Perhaps items made completely from wood, paper, flesh, etc. should be destroyed in these areas? And those which only share material get damaged?

@vache
Copy link
Contributor Author

vache commented Jun 13, 2014

Some of the issues involved with looting especially are going to be relatively difficult to tackle in a reasonable manner. There is no good way to filter on "survival useful items", and when you think about it, almost all items would fall into that category except the complete trash items. For example, if I made the loot system go by categories, then looters would probably want: weapons, ammo, tools, food/drink, medicinal drugs, and sturdy clothing. About the only items left would be crafting mats and books.

Making bank vault interiors and other "sealed" areas safe from zones is going to be a task for sure. I might have to make that filter on something like "no windows, only metal door on outside" to determine that. Still not a trivial task, but it is something that I've considered.

I haven't looked at enemy spawns yet, and that'll probably be one of the later things I take on.

I don't think there's any triffid specific foliage, except for the root walls that appear in their lairs, but if someone wants to write them up, I could merge them. The fungal "furniture" items all have a FUNGAL tag, which was really convenient for placing those around, so a similar feature for triffid plants would be nice.

My thoughts for terrain damage was something like the fungus would just grow on top of the existing terrain/furniture, so if something happened to clear out the fungus, then everything would get reverted more or less back to normal. Maybe if there were something like a rotted wall I could have them revert to that instead, but the difficulties of changing back and forth between terrains is a nightmare. The triffids, however, their roots burst up through the terrain, destroying sidewalks and pavement (though it could stand to be toned back a bit, keep in mind those screenshots are from first concept implementation and they all need some polish), so that even when the triffid menace is cleared, some of the damage to the roads and whatnot remains.

@kevingranade
Copy link
Member

For toxic gas, it would be quite simple to make a gas variant that sticks
around indefinitely.

@KA101
Copy link
Contributor

KA101 commented Jun 14, 2014

For toxic gas, it would be quite simple to make a gas variant that sticks around indefinitely.

Or just have a vent spew out every 10 turns or so? Continuous is a bit much but intermittent might work OK.

@VampyreLord
Copy link
Contributor

Or just have a vent spew out every 10 turns or so? Continuous is a bit much but intermittent might work OK.

I don't think intermittent is plausible; the idea is for the gas to stick around without end, so you have purpose to actually wear any environmental protection masks (preferably a better one) or else suffer.

@Rivet-the-Zombie
Copy link
Member

What's the status of this?

@vache
Copy link
Contributor Author

vache commented Jul 6, 2014

Still in progress. Haven't gotten much else done on it, but I'll put more work into it over the next few days and see if I can't get something mergeable out of it.

@moist-zombie
Copy link

Can, or will, that "looted" status be applied to non-city residences/houses too?? There's just something about walking up to a blood-spattered scene :)

@Lain-
Copy link
Contributor

Lain- commented Aug 18, 2014

Any update on this? Hope that it isn't abandonned, it would be really cool to have this implemented to the game someday IMO.

@EricFedrowisch
Copy link
Contributor

I too hope this will make it into the implementation.

@Snaaty
Copy link
Contributor

Snaaty commented Aug 22, 2014

I too hope this will make it into the implementation

@Zireael07
Copy link
Contributor

Add me to the voices hoping for continued work on it.

@DragonLaggin
Copy link
Contributor

Of course, this needs to be in. I hope as well that this can be implemented.

@Coolthulhu
Copy link
Contributor

This PR will probably not become mergeable. Closing.

@Coolthulhu Coolthulhu closed this Apr 23, 2015
@Zireael07
Copy link
Contributor

The idea, however, was very well received, should anyone want to revisit it.

@Rivet-the-Zombie
Copy link
Member

Yes, particularly the damaged/looted overlays; it would be capital if somebody wants to resurrect them.

@vache
Copy link
Contributor Author

vache commented Apr 23, 2015

I am going to keep this branch alive. I don't think it will be too difficult to bring back in with the changes that have occurred since I first posted the PR, and I would really like to finish it, but as of right now I just don't really have the time I need to dedicate to any of my PRs.

@Rivet-the-Zombie
Copy link
Member

@vache, if you fix up the damaged/looted overlay for terrain and get it operational, I'd definitely fast-track it for merge testing. The other overlays are good too, but the damaged/looted one is such a great idea that I'd like to see it as a freestanding PR so we can get it into the game quickly.

ZhilkinSerg added a commit to ZhilkinSerg/Cataclysm-DDA that referenced this pull request Sep 11, 2017
@ZhilkinSerg ZhilkinSerg added (S5 - OnHold / Stalled) Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Jun 17, 2018
@ZhilkinSerg
Copy link
Contributor

Resurrected (although non-functional yet) branch is here - https://github.com/ZhilkinSerg/Cataclysm-DDA/compare/overmap-zones-basic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.