Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Cave-in calculation with warnings for players  (Read 920 times)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Cave-in calculation with warnings for players
« on: February 07, 2011, 01:11:39 pm »

Foreword: I did search the forums and do research on previous cave-in calculation suggestions or ideas. My idea is somewhat different. Please just comment on my idea and don't derail the thread into a different suggestion.

Suggestion: -The current (31.18) method where disconnected sections immediately collapse stays.

-Once per season, perhaps at the beginning/ends of seasons where many players are used to a long pause/lag due to the game autosaving, the game runs a more detailed cave-in calculation.

-I am deliberately vague about the "more detailed cave-in calculation", as many people have previously imagined systems based on material strengths or overhang/unsupported distances. Something is used here. It doesn't cause natural landscapes or caverns to collapse.

-The detailed calculation doesn't grief the player by instantly caving in sections. It does mark the "weak" map tiles with an "unstable" flag. If the tile is found to be weak at the next detailed calculation, and it was already marked as "unstable" last season, it collapses. If the tile is no longer "weak", the "unstable" flag is cleared.

-When a group of tiles is marked as unstable, an announcement "A section of the cavern has become weak" is displayed, the game auto-pauses and zooms to the site, and the "unstable" flagged tiles flash red a few times and then stop flashing. Perhaps the warning is better phrased, to suggest that collapse will occur eventually.

-Similar to how trade depot wagon paths can be seen by pressing "D", pressing another key allows all unstable tiles to be viewed in flashing colors.

-New constructions or buildings will start stable. If you disassembled and reassembled an unstable overhang, it would be found unstable again next season instead of collapsing.

Examples:
-A new player is building a long bridge between two mountain peaks. They get the announcement that the center of their bridge is unstable. If they install a support pillar in the center, it will be safe next season. The game's help file or the wiki could suggest a "building code" that avoids collapses.

-An experienced player is building a giant dwarf megaproject. Since it will take years to complete, they need to turn off the "detailed cave-ins" in the init file, or use realistic scaffolding. The final giant statue could still be unstable, but that depends on the details of the calculation.

-The goofy "floating river" worldgen errors would collapse after two seasons unless you hurried to support them.

-A careless miner causes a block to be disconnected from the ground, and it instantly collapses like it does in 31.18 and before.

Ending word: Violations of common sense are swiftly or eventually punished, whereas simpler mistakes can be fixed quickly by carpenters or masons. The game only suffers a calculation lag once per season.

Dutchling

  • Bay Watcher
  • Ridin' with Biden
    • View Profile
Re: Cave-in calculation with warnings for players
« Reply #1 on: February 07, 2011, 01:36:13 pm »

Why is it only calculated at the beginning of a season? for FPS issues? If that is not the problem, why wouldn't it just ''check'' itself after it is built and add the weak flag and a countdown that will end in a season, otherwise you could just build something a day after a season change and it will be able to stand for nearly 2 seasons but something built the day before a season change will only be able to stand a season and a day. Seems kinda weird to me.

But the main idea is good and probably gonna be implemented sometime in someway regardless.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Cave-in calculation with warnings for players
« Reply #2 on: February 07, 2011, 01:49:09 pm »

I find it hard to comment very much on this subject, since I am also apparently not supposed to "derail it into another suggestion" when there is very little to actually see or concrete to talk about in this suggestion, other than "make it seasonal".  This suggestion is extremely vague, coming down to "Cave-ins will do some kind of calculation based on some kind of numbers and under some kinds of conditions offer a warning between sometimes making the actual cave-ins happen."

On top of that, Dutchling asks the only obvious question that can be asked based on what information there is, being, "Why seasonal?"
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

aepurniet

  • Bay Watcher
    • View Profile
Re: Cave-in calculation with warnings for players
« Reply #3 on: February 07, 2011, 02:02:47 pm »

i like this gameplay mechanic. it will sorta approximate a new element of the game without causing the problems of constant calculation (that would probably drop the frame rate by 2/3, maybe 1/3 if the calculation is simplistic).  lets just do it the out of band.  we get all the joys of collapses without the problem of constant calculation.

however, im more interested in what the calculation will be.

otherwise you could just build something a day after a season change and it will be able to stand for nearly 2 seasons but something built the day before a season change will only be able to stand a season and a day. Seems kinda weird to me.

anytime you use an approximation for something there will be cases where the simulation doesnt seem to make sense.  just look at water or magma now, there are tons of weird cases.
Logged

rarborman

  • Bay Watcher
  • Penguin Dungonmaster
    • View Profile
    • dice
Re: Cave-in calculation with warnings for players
« Reply #4 on: February 07, 2011, 02:29:07 pm »

As dutchling stated "check itself after it is built", would probably be more smooth, and calculating all the connected unstable tiles weight, yeild, fracture, elasticity again when something is added to it (IE; a new construction being built, or the goblin that just fell on it) or is walking on it (IE; a dwarf walking out on a thin stone floor bridge or water pour over it (not even sure water is programmed to interact like that)) 

rather then every season, which would bunch up the lag into season changes... although it will cause moving stuff to cause lag (but only when over unstable labled stuff, so pathfinding change?)
Logged
"But to that second circle of sad hell, Where ‘mid the gust, the whirlwind, and the flaw Of rain and hail-stones, lovers need not tell Their sorrows. Pale were the sweet lips I saw, Pale were the lips I kiss’d, and fair the form I floated with, about that melancholy storm."

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Cave-in calculation with warnings for players
« Reply #5 on: February 07, 2011, 08:33:40 pm »

i like this gameplay mechanic. it will sorta approximate a new element of the game without causing the problems of constant calculation (that would probably drop the frame rate by 2/3, maybe 1/3 if the calculation is simplistic).  lets just do it the out of band.  we get all the joys of collapses without the problem of constant calculation.

however, im more interested in what the calculation will be.

otherwise you could just build something a day after a season change and it will be able to stand for nearly 2 seasons but something built the day before a season change will only be able to stand a season and a day. Seems kinda weird to me.

anytime you use an approximation for something there will be cases where the simulation doesnt seem to make sense.  just look at water or magma now, there are tons of weird cases.

Right. FPS already takes a huge hit when you do things like pump magma, due to temperature calculations.

Many of the systems I have seen proposed before were "constant calculation". In those systems, you would be hit with lag every time a construction was finished, or every time a block of stone was mined. The game already does this to check if you have a wall somewhere that isn't connected to ground. Also in a "constant calculation" system, you would have to build long bridges from both sides, because it would collapse if you tried to cantilever it.

Instead of strictly seasonal, the timer for the more thorough calculation could go off at a random time, with the randomness adjusted by how much mining or construction was happening, and the time since the last check. This would be similar in implementation to the strange mood timer.

Perhaps the random check could be glossed over as an earth tremor, earthquake, or in cold climates "ice wedging".

...or the goblin that just fell on it) or is walking on it (IE; a dwarf walking out on a thin stone floor bridge ...
I guess that you need a "constant calculation" model if you want to take creature weights into account.
A human weighs about 70kg, and a forgotten beast weighs 10 tons. A 3m x 3m x 3m block of granite weighs 73 tons. A granite bridge still weighs a few tons, depending on how thick it is. I'm sure that human/dwarf/goblin weights are negligible compared to the structure itself. Except in the case of elephants, bronze colossi, or cthulhu.

On this page, back from 2007, Toady states that the cave-in system needs to let the player know what is going on, because it would spoil the fun if it just kept happening without explanation.
http://www.bay12forums.com/smf/index.php?topic=1788.msg26329#msg26329