Giter Site home page Giter Site logo

Comments (3)

BorgLee avatar BorgLee commented on May 18, 2024

热更新吧

from goworld.

synchronized avatar synchronized commented on May 18, 2024

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

from goworld.

tutumagi avatar tutumagi commented on May 18, 2024

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

from goworld.

simonlingoogle avatar simonlingoogle commented on May 18, 2024

有几个好处:

  • 减少game和gate之间的连接数量。game和gate进程的数量需要随着玩家数量和游戏逻辑的复杂性上升而增加。如果每个game都和每个gate建立连接,总的连接数量会很大。而dispatcher的数目相对较少,这样减少了总的连接数目。
  • Dispatcher记录了所有entity在哪个game上,这样entity之间只要拿到ID就可以相互调用RPC。
  • Entity在game之间迁移,或者热更新game进程的时候,dispather可以保证RPC消息的可靠性和有序性。

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

from goworld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.