Yo @yannick … Got a question about the UDP packet order.
Since UDP packets are not guaranteed to be in order, and you can receive packet 5 before packet 4 for example… Does the geckos.io (socket.io like) api take that into account. when i do something like channel.on(‘chat message’)… Will they always be in order… Or can you still get out of order messages with geckos.io ?
And
How do you send message back to the client sender only… and not all the the other channels in the room ?
There seems to be an options.ordered option for initializing the server
There’s also:
// emits a message to the channel
channel.emit('chat message', 'Hello to myself!')
// emits a message to all channels, in the same room
channel.room.emit('chat message', 'Hello everyone!')
// emits a message to all channels, in the same room, except sender
channel.broadcast.emit('chat message', 'Hello friends!')
// emits a message to all channels
io.emit('chat message', 'Hello everyone!')
I’m not sure, but my guess is that ordered may cause you to lose the non-blocking benefit of unreliable, unordered UDP
I think if you’re dealing with user-typed chat messages on top of multiplayer networking, unordered should be fine, since a typical user won’t send typed messages at sub-second frequency, so the chance that their chat messages are out of order is low
I was thinking about using ordered = true for adding snapshot packets from network to my interpolation buffer. But if that negates any SPEED benefits… I will stick to un ordered and try and INSERT my network packet into the interpolation buffer array based on a sequence number or something
FYI @yannick … When trying to deploy my geckos.io app to AWS Elastic Beanstalk Environment.
It get a permission error when trying to install a package called node-datachannel
I gues the node-datachannel packge install is trying to access the resources on the machine like /root/.npm and ./root/.npm/_logs
So i cant deploy my geckos.io app in the cloud on AWS
YO @yannick … I am trying to use typed array buffer with geckos.io udp data channels… but when i transmit a arraybuffer with io… i just get an empty javascript… I have the same function but sending with colyseus broadcast and is working fine… can receive arraybuffer on client and work great with snapshotModel.fromBuffer
So… how do i get the UDP data channels to support sending binary data… like the result for snapshotModel.toBuffer
This is how i am generating worldState … using that to create a snapshot and converting that to binary array buffer… Then transmitting that binary packet either with geckos.io or colyeus.io