xiaonanln / goworld

Scalable Distributed Game Server Engine with Hot Swapping in Golang
Apache License 2.0
2.53k stars 450 forks source link

在game和gate之间加入Dispatcher主要出于什么设计目的?以及主要解决什么问题? #95

Open mars315 opened 4 years ago

mars315 commented 4 years ago

我看了博客和文档,没有指出这么做的原因。希望作者能在百忙之中解答下,非常感谢, @xiaonanln

synchronized commented 2 years ago

我觉得应该是用来实现服务器之间消息转发,game <=> game,

tutumagi commented 1 year ago

主要是消息转发,dispatcher 记录了各个entity在哪个gate,在哪个game等等信息

simonlingoogle commented 1 year ago

有几个好处:

如果没有dispatcher应该也是可以做到这些的功能,但是会困难一点。