Explosions and TNT block and entity - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Explosions and TNT block and entity (/thread-858.html) |
RE: Explosions and TNT block and entity - NiLSPACE - 06-16-2013 This is maybe usefull for when the block resistance gets implented: http://www.minecraftwiki.net/wiki/Explosion#Model_of_block_destruction RE: Explosions and TNT block and entity - NiLSPACE - 02-15-2014 Look I got rays working: http://puu.sh/6WY5R.jpg Only in a plugin without cBlockArea though RE: Explosions and TNT block and entity - NiLSPACE - 03-09-2014 This is an explosion with the size set to 25: RE: Explosions and TNT block and entity - xoft - 03-09-2014 That's somewhat too irregular, isn't it? And on the other hand it's too regular in the cardinal directions (the cross in the middle). Could you perhaps post a picture of such an explosion in an all-stone environment? RE: Explosions and TNT block and entity - bearbin - 03-09-2014 I like the irregularity actually. If you look at vanilla, it's much worse. RE: Explosions and TNT block and entity - NiLSPACE - 03-09-2014 Here is an all-stone picture: http://puu.sh/7nFUd.jpg But still this is a plugin and it takes like 3 seconds before the server is done with one explosion this size. Here is the code if someone want's to take a look at it: http://puu.sh/7nGRC.lua RE: Explosions and TNT block and entity - xoft - 03-09-2014 Now I see why the pattern shows so much regularity in the cardinal directions, and also some other directions (you can see that in the stone picture much more clearly). I think you've misunderstood the concept of rays. The point is to cast a bunch of rays and then process whatever they hit. Instead, you create a ray for each block in the range. This skews the chances for the blocks that are on coords that are integer-multiples of other integers relative to the explosion center. Also, you've created an O(N^3) algorithm (where N is the size of the explosion). However, the rays should be only an O(N^2) algorithm - project them only at the walls of the cube, not the internals. You'll end up with a faster thing and a better looking result Side note for your code - it doesn't do any blockentity checking, so things like chests and furnaces will break without spilling their items. Whether this is expected behavior or not I leave upon you. RE: Explosions and TNT block and entity - NiLSPACE - 03-09-2014 I just wanted to see if it was possible to create a plugin that creates explosions that look a little more like the vanilla explosions. |