Simulator rewrite
#4
You know what? That idea with storing chunk neighbors might not be as bad as it first seemed.

For current simulators, such as sand and floody fluid, it is not beneficial at all, none of these touch a neighbor more than 1 block away. For that reason, keeping the neighbors up to date would be too much work for almost no gain.

However, for redstone and in the future, for vanilla fluid simulators, this could become the real deal. These two need blocks up to 16 blocks away, for which the neighbor chunks make sense very much. Also this would further reduce the locking of the chunkmap - the simulators will tick inside the chunk's tick, having the chunkmap already locked, and accessing the neighbors as needed without locking at all.
For this to work, we'd need two things - chunk keeping track of their neighbors in a set of protected member fields / functions, and simulators being capable of ticking one chunk worth of data.
I'll start implementing the first one - chunk neighbors. Then I have no trouble converting old simulators to the new schema.
BUT! I'm afraid I won't have enough wits to rewrite the current redstone simulator to the one-chunk-worth idiom. So the only reasonable thing I can do for the time being, is disabling the redstone simulator, until someone boldly steps in and rewrites it, too.
Reply
Thanks given by: Taugeshtu


Messages In This Thread
Simulator rewrite - by xoft - 11-09-2012, 07:05 AM
RE: Simulator rewrite - by Taugeshtu - 11-09-2012, 07:09 AM
RE: Simulator rewrite - by xoft - 11-09-2012, 07:41 AM
RE: Simulator rewrite - by xoft - 11-11-2012, 10:23 PM
RE: Simulator rewrite - by FakeTruth - 11-12-2012, 12:59 AM
RE: Simulator rewrite - by xoft - 11-12-2012, 01:04 AM
RE: Simulator rewrite - by NiLSPACE - 11-18-2012, 04:00 AM
RE: Simulator rewrite - by xoft - 11-18-2012, 04:41 AM
RE: Simulator rewrite - by xoft - 02-28-2013, 07:08 AM
RE: Simulator rewrite - by keyboard - 02-28-2013, 12:25 PM
RE: Simulator rewrite - by xoft - 02-28-2013, 05:50 PM
RE: Simulator rewrite - by xoft - 03-01-2013, 05:16 AM
RE: Simulator rewrite - by keyboard - 03-01-2013, 03:26 PM
RE: Simulator rewrite - by NiLSPACE - 03-01-2013, 05:49 AM
RE: Simulator rewrite - by xoft - 03-02-2013, 05:08 AM
RE: Simulator rewrite - by NiLSPACE - 03-02-2013, 05:29 AM
RE: Simulator rewrite - by xoft - 03-02-2013, 05:41 AM
RE: Simulator rewrite - by xoft - 03-03-2013, 01:49 AM
RE: Simulator rewrite - by xoft - 03-03-2013, 06:31 AM
RE: Simulator rewrite - by keyboard - 03-03-2013, 12:59 PM
RE: Simulator rewrite - by NiLSPACE - 03-03-2013, 08:22 AM
RE: Simulator rewrite - by xoft - 03-03-2013, 06:41 PM
RE: Simulator rewrite - by NiLSPACE - 03-03-2013, 08:31 PM
RE: Simulator rewrite - by xoft - 03-03-2013, 11:33 PM
RE: Simulator rewrite - by xoft - 03-04-2013, 01:40 AM
RE: Simulator rewrite - by NiLSPACE - 12-07-2013, 10:07 PM
RE: Simulator rewrite - by xoft - 12-07-2013, 10:21 PM
RE: Simulator rewrite - by tigerw - 12-08-2013, 08:32 AM
RE: Simulator rewrite - by NiLSPACE - 12-08-2013, 08:39 AM
RE: Simulator rewrite - by tigerw - 12-08-2013, 08:40 AM



Users browsing this thread: 1 Guest(s)