userLost Event => punish user in turn-based game??

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
julifos
Posts: 33
Joined: 10 Oct 2009, 23:33
Contact:

userLost Event => punish user in turn-based game??

Postby julifos » 19 Apr 2011, 09:20

Do you know when you're playing SO FINE, enjoying, a turn-based game and your opponent leaves the game because (s)he's losing?

Now add that this happens 10 times in a row.

So, this is why leaving turn-based games uses to carry some kind of punishment or penalty, and I got 2 questions:

1. Any way to know if the user lost internet connection instead of closing the browser window? (ie, not his fault)

2. I guess the previous is "no", so here comes the second question: what kind of punishment would you apply? Something terrible enough :twisted: to prevent users leaving the game, although not so terrible that it's a terrible injustice :cry: if the user just lost his internet connection (ie, not his fault).
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 20 Apr 2011, 03:57

1. Any way to know if the user lost internet connection instead of closing the browser window? (ie, not his fault)


Closing internet connection and closing the browser's window are recognized as the same thing (user lost) via serverside. So I don't think there's a way to separate out those two behavior. What you could do instead, is to have a countdown timer to give a user time to rejoin the game if it was an accidental disconnection. If the timer had expired, you could give the other player a choice to 'wait' or 'kick' him.

I suppose that answers your next question too.
Smartfox's forum is my daily newspaper.
User avatar
julifos
Posts: 33
Joined: 10 Oct 2009, 23:33
Contact:

Postby julifos » 20 Apr 2011, 09:36

This particular minigame's duration is around five minutes. Resetting a router and re-loginin could take a couple of minutes ONLY if resetting solves the problem. There is also power-downs, your computer freezed which needs a manual restart, etc. I don't see the "wait" solution suitable for this particular game...

I was thinking now in some kind of "reputation" system. When you leave a match, you lose "reputation" (acquire negative points). And this is public information. When you see a player with a "bad reputation" that means he uses to be a bad-boy or he uses to have connectivity issues. Both things will lead other users (or the system) to be careful when giving that player the chance to join a match.

So, for every user:
-Keep a counter of disconnections (being intentional or not).
-Keep a counter of consecutive successful matches (reset to 0 every time the user leaves a game). Every 20 successes, remove one negative point from the disconnections count.
-Apply different punishments depending on the current count of disconnections.

Errr... Sorry for using this thread as my own dashboard :lol:

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 46 guests