Closed markfarrell closed 10 years ago
Approved. Need to look at the quests in the Assets repo if they still work with the changes in trigger.js
@ingmargoudt if this was approved, should it be merged? Or is there still stuff that needs to be checked?
@DatapawWolf , a few weeks we decided that we require 2 devs, other than the dev that created the PR, review the code and accept it. After accepting, the PR gets free for merging
Approved! @markfarrell I cannot express how amazed I am by this PR, great work!
Dude.. respect
Overhauled the interface to the world handler. It converses asynchronously with a manager of zones. Chris Dickinson's 'spatial-events' uses an octree behind the scenes to search for a cell handler quickly when an event is emitted at particular cell coordinate. Cells only tick when an 'activate' event is fired and completely stop ticking when 'deactivate' is fired. To prevent nodejs from hanging, the 'Ticker' service throttles and limits the amount of ticking that can be going on concurrently at any given time.
Aside from the performance gains from having to do less computations on average per server tick, these changes should allow us to take advantage of multiple cores on a machine in the future. Once we have a better way of serializing units (removing circular references, removing additional awkward fields after it is constructed from data), we should be able to fork our main process and instantiate cell handlers in child processes, transferring player connection descriptors and whatnot with UNIX domain sockets.
I also fixed the 'bug' where your appearance does not update when you respawn.
Signed off by: Mark Farrell markfarr2011@gmail.com