In wich cases we send messages to channel/peer/server?
Can someone tellme an exemple of each case? thanks!
In wich cases we send messages to channel/peer/server?
Can someone tellme an exemple of each case? thanks!
bump, any one can explainme when to use each case?
Maybe this example is a good place to start?
http://clickstore.clickteam.com/simple-lacewing-co-op-example?keyword=coop
Send Message to Channel: When you want Peers in the same channel to receive the message,
One use of it would be a Chat app, you send messages for people to see.
Send Message to Peer: When you directly want to send a message to Peer,
One use of it would be sending that you've hurt the peer, making them lose health on their end.
Another use would be a direct private message, away from the channel.
Send Message to Server: When you directly want to send a message to the Server, where other people probably won't see
One use of it would be login authentication.
Sends vs Blasts
Sent messages travel through UDP, therefore they will be received in the same order that you've sent them and will always reach the target, however, it's quite slow.
Blasted messages travel through TCP, therefore they can be received scrambled up or modified, they can also be lost along the way. They are much faster though.
- BartekB, a.k.a UppernateJoin the Click Converse Discord! - https://discord.gg/7RNXFrC
Dungeon Raiders! - Link soon™
All types of messages go to the server, except:
Channel messages = Message gets sent to the channel, everyone in it receives it
Peer messages = Message gets sent to the person, he only receives it
Server messages = Message gets sent to the server, the server app only receives it
Therefore, no matter what message you send, it will be sent to the server and redirected to the appropriate place, it is just how other people can receive that message.
tl;dr: No, the messages you send are basically where you want them to go (Server, or to channel, or to peer / person)
- BartekB, a.k.a UppernateJoin the Click Converse Discord! - https://discord.gg/7RNXFrC
Dungeon Raiders! - Link soon™
Also considder dead reconing instead of sending loads of messages to uppdate moving objects positions:
https://en.wikipedia.org/wiki/Dead_reckoning
I short this means:
if object is moving to the right, send one this 1 message to the server until there is a change in direction/ speed/ movement for the Object.