Page 1 of 1

Proposal: persistent node damage

PostPosted: Tue Jun 05, 2012 23:01
by VanessaE
I can't code this of course, but maybe the idea is worth looking into:

Whenever you start digging in an area, occasionally, you find yourself digging at a node briefly and then moving on to another node without breaking the last one (perhaps because you accidentally moved the mouse, or who knows why). Then, you find yourself turning back to that node you missed, only to have to dig it again from the beginning. This can be tiresome in practice.

It would be good for nodes to have semi-persistent damage, perhaps on a scale of 0-10, where 0 would be completely intact and 10 would be the most damaged state before the node is destroyed.

Further, it would also be a good idea for some damaged materials to gradually "heal" over time. In order from slowest to fastest I would say gravel, trees, leaves, all other plantlife, dirt, and sand/desert sand. Dirt or sand/desert sand would "heal" very rapidly if there's water next to it (but not so quickly that it interferes with digging in the first place, of course).

This should work for mods also, where the mod author could specify both wet and dry healing times. Time values might be in the range 1-30, which would represent N^2 seconds of real time (so a value of 1 is 1 second, 2 is 4 seconds, while 30 would be about 15 hours).

Times not specified for a given node should default to infinite, and should only apply one way or another to solid nodes (e.g. water and lava and similar should take no damage).

I could seen an argument where crack.png should be updated to show 10 or more frames instead of just 5, to go along with the aforementioned damage level, but the existing image would still look fine to most people. Maybe divide the height of crack.png by its width at load time, and treat the result as, basically, X number of frames to use. This would also allow for more flexible crack animations in the future as a side effect (which I understand is desirable anyway).

PostPosted: Wed Jun 06, 2012 01:25
by LolManKuba
I think Minecraft has 10 cracks, and people won't like that >.> <.< \o-o/ (glasses)

PostPosted: Thu Jun 07, 2012 02:58
by VanessaE
Well if it does, I guess that just means this would be similar, but nothing says it has to be exactly 10 levels or that similarities are bad to begin with (if they were, Minetest couldn't exist at all). It could also be expressed as a percentage of damage, with a number of crack.png frames that divides into 99 or 100 nicely (5, 10, 11, 20, 25, 33, 50).

Re: Proposal: persistent node damage

PostPosted: Fri Jul 04, 2014 20:38
by emugod
This sounds like a really great idea to me. Adding more data for each node to carry should always be carefully considered, but this seems like a small additional burden, that could open up a huge number of new possibilities.

Already I'm imagining explosions leaving behind highly damaged blocks around their periphery, or very tough blocks which take multiple blasts. There could be concussive impact tools beyond explosives (not really sure what, sledgehammers? and/or alternate fire mode of existing tools), with a charge-up and release rather than continual striking. There could be new mining strategy of strategically weakening tough blocks in advance of an explosion, or even maybe just weakening them and letting natural gravity/shear forces actually finish them off, and let loose some significant mass (if any modder actually felt enterprising enough to go for that).

Re: Proposal: persistent node damage

PostPosted: Fri Jul 04, 2014 21:16
by Casimir
A hack someone could do:
For every node, register as many nodes as there are crack frames. The first node looks normal, the second has the first crack frame and so on. On punch every node changes into the next one. The last turns to air and drops like normal.

Btw. Terasology has that feature.

Re: Proposal: persistent node damage

PostPosted: Sat Jul 05, 2014 16:00
by Calinou
Terasology has such a thing indeed.

I agree with this, but how do you let the anticheat know which blocks are partially dug and which ones aren't? What if a client reconnects after partially digging blocks?

The engine likely doesn't think in terms of animation frames: currently, you can use any amount of frames for the breaking animation, it's fully client-side.

Re: Proposal: persistent node damage

PostPosted: Sun Jul 06, 2014 00:05
by emugod
Calinou wrote:The engine likely doesn't think in terms of animation frames: currently, you can use any amount of frames for the breaking animation, it's fully client-side.

This makes me realize, I have no idea how node breaking even actually works, in minetest. I know it's probably not anything as straightforward as a 'health' or even a 'tool level' variable, and rather probably a blocktype dependent mess. Maybe it should be, simplified, though?

Re: Proposal: persistent node damage

PostPosted: Sun Dec 07, 2014 16:19
by MirceaKitsune
+1. It should be a setting and disabled by default in my opinion, but it would be a great feature and I support it!

Re: Proposal: persistent node damage

PostPosted: Tue Dec 16, 2014 19:01
by TG-MyinaWD
Yeah Block World has a Feature you can mine a block and it takes damage. and if stops it will stay like that awhile before heal to normal state.

But if can make is set on or off via default init.lua nodes have a HP Factor you get an Yes to my vote hands down. Since be so useful in Some my Subgames.

But where is the cracking animation found? Like the codd for it? All can find is an Animation texture.