Block integrity, a.k.a. cartoon characters standing on air

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Currently we've got floating islands of generated fluff that just sort of hangs out like cartoon characters standing on air that haven't looked down yet - so they don't fall. Well, we're making those blocks look down and react accordingly!

First pass is simply assigning "integrity" to blocks in newly generated chunks starting from the bottom up. The very bottom layer is set to 255 and propagates up, excepting where air gets in the way - any block without support from a block below gets no integrity and is erased! Leading to funny worlds with ceiling-less caves, weird looking trees, and no overhangs for mountains:



Next step after that is letting integrity propagate horizontally and even down, to where it hasn't been applied yet, later possibly also degrading integrity on blocks below due to the mass of blocks above. Different block types wouldn't propagate integrity the same way, so sand can't support sand horizontally. One thing at a time though.

Non-air blocks that end up without sufficient integrity will be immediately erased on chuck gen, so we drop the floating stuff (which could return with special rare buoyant materials in floating island biomes that provide support without being attached to the bottom of the world...)

The integrity values could be stored in a TeraArray and infrequently accessed. Some magic would be needed by chunk edges tho.

Next scenario after that is then recalculating integrity values on block removal (player, explosives, whatever) - normally only needed on the active chunk the player is on. If integrity of surrounding blocks impacted by the removal (which could be a whole mountainside) drop too much they don't just wink out of existence this time....

(you can now theorize why I asked Begla for more modular physics - same thing could be used to chop down trees, break walls weakened by catapulted stones, etc - as long as the blocks-gone-cartoon-characters only gradually realize they're about to fall, so we don't kill the game by over-physics)

Current theorycrafting code goes in Chunk.java but will need lots of tweaks etc: http://pastebin.com/uG4iQa37

Might also be related to me wanting to work on explosive blocks that may or may not be hooked up in series as meta-blocks triggered by a new detonator tool...

Edit: Updated some along with introducing the overall Block Dynamics concept.

Item in issue tracking system has more technical detail (or will soon as I get it in there soon): https://github.com/MovingBlocks/Terasology/issues/137
 

Attachments

Exile

New Member
Contributor
Art
Re: Block integrity, a.k.a. cartoon characters standing on a

Nice concept :) Hope to see more crazy ideas
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Re: Block integrity, a.k.a. cartoon characters standing on a

Bump for great justice!

My design thinking since last has helped clear the picture for me better, although I might still need to put more details somewhere to communicate it intelligently. In short various phases so far:

1) Apply max support to the bottom layer of a chunk
2) Sweep every layer (above bottom) one block at a time, adopt the value from below minus x
3) Sweep every layer (above bottom, can combine with #2 just one layer lower) and re-add x/4 per side of the block below that is solid (or less than x/4 if it is sand or something)
4) More similar stuff for overhangs later...

I realize this might look like overkill, hoping to optimize and capitalize on the fact that the chunk-gen complexity is only needed once... :)
 
Re: Block integrity, a.k.a. cartoon characters standing on a

Ýou delete the floating islands? :( Why? Can't you make airships in some villages to fly up to those instead of deleting them from the game? Then you can use an airship to fly up to those floating islands, and that would be awesome (I think) ;) .
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Re: Block integrity, a.k.a. cartoon characters standing on a

This is meant to delete the unrealistic floating islands, that is, scattered blocks that are sometimes left over after initial terrain gen. Likewise also for detecting when there's insufficient support remaining to hold something up :)

Floating islands as a serious concept / biome is totally doable if you then come up with a pseudo-realistic way to impart support on the bottom of a floating landmass. That's noted around here somewhere, but I forget where :laugh:
 
Top