I made some software to simplify PBEM Games.
** Note Please ensure you are using pbem4se client at least version 0.0.11 if you can ** Older versions
will should still work though.
It automatically shares saves between players remotely with minimal user intervention, while playing the game.
It has a windows client which can be downloaded here. It also works in wine.
And a server that links up the clients is hosted at https://www.tgc37.uk/
From the readme:
A helper client for playing Shadow Empire PBEM games.
What it does
Enables seamless PBEM game play for Shadow Empire. Once set up, all players have to do is play the game normally.
Saves are exchanged between players automatically.
How it does it
A multiplayer game is configured on the server using a web page, where details such as number of players and turn order are specified. Once configured, the various players clients co-ordinate through the server to maintain game saves.
Each player's client is authorised to their secure account through an SHA-1 token to ensure only they can take their turns and the game saves are safe.
No, really, how does it do it?
It creates a specifically named blank file in your save folder, eg, yourname_b8a8_round1_overwrite_me.se1. When you save after your turn you overwrite this file, it notices, and will upload this to the server.
Then next player will receive this in their save folder as theirname_b8a8_round2_load_me.se1. which they load and play, they will have a file like theirname_b8a8_round2_overwrite_me.se1, to save their game over, and so-on.
Important!!! Make sure you load/overwrite the correct save, especially if you have more than one game on the go. the second part of the filename uniquely identifies the game.
Installing and setting up the client
Unzip to a folder where you have write access. If you are using windows then pbem4se_client.exe should just run.
The python version, once set up should run on most platforms.
You will need to give the client your unique authorisation token from the client settings page on the website. This can be done with "menu->server->change user", and tell it where to look for save game files using "menu->file->Choose Savefile Dir", within the client, or editing the pbem4se_settings.json file directly for the settings to persist.
Everything should be simple enough, the main points are, be a player in an activated game on the server - have your token from the server imported into your client - have your client pointed at a save folder.
Have the client running when you play especially when saving/loading games.
There are three tabs in the client.
Play Game Tab
Here you can select from games that have been created and choose by clicking in the dropown to select one to play.
Also displays state of current game, are we playing or waiting, what round is it, etc.
The Poll Server Checkbox needs to be checked for other players games to be automatically downloaded when they save their game. It can be unchecked to ease strain on the server if you want to keep the client running but are not playing.
If the The Delete Uploaded Saves checkbox is ticked then local copies of uploaded saves will be deleted. This makes sense as in PBEM games you cannot load a turn you have played. Untick to keep them just in case... (Remember, if in doubt always back up saves)
Note: If you are able to save between turns, make sure you do not overwrite the overwrite_me file! When this file is overwritten it is uploaded to the server as the next players download.
Create Game Tab
This takes you to the create game page on the website. You will be able to create games on this tab directly when I get
round to it.
This tells you the current state of the client and has a scrolling text log of recent events, which can help inform in case of difficulty, state of connection to server or issues with settings, etc.
Check the text in the info tab for hints if things are not working. Click menu>server>check server status and see what it says.
Make sure the authorisation token is correct.
Make sure the other settings in pbem4se_client.json are correct.
Make sure you have a game selected and the info in the Play Game Tab seems sane.
Make sure The Poll Server Checkbox is checked.
This is where games are created and shared between players. It acts as a single point of contact between the clients.
There is a bit of help on the website which will be more up-to-date.
There are basically three functions to the website.
1. Create an account and provide authorisation token for the client.
2. Choose people who you can play games with.
3. Create games.
The server itself functions to receive uploaded games from clients and download them. This automatically happens when a game is activated and chosen in a client.
There is no function to communicate with other players on the server. It is assumed that you have arranged for a game on the forum or are otherwise in contact with who you want to play with.
There may be some kind of lobby or player looking for game / starting game thing added if it seems to work.
There is a possibly more up-to-date readme here https://gitlab.com/deMangler/pbem4se-client/-/blob/release/readme.md
There are helpful notes in various places. This is just a thread I am starting so that I have something to link back to in the docs and on the site.
Please feel free to try it out and break things. I have tested it as much as one person can.
I will fix things and respond to feedback here.
The source code for the client is public at https://gitlab.com/deMangler/pbem4se-client. I will make the server source public when it is more finished it is all just getting started.
Edit - updated client link to v0.0.2. Just a small fix
Edit - updated client link to v0.0.3. fixed download url issue to not use debug path.
Edit - updated client link to v0.0.4. UI QOL tweaks.
Edit - updated client link to v0.0.5. tweaks.
Edit - updated client link to v0.0.6. Windows version no longer displays extra console.
Edit - updated client link to v0.0.7. Refactor and better logging. Fixed outdated game dropdown sometimes.
Edit - updated client link to v0.0.8. Reduced error spam in info pane.
Edit - updated client link to v0.0.10. Some optimisation and code clean.
Edit - updated client link to v0.0.11. Better client/server awareness... or something...
Help testing it appreciated.
< Message edited by deMangler -- 8/1/2021 3:29:27 PM >