Explosions and TNT block and entity
#1
Hi All,

Rev 1392 is the first try to implement explosions,TNT block and the TNT entity on MCServer. A ton of work is still needed to finish implementing explosions and TNT. What needs to be done is the following:

-Implement physics for the TNT entity (this is going to be taken care of when I implement physics for all entities)
-Optimize the algorithm for block destruction (Probably use cBlockArea to speed this up)
-Add damage to players and mobs
-Have logic to generate pickups when some of the blocks are destroyed
-Implement some sort of block hardiness
-Make sure that the explosion animation is the correct one (I noticed that the explosion animation from the Explosion Packet looks different when the mcservers sends it. The vanilla gives out more smoke and particles)

Please feel free to add anything else that it is missingBig Grin
Reply
Thanks given by:
#2
also explosions should activate other TNT blocks.
Reply
Thanks given by:
#3
Are you on Linux or on Windows? You seem to have forgotten to commit the MSVC project file changes. But you really need to have MSVC 2008 in order to do that. If it's just the TNTEntity file addition, I can do that.
Reply
Thanks given by:
#4
Oops, actually I used Visual Studio 2012. Also there is the file BlockTNT.h inside the block folder

mmm, I think i am going to stop using visual studio 2012 and use 2008 Smile

I added BlockTNT.h to the project. Now it should be all good. please let me know if it is still broken Smile
Reply
Thanks given by:
#5
Also you can add creeper explosions.
Reply
Thanks given by:
#6
The header files don't need to be in the project file for the project to compile, but of course it's good to have them there. The project compiles, which is as much testing as I can do now.
Reply
Thanks given by:
#7
Cool, now I am switching back to work on the physics stuff for entities.
Reply
Thanks given by:
#8
You know, a friend once said, "whitespace is free, so use it freely". You might want to take that advice as wellTongue

I hopefully fixed your code to compile on Linux, it had some really bad issues - you put a pointer into a list and then let the object it was pointing to die, etc. So I fixed that up, too. Also, a vector is a better data structure here, since you can more or less approximate the number of elements, so you can even pre-allocate it, thus saving quite a few reallocations; a list has to allocate each item, so it's slow.
Reply
Thanks given by:
#9
oh cool, thanks Smile hopefully there aren't any more issues Smile
Reply
Thanks given by:
#10
i made something that prevents TNT from destroying blocks when its in water. shall i commit it? Wink
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)