Jump to content

Underground Debate #589


konrax

Recommended Posts

@Devs

 

I had an idea today you might find useful in regards to underground bases and address it in the future.

 

I understand the idea of the underground base is really appealing to players because of the safety it can provide, and that the core issue is how can you allow people to utilize this option but with a fair trade off. Not only that, but how can you make the trade off fit the core values of the game and the genre it wants to emulate?

 

My suggestion will allow for this option still, but make it much more difficult to do in the early game, and limit the amount of time players can spend underground in a fun and fluffy sort of way.

 

Make being underground limit the amount of oxygen available, and after reaching a certain depth there would be no oxygen. You can use mechanics similar to what water blocks use, but make them a hidden block that only occupies open spaces below the starting surface area. If you dig a large open pit you should be fine, with air being able to flow into it, however even then at a certain depth the air wouldn't penetrate.

 

So how do you dig underground bases? Air pumps.

 

You will need power, and air pumps pushing air underground for you to survive while you are down there. Animals will need to be included in this, and should be fairly easy to do an air quality check if they are underground to see if they are in danger, zombies however would be immune (as expected). Plants should be able to produce a small amount of oxygen, and underground growing an option using lights (but at a slower speed, maybe even cap their development to a tier or two lower than outside growth).

 

Add a pollution mechanic from generators that use gas, this way you won't want to be running them in an area the air isn't being pumped.

 

If you combine this with a water collection / hydration overhaul, and lingering hordes that hang out near the entrances of underground bases (both of these I already discussed earlier in this thread), I honestly think you can make it a viable and immersive option that will provide for some fun game play mechanics that fit the concept of this game better than having zombies that can dig.

 

I would love for some feedback and input from everyone, devs feel free to ignore me if you so choose (it is your game after all) and I will gladly not feel offended =)

Link to comment
Share on other sites

@Devs

 

I had an idea today you might find useful in regards to underground bases and address it in the future.

 

I understand the idea of the underground base is really appealing to players because of the safety it can provide, and that the core issue is how can you allow people to utilize this option but with a fair trade off. Not only that, but how can you make the trade off fit the core values of the game and the genre it wants to emulate?

 

My suggestion will allow for this option still, but make it much more difficult to do in the early game, and limit the amount of time players can spend underground in a fun and fluffy sort of way.

 

Make being underground limit the amount of oxygen available, and after reaching a certain depth there would be no oxygen. You can use mechanics similar to what water blocks use, but make them a hidden block that only occupies open spaces below the starting surface area. If you dig a large open pit you should be fine, with air being able to flow into it, however even then at a certain depth the air wouldn't penetrate.

 

So how do you dig underground bases? Air pumps.

 

You will need power, and air pumps pushing air underground for you to survive while you are down there. Animals will need to be included in this, and should be fairly easy to do an air quality check if they are underground to see if they are in danger, zombies however would be immune (as expected). Plants should be able to produce a small amount of oxygen, and underground growing an option using lights (but at a slower speed, maybe even cap their development to a tier or two lower than outside growth).

 

Add a pollution mechanic from generators that use gas, this way you won't want to be running them in an area the air isn't being pumped.

 

If you combine this with a water collection / hydration overhaul, and lingering hordes that hang out near the entrances of underground bases (both of these I already discussed earlier in this thread), I honestly think you can make it a viable and immersive option that will provide for some fun game play mechanics that fit the concept of this game better than having zombies that can dig.

 

I would love for some feedback and input from everyone, devs feel free to ignore me if you so choose (it is your game after all) and I will gladly not feel offended =)

 

Seems like a lot to do for the devs. I don't think players digging underground bases is an issue, but an easier deterrent would be adding harder layers of rock the deeper you go. Forcing players to make better tools to dig straight down. Or even better adding big caves and lava like minecraft, but that would be a lot of work also.

Link to comment
Share on other sites

That sounds interesting, but not simple. That would take a lot more work than it took to make zombies dig. At least 10 times the work by several people.

 

Not simple? Really? I thought it would be easy enough if you:

 

a) Adjust RWG slightly to give underground blocks a 'underground' field and use to determine depth, or determine depth under top block (which should give you a reasonable approximation of how deep you are underground, perhaps excluding skyscrapers, cranes and a few towers).

b) As you dig into a 'underground' block, have the block register that you've dug it out (and therefore air can flow through) via another field.

c) Choose to build a fan or not. Fan will not work to provide oxygen unless connected to a 'dug' block. (Yes, a player can still block the path afterwards, but not so likely, I don't think. Can use game pathing to determine if the fan can suck open air if you want)

d) If that depth is greater than, say, 20m (reasonable for the game, I think), then use the pathing AI to determine your surroundings to determine if you are in a limited area of space.

e) If d = true (as in it determines you are in limited space), and range from fan > 20m, start increasing temperature and decrease stamina. After stamina starts draining, oxygen starts deplenishing.

f) if d = false (your space is not so limited), however you are still underground by a fair amount, determine range from fan and again, increase temp, reduce stamina and eventually oxygen.

 

If wearing an oxygen tank, ignore this function/subroutine.

 

At least from a database programmers perspective, this type of code might only take 45 minutes - 1 hour. Okay, maybe an extra hour to go through the pathing code to ensure it returns the right parameters.

 

However I'm sure there's a lot of extra things I don't understand or appreciate from a game programming perspective.

 

So just showing my ignorance more than anything. :-)

Link to comment
Share on other sites

At least from a database programmers perspective, this type of code might only take 45 minutes - 1 hour. Okay, maybe an extra hour to go through the pathing code to ensure it returns the right parameters.

With chunks constantly being loaded and unloaded your cool vent suddenly has no more connection to the surface. Do you keep all those chunks loaded indefinitely? Do you flag the outlet to permanently produce fresh air? What if someone approaches from the other side and destroys the intake while the outlet is in an unloaded chunk?

If that is loaded up again it still produces fresh air indefinitely and will happily expand downwards forever after.

 

You either have to path from an outlet to every air block (exponential growth, big red flag) or do a simplified system of raycasts (still not trivial) or terrain-ignoring range.

You also have to check for the intakes to not be physically becoming blocked and if you want multiple intakes connected then it gets really interesting.

 

45 min to an hour? I'm doubtful. Even the first design meeting would be multiple times that given the number of systems that affects.

 

And that's only what I see at a glance. I'm sure it sounds like a great idea and easy to do if you look at a very small and specific use case.

Link to comment
Share on other sites

With chunks constantly being loaded and unloaded your cool vent suddenly has no more connection to the surface. Do you keep all those chunks loaded indefinitely? Do you flag the outlet to permanently produce fresh air? What if someone approaches from the other side and destroys the intake while the outlet is in an unloaded chunk?

If that is loaded up again it still produces fresh air indefinitely and will happily expand downwards forever after.

 

You either have to path from an outlet to every air block (exponential growth, big red flag) or do a simplified system of raycasts (still not trivial) or terrain-ignoring range.

You also have to check for the intakes to not be physically becoming blocked and if you want multiple intakes connected then it gets really interesting.

 

45 min to an hour? I'm doubtful. Even the first design meeting would be multiple times that given the number of systems that affects.

 

And that's only what I see at a glance. I'm sure it sounds like a great idea and easy to do if you look at a very small and specific use case.

 

A non-game programmer perspective: Maybe when establishing a path to the surface for a vent, placing the intake block checks the path, and modifies all the air blocks in between to an "air path" block, so it doesn't have to be recalculated on the fly all the time. If any of the blocks in the chain are changed or destroyed (in/out vent, connecting air blocks), recalculates the path and changes back to non air path blocks killing the air supply.

 

This may be an oversimplification, but logically sounds plausible. :p An hour or two though? Ha no, I sometimes spend a couple days on something that might have taken a morning if it was a closed system, instead of a network of interconnecting systems.

Link to comment
Share on other sites

With chunks constantly being loaded and unloaded your cool vent suddenly has no more connection to the surface. Do you keep all those chunks loaded indefinitely? Do you flag the outlet to permanently produce fresh air? What if someone approaches from the other side and destroys the intake while the outlet is in an unloaded chunk?

If that is loaded up again it still produces fresh air indefinitely and will happily expand downwards forever after.

 

You either have to path from an outlet to every air block (exponential growth, big red flag) or do a simplified system of raycasts (still not trivial) or terrain-ignoring range.

You also have to check for the intakes to not be physically becoming blocked and if you want multiple intakes connected then it gets really interesting.

 

45 min to an hour? I'm doubtful. Even the first design meeting would be multiple times that given the number of systems that affects.

 

And that's only what I see at a glance. I'm sure it sounds like a great idea and easy to do if you look at a very small and specific use case.

 

Hi Gazz. Thanks for the thoughts, however I did put in the caveat: "(Yes, a player can still block the path afterwards, but not so likely, I don't think. Can use game pathing to determine if the fan can suck open air if you want)". Of course the game can only do what it can do to a 'reasonable' standard, however there are easy ways of cheating to make it 'good enough', but not without faults. It does require the immediate surrounding blocks to have another bit of extra information for that example, so I don't see it as being too complex if done 'good enough'.

 

But again, I say this with a full understanding and appreciation that TFP's have gone well and beyond what they have promised and everything else is a gift from them to us. I also repeat I'm looking at it through eyes that are very naive to what they do as my programming abilities are far easier than theirs.

 

And I was a freelance programmers. So I was in charge and usually a 1 on 1 5 minute chat to the client and I knew roughly what I needed to do. And because I knew all of my own code, I could easily find it and interpret it and modify it as needed. So 45 minutes at most for those 'if' statements, parameter and function calls.

 

Depending on how complex the pathing code is (probably very), but I think an hour to change a few of the pathing instructions around to determine if you're surrounded by a narrow path or a larger cavern is quite reasonable. Probably could write a dedicated function to do that in an hour, irrespective of other code.

Link to comment
Share on other sites

A non-game programmer perspective: Maybe when establishing a path to the surface for a vent, placing the intake block checks the path, and modifies all the air blocks in between to an "air path" block, so it doesn't have to be recalculated on the fly all the time. If any of the blocks in the chain are changed or destroyed (in/out vent, connecting air blocks), recalculates the path and changes back to non air path blocks killing the air supply.

 

This may be an oversimplification, but logically sounds plausible. :p An hour or two though? Ha no, I sometimes spend a couple days on something that might have taken a morning if it was a closed system, instead of a network of interconnecting systems.

 

I was going to suggest something like that, however it is more involved and more CPU intensive and I was trying not to create any more overhead with my suggestion.

 

 

Although on the talk of loading chunks, I've only ever heard of them being a # x # x # (as in a square grid) of voxels. I've always thought that's quite limiting if an edge voxel needs to reference the behaviour of the voxel next to it that is in a different (unloaded) chunk. This wouldn't happen much throughout the world, so therefore I would have imagined a ways of having various 'inclusions' throughout the chunk loading process to include the various parts of neighbouring voxels. Yes, if one standard chunk is 1000 voxels, this method might add another 50 or so, however for gameplay improvement purposes, I think it makes total sense to add only another 5% to the overhead of a chunk.

 

Any thoughts or ways you could educate me in this way of thinking?

 

- - - Updated - - -

 

Oh. My. Lord. YES. That is going to scare so many people, especially my friends, hehehe. I am looking forward to the screams, lol.

 

Ever played that cult game 'Five nights at Freddies'?

 

If not, look it up on YouTube to see how much lights mean to a game.

 

BTW, if you do this, I'm not responsible for your heart attack while watching.

Link to comment
Share on other sites

Depending on how complex the pathing code is (probably very), but I think an hour to change a few of the pathing instructions around to determine if you're surrounded by a narrow path or a larger cavern is quite reasonable. Probably could write a dedicated function to do that in an hour, irrespective of other code.

 

It's not the complexity of the pathing code that's the issue, it's a variant of A-star if you want to look it up. It's the time taken to calculate the path, it's very intensive on system resources. The longer the distance between the two points the more calculations it takes and this rises exponentially with the distance.

 

Personally I've yet to come up with a fast enough system that doesn't have gaping logical holes like counting the interior of a large building as underground.

 

Perhaps modifying the water block into a heavier-than-air gas block and have them spawned at intervals by rock above you? With terraria water physics they would eventually make their way into the lowest point of the mine where they'll gather two or more blocks deep and eventually become a danger? Have a ventilation-fan block that destroys them within a certain range? Having them burned-off by light would make ventilation shafts useful although with the caveat that they must be straight.

Link to comment
Share on other sites

With chunks constantly being loaded and unloaded your cool vent suddenly has no more connection to the surface. Do you keep all those chunks loaded indefinitely? Do you flag the outlet to permanently produce fresh air? What if someone approaches from the other side and destroys the intake while the outlet is in an unloaded chunk?

If that is loaded up again it still produces fresh air indefinitely and will happily expand downwards forever after.

 

You either have to path from an outlet to every air block (exponential growth, big red flag) or do a simplified system of raycasts (still not trivial) or terrain-ignoring range.

You also have to check for the intakes to not be physically becoming blocked and if you want multiple intakes connected then it gets really interesting.

 

45 min to an hour? I'm doubtful. Even the first design meeting would be multiple times that given the number of systems that affects.

 

And that's only what I see at a glance. I'm sure it sounds like a great idea and easy to do if you look at a very small and specific use case.

 

This is pretty awesome you guys would entertain this idea and I think that really shows a testament to you guys and your team.

 

I'm not sure how applicable this is, but how did you solve this type of issue with electricity and the generator? I would consider trying to use that system and build off that.

 

You could limit the dept and effectiveness of air pumps, maybe have 3 different versions available, like a 40, 80, 120 block range type pumps. Make an on/off switch available at the end where the air comes out, I loved the idea of having a breathing tank as well you can carry around to tap into if things start to get low. I think if you could make living & working underground more of a challenge it will make the rewards worth it.

 

Anyways keep up the great work all of you, a17 looks spectacular, cheers!

Link to comment
Share on other sites

It's not the complexity of the pathing code that's the issue, it's a variant of A-star if you want to look it up. It's the time taken to calculate the path, it's very intensive on system resources. The longer the distance between the two points the more calculations it takes and this rises exponentially with the distance.

 

Personally I've yet to come up with a fast enough system that doesn't have gaping logical holes like counting the interior of a large building as underground.

 

Perhaps modifying the water block into a heavier-than-air gas block and have them spawned at intervals by rock above you? With terraria water physics they would eventually make their way into the lowest point of the mine where they'll gather two or more blocks deep and eventually become a danger? Have a ventilation-fan block that destroys them within a certain range? Having them burned-off by light would make ventilation shafts useful although with the caveat that they must be straight.

 

Yes, I'm familiar with A*. Pretty much my only 'AI' knowledge (although I know it's not really AI). And I understand how much more demanding it is....on a ground where there are many available grid placements NPC's can go. But if you're in a tunnel, there's really very little CPU usage to calculate the pathing. And that's what I'm proposing: you can use the pathing code to recognise this. Once it's recognised you're in a cramped, underground tunnel, it should be easy and somewhat worthwhile (for gameplay benefits) for a lowering of buffs.

Link to comment
Share on other sites

Yes, I'm familiar with A*. Pretty much my only 'AI' knowledge (although I know it's not really AI). And I understand how much more demanding it is....on a ground where there are many available grid placements NPC's can go. But if you're in a tunnel, there's really very little CPU usage to calculate the pathing. And that's what I'm proposing: you can use the pathing code to recognise this. Once it's recognised you're in a cramped, underground tunnel, it should be easy and somewhat worthwhile (for gameplay benefits) for a lowering of buffs.

 

As far as I know the current pathing system hasn't been upgraded to three dimensions yet. That's why, the last I heard, pathing for spider zombies is still... not as good as it could be. That's going to take more than 45 minutes to code.

 

You'll still be using pretty much the same amount of memory and doing the same amount of calculations as you would if you were above ground. Logic it out... in A-star more obstructions mean a harder time to find a path, an underground tunnel has far more obstructions than above ground unless your tunnels are aligned with the cardinal directions.

Link to comment
Share on other sites

It's not the complexity of the pathing code that's the issue, it's a variant of A-star if you want to look it up. It's the time taken to calculate the path, it's very intensive on system resources. The longer the distance between the two points the more calculations it takes and this rises exponentially with the distance.

 

Personally I've yet to come up with a fast enough system that doesn't have gaping logical holes like counting the interior of a large building as underground.

 

Perhaps modifying the water block into a heavier-than-air gas block and have them spawned at intervals by rock above you? With terraria water physics they would eventually make their way into the lowest point of the mine where they'll gather two or more blocks deep and eventually become a danger? Have a ventilation-fan block that destroys them within a certain range? Having them burned-off by light would make ventilation shafts useful although with the caveat that they must be straight.

 

I think you need to specifically use a really simplified AI that would fit the idea of the concept. My suggestion would be that the air block spawns at the end of the air pump (as thin air) and it rising upward immediately, if it encounters another thin air block it merges into an air block, if it impacts a full air block it will move to the next nearest open block on the same horizontal plane as the block it impacted and then check to see if it can move up (or the original block moves to a new location as the new one bumps it). To limit resource usage on this you could also make this a periodic check for all air blocks, or have them stagger from an air source to be more efficient.

 

It would greatly simplify the process I believe if you could blanket flag everything underground at the time the world is generated for the baseline air density up to certain depths, and have the air blocks only exist underneath that layer.

 

The option on using constricted air could also be used for POI's but I don't see a way a player would be able to craft an environment above the surface that would cause that.

Link to comment
Share on other sites

As far as I know the current pathing system hasn't been upgraded to three dimensions yet. That's why, the last I heard, pathing for spider zombies is still... not as good as it could be. That's going to take more than 45 minutes to code.

 

You'll still be using pretty much the same amount of memory and doing the same amount of calculations as you would if you were above ground. Logic it out... in A-star more obstructions mean a harder time to find a path, an underground tunnel has far more obstructions than above ground unless your tunnels are aligned with the cardinal directions.

 

Ah, but that's pathing TO the player, whereas this calculation would be pathing from the player and extending outwards. However, the 3d pathing is an issue. So it would need to be a separate pathing system, more 'tuned' to recognize a) how surrounded you are and b) is there a way to the nearest 'dug' block.

Link to comment
Share on other sites

Okay, even easier:

 

A player is at bedrock, in an enclosed space. He needs a vent to give him/her oxygen. Game checks to ensure there's a path within a 30m (roughly) radius to a vent (direct radius is satisfactory, even if there are columns and paths blocking it. It's a good enough and a workable approximation). The game mechanics then checks that vent. Using the same code to check the radius, it asks if that vent is within a range of another vent or the open air?

 

A simple recursive calculation that is an approximation to realism, and would work well most of the time. It would definitely encourage players not to mess around and just build the things, even if the mechanics weren't perfect.

Link to comment
Share on other sites

My take on the underground gas/vent stuff.

 

Make a block that has the same texture as the stone, inserted into the layers underground. You strike the block while mining it activates an AoE buff that depletes your characters O2.

Replace the vent system and in turn have an "air scrubber unit" that needs power (this will also have an AoE to debuff the O2 depletion buff).

The "air scrubber unit" has components, that will deplete over 'X' amount of time that you need to replace (more scrubber units = more time in between that you need to replace).

 

Or if a vent system is a must: piggy back with the electrical mechanic and have a tool similar to wire tool,"Vent pipe tool". Has the same properties as the wire.

Connect underground duct fanA to the above ground duct fanB. Fan A or Fan B needs to be connected to a generator. The "pipe" from the Vent Pipe Tool also acts as a wire to power the whole thing.

 

Laying the pipe: >.> you need to collect plastic and wire.

 

Fan A uses an AoE buff to debuff (whatever) gas.

 

*I'm just looking at it from a possible mod perspective though.

 

Edit: With the vent pipe tool being like the electrical mechanic wire laying abilities, the system only needs to check that everything is connected periodically between all points much like having relays, generator and turrets do.

Link to comment
Share on other sites

Why is everyone trying to spoil bunkers?

 

Noone is trying to spoil bunkers. People are just giving suggestions to expand on an existing idea and to include an element of survival into a survival game.

 

You can always make shallow bunkers, but deep bunkers should be an endgame sort of thing, so I'm definitely for the mentioned ideas of oxygen depletion the deeper you dig, and there have been some excellent ones on the last few pages.

Link to comment
Share on other sites

Since we are trying to nerf bunker dwellers can we also add sunburn and skin cancer to those who stay above ground? What about lightning killing people above ground, or fire ants, etc.. Of course I am being facetious, but I think if people want to live at bedrock, so be it. If you don't like it don't do it.

 

This.

Link to comment
Share on other sites

Hey TFP I have solved underground bases.

 

My solution is both brutally punishing and requires a minimum amount of work yet will solve your problem of big underground bases.

 

I'll be happy to share with you. ;)

 

Trapped monster roaches/ scorpions / ants in rocks. It can be a very low % that increases as you get to bedrock.

 

Give them a very small chance of spawining when breaking a piece of stone. As you go deeper the chance gets higher without being crazy.

 

This would make players think twice about underground bases being super easy and safe. Yet still reward the player after their hard work.

 

But wouldn't be terrible to try to code.

 

 

Thoughts any of TFP???

 

RIP mining.

Link to comment
Share on other sites

Since we are trying to nerf bunker dwellers can we also add sunburn and skin cancer to those who stay above ground? What about lightning killing people above ground, or fire ants, etc.. Of course I am being facetious, but I think if people want to live at bedrock, so be it. If you don't like it don't do it.

 

There is no limit to staying underground planned. Just threats to it.

 

Calling for the absence of threats to underground dwelling is aking to call for the removal of zeds from cities with the arguments "if you want to loot, so be it. If you don't like it, don't do it and go to the wastelends to loot".

 

I really do not understand why an underground threat is so much of a problem for some of you. Noone ever called for a removal of digging. All most of the players ask for is some kind of underground challenge. Full stop.

 

I for my part want some sort of challenge in my game, not some 100% secure "bedrock biome". I also dwelled underground mostly in A16 and what it definitely lacked was any kind of challenge. It was more a digging simulator than a zombie game. I understand you have different preferences, but so do I.

 

If you want a safe environment, there is always the option to switch of zeds, which should make underground living safe again as well.

Link to comment
Share on other sites

Well isn't that what the mods are for? Make the underground as deadly as you want. I'm all in support of you wanting to change it, but with mods you can change it how you please. Let the default be how it always has been and use mods to change it. They use mods to change everything else. Also by saying you could care less, means you care some. I couldn't care less would be more applicable, lol.

 

No, that isn't what mods are for. Mods are to take existing features/framework and change it. There is currently NO underground threat. I want one in vanilla.

 

Also, I know how to use "I couldn't care less" I know the actual phrase but I decided long ago I like it the way I say it. I mean it this way, "I COULD care less, but it's not really worth my time to worry about it." Irregardless of my grammar, having a 100% completely safe place in a survival game defeats the whole purpose of a survival game. And whoever was calling them underground bunkers earlier, they aren't bunkers. Bunker: a reinforced underground shelter, typically for use in wartime. These aren't "reinforced" as there is no need. There is currently no danger to reinforce them against.

Link to comment
Share on other sites

Many people have asked for and are receiving underground threats, so that underground is no longer a safe and boring zone. Some people build underground bunkers which are completely safe, thus exploiting current game mechanics.

 

However, the largest base-building exploit remains untouched and safe. I am referring to secondary bases for "heat" related activities, which exist solely to cheese screamer hordes. Secondary "heat" bases keep my main base completely safe from screamer hordes and removes their threat.

 

I feel like this should be addressed. I think any craftable item that raises the heat map should raise it to max instantly if there is no sleeping bag spawn protection. The screamer hordes called by those items should be gps'd onto the offending forge/campfire/etc.

 

Give an incentive to keep your crafting stations in your main base and defend them as needed or else be conservative with their use.

 

I have read over and over about eliminating "safe spaces". If we are gonna do that, let's do it thoroughly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...