Page MenuHomeWildfire Games

Do not show the un-randomised game settings when starting an MP game
Changes PlannedPublic

Authored by wraitii on Nov 10 2020, 3:20 PM.

Details

Reviewers
None
Summary

When starting an MP game, the "random" game settings are un-randomised. For a brief moment, they are shown unrandomised to the players (at least the host, but I think this might affect all players).

This isn't desired for obvious reasons.

The cause is that we call "StartNetworkGame" right away but only switch to the loading screen when receiving the "start" net message, which usually happens after the game settings are updated to their real values (in GameSettingsControl.js::onLaunchGame).

Fixing this is not trivial. My solution involves the server sending a "start failed" message, in case of failure, and changing from switching to Pushing the loading screen. This seems to work fine in both MP and SP since the loading screen is not particularly special.
Unfortunately, simply "going back" to the gamesetup is essentially unfeasible right now.

Test Plan

To reproduce:

  • Host an MP game with some visible "random" settings
  • click start
  • observe as the randomness vanishes in front of your eyes.

You might need a slow computer.

Event Timeline

wraitii created this revision.Nov 10 2020, 3:20 PM
wraitii added inline comments.Nov 10 2020, 3:25 PM
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/Panels/Buttons/StartGameButton.js
33

forgot to remove that

source/network/NetMessages.h
38

This is what is _actually_ meant as far as I can tell.

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1819/display/redirect

wraitii requested review of this revision.Nov 10 2020, 3:30 PM

You can see the chosen map when the game loads, so this is, IMHO, not really that important :)

You can see the chosen map when the game loads, so this is, IMHO, not really that important :)

It also affects civilisations, which is a bigger problem IMO.

wraitii planned changes to this revision.Jan 26 2021, 6:02 PM

I think with D3243 it'll be possible to do this cleanly