.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   How does PBEM work - exactly? (http://forum.shrapnelgames.com/showthread.php?t=43307)

Arralen June 6th, 2009 10:47 AM

How does PBEM work - exactly?
 
Hi folks, lazy as I am, I thought that before I spend several hours figuring out everything myself I simply ask you, the knowledgeable folks here at the forum:

How does PBEM work exactly?
Which files are (to be) written/send where, and when, under the premise that hosting happens on a 3rd machine via command line.
How are those files named?

This is what I figured out:
- To start a game, one has to gather the race files.
- Setting up a game requires the GUI, but after that, the game can be "handed over" to a server machine running SE5 command-line only.

But which files have to be transfered at that point, and thereafter?

Thanks in advance!

dumbluck June 6th, 2009 10:52 AM

Re: How does PBEM work - exactly?
 
Have you checked out PBW2? It handles all the file transfers for you, and SJ has created an auto-hosting program that will automatically run the turn once they've been uploaded to PBW2 (sorry, no link for that one). Also, keep in mind that PBW2 is still in beta, so there may still be a few minor hiccups. Fyron has been good at jumping on those, though.

Suicide Junkie June 6th, 2009 02:16 PM

Re: How does PBEM work - exactly?
 
Quote:

Originally Posted by Arralen (Post 694742)
Which files are (to be) written/send where, and when, under the premise that hosting happens on a 3rd machine via command line.
How are those files named?

At the very minimum, you will need to be given the "gamename.GAM" file.
You will also want the "gamename.CMB" (combat replays) and some of the gamename_stats files, but they are optional.
You'll get all these files when you click "Download turn" on PBW2.

You load up that turn in SE, select your empire, put in the password, play. When you hit end turn, the game will write out a gamename_playernumber.PLR file for you.
Upload that PLR file to the host (AKA PBW2)


For starting a new game, you just need to start the game and hand out the GAM file to the players. EMP files from the players will provide you with their chosen race setups, and for SE5, you can save the game rules (Racial points, etc) in a GSU file to give out.
Be sure to select the Multiple Machines and Manual File Moving options in the game setup.

Turns do not have to be processed via the command line, but it is simpler once you have it working.
Letting PBW2 deal with the files, and using my autohost script to process the turns will keep you from having to worry about it :)

Arralen June 6th, 2009 02:37 PM

Re: How does PBEM work - exactly?
 
Sadly, PBW2 does not work within a LAN (without accessing internet), and TCP/IP game doesn't as well, so a friend of mine is bugging me to make some script to automate the file transfer & turn generation ...

Suicide Junkie June 6th, 2009 03:26 PM

Re: How does PBEM work - exactly?
 
PBW2 is independent of the LAN.

But in the case of a LAN and scripting:
Host:
- Make a shared folder for transfers.
- Script:
1) Wait for all PLR files to appear in the shared folder
2) Copy files to SE5 savegame folder (and archive old PLRs before deleting them from the save folder)
3) Run SE5 (with command line parameters as explained here
4) Copy results to shared folder
5) goto 1

Clients:
- Script:
1) Wait for new files in the shared folder
2) Copy files to SE5 savegame folder
3) Wait for PLR in savegame folder
4) Move PLR to shared folder
5) Wait for PLR to disappear from shared folder
6) Goto 1


You may want to use some dummy files to indicate when the copied files are finished so that the clients don't try and grab them before you've finished writing a big CMB or something.



OR


You can not worry about writing all that and make use of the existing infrastructure :)


All times are GMT -4. The time now is 01:51 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.