Re: PBEM game: Advice and/or recommendations?
Heh, my day job isn't even remotely related to programming and I tend to be the kind of person who learns just enough programming to make what I need and then promptly forget whatever I learned afterwards. I'm not sure how much help I could be to a pro...
The reason why I said it might not be too hard is because there are already plenty of free PHP scripts about that handle user registration / management (including such things as "remember me" login, "I forgot my password" functionality, "I want to change my e-mail address" etc.) and file upload / download, which to my mind are the most difficult parts.
Other than that, we would only need a way for a registered user to create a virtual game with x number of open slots (which is after just rows in an MySQL table), allow players to apply for an open slot and upload their pretender file, and after the host presses the "Start Game" button, allows the host to upload turn files and Users to download them and upload .2h files in turn. Since in Dominions, the the correct .2h file is always (nation_name).2h, and the turn file is always (nation_name).trn that helps too. You'd also want some functionality on the game page to allow the host to post news on the game (which I suppose would also get e-mailed automatically to each player).
It would make it really easy to do if we force the host to upload each .trn file individually. I suppose the alternative would be to allow the host to zip all the turn files into a zip and upload that and have the server unzip them and sort all the (nation_name).trn files correctly, which would be a lot more complex and need lots of testing. (You need error checking of all kinds such as seeing if the host forgot to include a particular nation's .trn in the zip etc.)
Personally, I'd just aim to get the above to work first (and force hosts to upload each .trn individually) before thinking about other things, like e-mail notifications, giving players the option of having the latest turn attached to their e-mail notification etc, allowing players to withdraw, allowing the host to kick a player etc.
Yeah, I've been thinking about this for a while now. And oh, you'd also want to think about some reasonable size limits for the various files. How big can a .2h get? How big can a .trn get?
|