.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old June 6th, 2009, 10:47 AM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default 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!
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #2  
Old June 6th, 2009, 10:52 AM

dumbluck dumbluck is offline
Lieutenant Colonel
 
Join Date: Feb 2001
Location: iola, ks, usa
Posts: 1,319
Thanks: 3
Thanked 0 Times in 0 Posts
dumbluck is on a distinguished road
Default 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.
__________________
dumbluck
CEO, Fortuitous Investments, Inc.
Author: The Belanai Story
Reply With Quote
  #3  
Old June 6th, 2009, 02:16 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: How does PBEM work - exactly?

Quote:
Originally Posted by Arralen View Post
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
Reply With Quote
  #4  
Old June 6th, 2009, 02:37 PM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default 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 ...
Reply With Quote
  #5  
Old June 6th, 2009, 03:26 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default 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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:55 PM.


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