ioGameExamples
ioGameExamples copied to clipboard
ioGame 网络游戏服务器框架示例集合。FXGL + netty + ioGame;
适配微信小程序
我使用Demo,可以在Unity环境中连接上WebSocket,并收到消息。 但是当用Untiy打包成微信小程序时,它没有反应,不会Open、Error、Close。 我查询微信官方文档:https://wechat-miniprogram.github.io/minigame-unity-webgl-transform/Design/UsingNetworking.html 它表示:由于安全性的影响,JavaScript 代码没有直接访问 IP 套接字来实现网络连接。因此,该.NET 网络类(System.Net 命名空间中的一切,特别是System.Net.Sockets)在 WebGL 中不能工作。UnityEngine.Network* 类也是这样,编译 WebGL 时将找不到这些类。 我使用https://github.com/psygames/UnityWebSocket是可以在Unity和微信小程序中连接的。 我看到您之前有个项目:https://github.com/iohao/iogame-unity底层是用的UnityWebSocket,但是Demo里没有写明怎么调用Action,请问能不能更新或者说明一下。 万分感谢~
最近在学习IoGame的集群网关: `BrokerServer brokerServer = NettyClusterSimpleHelper.createBrokerServer(seedAddress, gossipListenPort, port);` 集群网关通过如上构造。 其中seedAddress 如下: ``` public List seedAddress = List.of( "127.0.0.1:30056" , "127.0.0.1:30057" , "127.0.0.1:30058" ); ``` 这个seedAddress是指什么?就是指我们集群内的网关的地址吗? 还是指最基本(种子)的网关服务器。 后续增加或者减少只要保证seedAddress 中有一个是活着的就好了。因为活着的会通知其它的? 那如果一开始,就构造好这个列表了? 我需要如何动态增加/减少网关的数量。 需要修改代码或者配置,然后重启网关吗?
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.springframework.context.ApplicationContext.getBean(java.lang.Class)" because "com.iohao.game.MyKit.applicationContext" is null at com.iohao.game.spring.logic.hall.GameLogicHallLogic.lambda$extractedDomainEvent$0(GameLogicHallLogic.java:71) at com.iohao.game.action.skeleton.eventbus.EventBusRunner.onStart(EventBusRunner.java:87) at com.iohao.game.action.skeleton.core.runner.Runners.lambda$onStart$0(Runners.java:75) at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) at com.iohao.game.action.skeleton.core.runner.Runners.onStart(Runners.java:75) at com.iohao.game.bolt.broker.core.client.BrokerClient.init(BrokerClient.java:149) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:62) at com.iohao.game.bolt.broker.client.BrokerClientApplication.start(BrokerClientApplication.java:48) at com.iohao.game.spring.logic.hall.GameLogicHallClientApplication.main(GameLogicHallClientApplication.java:31)