Thanks, Kevin, for writing and sharing this program with us all. I've set it up on a LAN and it works nicely. I did have a couple of requests for a future version - or maybe these features already exist and I'm just doing something wrong. I also haven't had the time to upgrade to 1.5 yet - which I just noticed today is released - so maybe these things are there.
1. Persistent storage of game info. Currently in the event of the pyscrabble server deamon going down (for whatever reason), all games in progress are lost. Is it possible to store that information in such a manner that restarting the daemon picks up where it left off?
2. Allowing users to exit and enter a game in progress. This feature would make playing the game SO much more convenient. Currently only the person who started the game can save it, at which time players can exit. It would be much better if the game is automatically saved on the server after each turn. The main problem now is that if a player loses their connection to the server for some reason (their internet connection goes down, they're on a laptop and need to disconnect from the network, their computer freezes etc etc), they cannot re-enter the game and therefore forfeit the game.
If game data were saved after each turn, then players could exit and enter the game at will, and would not all need to be present in order to play (making it much more convenient to play as not everyone is free at the same time). Naturally if it's someone else's turn a player wouldn't be able to make a move, but the server could prevent them from doing so by keeping track of whose turn it is.
Thank you for considering these, especially #2. I would volunteer to help with some of this but unfortunately I don't know a stitch of python (though I'd like to learn if/when I have time; I know a bit of ruby). I could help with testing though.
Thanks for the interest. To address your points:
1.) In the latest version, I have changed the backend storage module so data integrity issues shouldn't be a problem in the event of a crash. However, if a game is in progress (i.e., not saved) theres not much I can do. The reason for that answered in the the next part:
2.) I'm not sure its possible or wise to allow people to leave/join the game at will. What happens to their letters? Do they hang on to them until they decide to come back? What if they never come back, the game wouldn't end because there would still be up to 7 letters missing. Assuming they leave and lose their letters, should people be allowed to keep playing?
I'd appreciate your input on what should happen in these scenarios.
Out of curiousity, how many people play on your LAN?
Being able to allow a player to re-enter a game they've left is a feature I need. PyScrabble is completely useless to me, without it.
Here's my scenario:
I and a friend, who live in two different countries, would like to play Scrabble. But, unfortunately, her only way to access the Internet is through an unstable wireless router that randomly drops her connection.
The way things are now, when her connection drops she's kicked out of the game and there's nothing we can do to continue.
I can understand Kevin's worries, so, here's my suggestion:
What about offering it as a choice? The behaviour of the server (allowing or not allowing a player back in after they leave) would depend on a configuration setting.
This way, I could run my own server on my own home box, and we could play using that. The public server could still not allow re-entry.
Or maybe, it could be decided on a game-by-game basis by the game creator. I'll leave that to your discretion. :)
PyScrabble is fairly worthless for me, as well, without some means of re-entering a game in progress, in the case of a dropped connection.
I love the way PyScrabble plays, but since there is no way to resume a game when one of the players drop out accidentally... I tend to use Yahoo Games' Literati instead (which does allow players to re-enter a game).
Perhaps there could be some option after a player drops out where Player 1 gets to decide whether to pause the game and let the dropped player come back or whether to put the dropped player's tiles back into play. If Player 1 is the one dropped, Player 2 would become Player 1 and have that choice.
Of course, I'm not sure how difficult or easy that particular feature would be to implement. If it'd be easier to choose at game-running time or wherever, that'd be fine... But I'd really like for players to be able to re-enter a game. :-)