my major problem is end session as in kick everyone out. because always get session already started, after match found.
i managed the End session for player on OnpeerDisconnect function.
C
Christopher Bonnell
said
about 5 years ago
I supplied a link for you shortly after my last response, but this silly forum filtered it for approval.. so I guess just wait for mods to approve post. Or read email, because unapproved posts will still get emailed.
A
Ali shantia
said
about 5 years ago
thanks Christopher,
you mean check my email inbox to get your link?
C
Christopher Bonnell
said
about 5 years ago
They finally approved the post, so you can just look above.
M
Mark Bueno
said
over 4 years ago
Hi, I'm having a similar session disconnect problem. Im following the gamesparks real time multiplayer example. I have a game that takes two players. (player 1 and player 2 for this example)
Both search for a game
When match found game starts
Then when either player desconnects - lets asume in this case player 1 (shuts application down) I call GameSparksManager.Instance ().GetRTSession ().Disconnect ();
and send the player that didnt disconnect (player 2) to the lobby scene.
now player 1 starts game again, searches for match and gets match found message
but when player 2 searches for match, it doesnt find a match. just keeps searching for match.
I also tried kicking player through cloud code but same effect.
So What I asume I need is to destroy the match session because the call to GameSparksManager.Instance ().GetRTSession.Disconnect () i thinks leaves the session open and linked to a player.
Any comments on how can I go about this?
p
paras darji
said
over 3 years ago
I am getting the same issue as Getting by Mark Bueno.
Ali shantia
Hi
i have a problem with RtSession.i want to destroy my entire session after one player leave the stage and exit the stage.
i setup the simple code in cloudcode but i don't know it work or not.
RTSession.onPlayerDisconnect(function(player){
var players = RTSession.getPlayers();
for (var i = 0; i < players.length; i++) {
RTSession.newRequest().createEndSessionRequest().setPlayerId(playerPlayerId).send(function(response){
var rtDataToSend = RTSession.newData().setString(1, response.userId);
RTSession.newPacket().setOpCode(101).setData(rtDataToSend).send();
})
}
});
thanks,
Maybe this will help: https://docs.gamesparks.com/tutorials/real-time-services/clock-synchronization-and-network-programming.html#game-over-countdown
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstAli shantia
Christopher Bonnell
End session for player, or end session as in kick everyone out?
Christopher Bonnell
Maybe this will help: https://docs.gamesparks.com/tutorials/real-time-services/clock-synchronization-and-network-programming.html#game-over-countdown
Ali shantia
my major problem is end session as in kick everyone out. because always get session already started, after match found.
i managed the End session for player on OnpeerDisconnect function.
Christopher Bonnell
I supplied a link for you shortly after my last response, but this silly forum filtered it for approval.. so I guess just wait for mods to approve post. Or read email, because unapproved posts will still get emailed.
Ali shantia
thanks Christopher,
you mean check my email inbox to get your link?
Christopher Bonnell
Mark Bueno
Hi, I'm having a similar session disconnect problem. Im following the gamesparks real time multiplayer example. I have a game that takes two players. (player 1 and player 2 for this example)
Both search for a game
When match found game starts
Then when either player desconnects - lets asume in this case player 1 (shuts application down) I call GameSparksManager.Instance ().GetRTSession ().Disconnect ();
and send the player that didnt disconnect (player 2) to the lobby scene.
now player 1 starts game again, searches for match and gets match found message
but when player 2 searches for match, it doesnt find a match. just keeps searching for match.
I also tried kicking player through cloud code but same effect.
So What I asume I need is to destroy the match session because the call to GameSparksManager.Instance ().GetRTSession.Disconnect () i thinks leaves the session open and linked to a player.
Any comments on how can I go about this?
paras darji
I am getting the same issue as Getting by Mark Bueno.
Does any one have solution?
-
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