Explosions and TNT block and entity
#21
This is maybe usefull for when the block resistance gets implented: http://www.minecraftwiki.net/wiki/Explos...estruction
Reply
Thanks given by:
#22
Look I got rays working: http://puu.sh/6WY5R.jpg

Only in a plugin without cBlockArea though Sad
Reply
Thanks given by:
#23
This is an explosion with the size set to 25: [Image: 7nE2E.jpg]
Reply
Thanks given by:
#24
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?
Reply
Thanks given by:
#25
I like the irregularity actually. If you look at vanilla, it's much worse.
Reply
Thanks given by:
#26
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
Reply
Thanks given by:
#27
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 Smile

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.
Reply
Thanks given by:
#28
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. Wink
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)