Skip to content

Conversation

@hweimer
Copy link
Contributor

@hweimer hweimer commented Aug 18, 2020

Bringing back play-by-mail by adding a new game mode that sets the MAIL global variable to 0 on U.S. turns and 1 on Soviet turns. The main strategy is that U.S. missions are launched twice; once after the U.S. turn to determine the outcome, and a second time after the Soviet turn (reusing the mission events from the U.S. turn) to determine Prestige. Before the save file is sent to the Soviet side, Data->Prestige and the U.S. mission counter are restored to their previous states.

At the beginning of the turn, the U.S. player is informed about the Prestige results of the previous turn and about any Prestige Firsts acheived by the Soviet side. The Soviet side sees the U.S. Prestige Firsts during the Soviet mission resolution, i.e., like when playing against the AI.

Turns are played the usual way, with a file saving dialog appearing after ending the turn. As the Data struct contains two new fields for mission resolution, this breaks save game compatibility.

At some points, I have hit some ancient codepaths, like when starting the mail game by calling Prefs(3). While things seem to work, there might be unintended side effects. Therefore, expect bugs.

Resolves #131 and #346.

Bringing back play-by-mail by adding a new game mode that sets the MAIL
global variable to 0 on U.S. turns and 1 on Soviet turns. The main
strategy is that U.S. missions are launched twice; once after the U.S.
turn to determine the outcome, and a second time after the Soviet turn
(reusing the mission events from the U.S. turn) to determine Prestige.
Before the save file is sent to the Soviet side, Data->Prestige and the
U.S. mission counter are restored to their previous states.

At the beginning of the turn, the U.S. player is informed about the
Prestige results of the previous turn and about any Prestige Firsts
acheived by the Soviet side. The Soviet side sees the U.S. Prestige
Firsts during the Soviet mission resolution, i.e., like when playing
against the AI.

Turns are played the usual way, with a file saving dialog appearing
after ending the turn. As the Data struct contains two new fields for
mission resolution, this breaks save game compatibility.
@peyre
Copy link
Member

peyre commented Aug 19, 2020

This is exciting! Am I right in thinking this is all working as far as you know? Normally our programmers merge the pull requests, but they're quiet at the moment. I'd merge this one here and now but I'm not in a position to really test it before the weekend. Have you done any testing on it yourself, actually played part of a PBEM game?

@hweimer
Copy link
Contributor Author

hweimer commented Aug 19, 2020

I ran a couple of tests that seemed to work fine, but now I have encountered an issue with equipment. Probably something like U.S. equipment being subtracted twice. So better wait to merge until this is resolved.

@peyre
Copy link
Member

peyre commented Aug 19, 2020

Thanks for the heads-up! Keep me posted.

@rnyoakum rnyoakum mentioned this pull request Aug 19, 2020
Removed some ancient code to test for the MAIL global variable in
AstroTurn(). Since we are only calling AstroTurn via Update() after the
Soviet turn, we can update naut and hardware data exactly as in regular
games.
@hweimer
Copy link
Contributor Author

hweimer commented Aug 19, 2020

It was exactly one of these ancient codepaths. Removing the tests for the MAIL global variable in AstroTurn() fixes the problem and also ensures that astronaut data is updated correctly. The diff looks much bigger than it is because of the changed indentation. At the end of the day, it's just something like three if clauses being removed.

I just played a mail game into the early 60s and didn't notice anything odd.

@rnyoakum rnyoakum changed the base branch from master to development August 20, 2020 02:01
@rnyoakum rnyoakum merged commit 5f558a3 into raceintospace:development Aug 20, 2020
@hweimer hweimer deleted the pbm branch September 9, 2020 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Play-by-Email (PBEM) missing

3 participants