Hi @TheRedHead, welcome!
That's really up to you. Here's the major difference from using a message or the state:
The data in the state will remain there when new players join, or a player disconnects & reconnects back to the game.
The state is broadcasted automatically at every "patch interval" (default is 50ms - see docs)
Messages are sent immediately, and only once. There's no built-in way to re-send a particular message when a player disconnects & reconnects for example.
Hope this helps,
And another problem, when A game and B game share the same schema, that would be a problem.
gameA use PlayeInfo Schema in ARoomSchema and gameB use PlayerInfo too in BRoomSchema. That would be a situation, the PlayerInfo could only implement one specific context but not two.
@cooul Hi, i meat the same situation. that is because you just ctrl+c to terminate the node process. you should make some post method to trigger the graceful shutdown. this function will remove the room info from your redis.
Hello, each colyseus server will try to get it's ip address from process.env.SELF_HOSTNAME before falling back to internal-ip.
In some rare cases it appears internal-ip isn't working, so an easy fix is to set the SELF_HOSTNAME env variable for each server.
Hello @daimonkor I'm using also Colyseus Client on Android, this unofficial portage to Java: https://github.com/doorbash/colyseus-java
I've seen you are using Kotlin, did you make your own version from doorbash's library? I'm interested in your Kotlin lib :)
I even upgraded to latest 0.13 version but still get issues
I do know the await reconnection function does fire but something after that blows up.
I am using pm2 with a reverse proxy by the way & over SSL