Redstone Simulator Blocks Placed/Destroyed
#3
Hi xoft,

Thanks for your reply! Smile

well, the reason is to properly calculate what the simulator should do in each case (placing a block, destroying a block, changing metadata, block updates) instead of the simulator trying to figure out what happened and then decide what to do. For example, it's easier for a redstone torch to signal the stop of a redstone current when the torch is destroyed than for a redstone wire to determine if it still has, by looking at all its neighbors, a power source that it is providing power every time there is a block update.

I think that in the case of multiple changes before the simulator has a chance to react, I don't think it will help any extra. It will help in a sense that each event is processed faster since each device knows what happened. Also, I was planning the simulator to have a queue of events that get processed per tick (kind of like the current Redstone simulator is).

Also, I was also planning to implement the device handlers (base class, and subclass for each device, like torches, wire, etc...) the same way we are implementing blocks. So they are not storing any data specific to any coordinates. They only implement the behavior of each device type. These handlers only interface to cWorld by making calls to the simulator. This way any world update goes through the simulator so it can be easily converted to supporting chunk updates by creating one simulator object per chunk.
Reply
Thanks given by:


Messages In This Thread
RE: Redstone Simulator Blocks Placed/Destroyed - by keyboard - 02-23-2013, 05:20 PM



Users browsing this thread: 1 Guest(s)