Are ScriptMessages not the best way of inciting client functions to all players?
O
One More Turn
started a topic
over 6 years ago
My game doesn't use challenges since it's not traditionally turn-based where each player gets their own turn while other players wait. My game IS time-based however, where every play must perform their action within the same shared time. Because of this, I had to resort to rolling my game within a collection instead of challenges.
Now, the way I've been triggering client functions is through ScriptMessage. They have an Expire After value of zero so they act just like a function. If you're active in the game when the ScriptMessage is received, you'll see the feedback. That's fine with me since it makes sense. This is similar to Photon btw.
But sometimes the game will remain active and not receive a ScriptMessage. Is this because of the Expire After value being zero? What would be a better solution? Thanks for your time.
As for the issue of not receiving ScriptMessages I would recommend if you can, check if the players are online, if information is sent through the WebSocket and the player were to disconnect suddenly then message would be sent just not received, a better alternative might be to send the messages as a push that way if a player were to be disconnected briefly then the message should still be received.
As for the issue of not receiving ScriptMessages I would recommend if you can, check if the players are online, if information is sent through the WebSocket and the player were to disconnect suddenly then message would be sent just not received, a better alternative might be to send the messages as a push that way if a player were to be disconnected briefly then the message should still be received.
Does this answer your question,
Regard,
- Tony.
O
One More Turn
said
over 6 years ago
The ScriptMessage Extension has had Send Via Socket and Send As Push toggled on while Suppress Push On Socket Send (because the initiator of the event should get the same result message) and Include In Push Count toggled off. The problem occurred with these settings.
I'm a little afraid, to be honest of game sparks realtime. Don't I need to apply and how does it perform on unity's mobile platforms? My game is mobile, tablet, and desktop (possible web gl) so they are all important.
O
One More Turn
said
over 6 years ago
does game sparks realtime do well with leaving the game and returning?
Customer Support
said
over 6 years ago
Hey One More Turn,
Sorry about the delayed response on my part, GameSparks Real time services is included in the UnitySDK so you don't need to worry about applying, for players leaving a game and then rejoining you can match the players using a MatchMakingRequest and edit the matchFoundMessage to add the players to your own custom challange collection and possibly alter some of a players script data to allow him to rejoin to that particular challange.
With regard to your message problem, you can leave the "Expires After" field empty to ensure the messages stay queued to send, setting that value to 0 will cause
messages to never be queued, meaning the message will not be sent as a push.
Thanks,
- Tony.
B
Baris Tumerkan
said
over 6 years ago
" you can leave the "Expires After" field empty to ensure the messages stay queued to send "
Does this mean it'll still be socket sent once the socket is re-opened (if push-send is not enabled)? It would be nice if there were a simple way to do deliver guaranteed messages by socket-send (since players aren't all registered to receive push).
One More Turn
My game doesn't use challenges since it's not traditionally turn-based where each player gets their own turn while other players wait. My game IS time-based however, where every play must perform their action within the same shared time. Because of this, I had to resort to rolling my game within a collection instead of challenges.
Now, the way I've been triggering client functions is through ScriptMessage. They have an Expire After value of zero so they act just like a function. If you're active in the game when the ScriptMessage is received, you'll see the feedback. That's fine with me since it makes sense. This is similar to Photon btw.
But sometimes the game will remain active and not receive a ScriptMessage. Is this because of the Expire After value being zero? What would be a better solution? Thanks for your time.
Hi One More Turn,
I would highly recommend reviewing our new up to date Real Time Services tutorials and Real Time API reference, this may be of some use to your time-based game.
As for the issue of not receiving ScriptMessages I would recommend if you can, check if the players are online, if information is sent through the WebSocket and the player were to disconnect suddenly then message would be sent just not received, a better alternative might be to send the messages as a push that way if a player were to be disconnected briefly then the message should still be received.
Does this answer your question,
Regard,
- Tony.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi One More Turn,
I would highly recommend reviewing our new up to date Real Time Services tutorials and Real Time API reference, this may be of some use to your time-based game.
As for the issue of not receiving ScriptMessages I would recommend if you can, check if the players are online, if information is sent through the WebSocket and the player were to disconnect suddenly then message would be sent just not received, a better alternative might be to send the messages as a push that way if a player were to be disconnected briefly then the message should still be received.
Does this answer your question,
Regard,
- Tony.
One More Turn
One More Turn
does game sparks realtime do well with leaving the game and returning?
Customer Support
Hey One More Turn,
Sorry about the delayed response on my part, GameSparks Real time services is included in the UnitySDK so you don't need to worry about applying, for players leaving a game and then rejoining you can match the players using a MatchMakingRequest and edit the matchFoundMessage to add the players to your own custom challange collection and possibly alter some of a players script data to allow him to rejoin to that particular challange.
With regard to your message problem, you can leave the "Expires After" field empty to ensure the messages stay queued to send, setting that value to 0 will cause
messages to never be queued, meaning the message will not be sent as a push.
Thanks,
- Tony.
Baris Tumerkan
" you can leave the "Expires After" field empty to ensure the messages stay queued to send "
Does this mean it'll still be socket sent once the socket is re-opened (if push-send is not enabled)? It would be nice if there were a simple way to do deliver guaranteed messages by socket-send (since players aren't all registered to receive push).
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics