Thread: Minecraft
View Single Post
Old May 5 2011, 02:31 PM   #829
on holiday
Location: England
Re: Minecraft

Robert Maxwell wrote: View Post
We already know blocks can move due to gravity, and the Piston Mod takes it a bit further. What I think we haven't seen is a large collection of blocks moving in tandem, which is what would be needed to make it work. You are probably right that there are technical reasons why this wouldn't work well.
I expect moving blocks have been implemented by having a location property, and a target location property, and the block moves in a straight line from one to the other over time.

When a block moves, it will add surrounding blocks to a queue, so that you get a cascade effect for the gravel or lava, or whatever.

Having a large object moving would mean turning it into a sprite, rather than terrain, as it has to be capable of rotating and moving independent of the terrain grid.

Boats could also be made in funny shapes, and funny shaped things are hard for collision detection. Imagine if you made lots of boats that were tangled/knotted together. How would you handle that? Too may collision tests would cripple the engine.

if you quickly destroy a lot of blocks (such as with TNT) game performance drops dramatically.
It may not be programmed efficiently. If it uses a single function to destroy a block, and add surrounding ones to a queue, it could be making a huge queue by destroying all blocks within the blast radius.

It would be more efficient to have a separate two stage function for TNT: first stage is to remove the blocks in the blast radius, and the second stage is add only the perimeter blocks to the queue.

Last edited by Jadzia; May 5 2011 at 02:46 PM.
Jadzia is offline   Reply With Quote