Skip to content

Improve delay between load complete and game starting - #21207

Merged
PunkPun merged 2 commits into
OpenRA:bleedfrom
RoosterDragon:start-fidelity
Nov 12, 2023
Merged

Improve delay between load complete and game starting#21207
PunkPun merged 2 commits into
OpenRA:bleedfrom
RoosterDragon:start-fidelity

Conversation

@RoosterDragon

@RoosterDragon RoosterDragon commented Nov 12, 2023

Copy link
Copy Markdown
Member

Improve the delay from load screen disappearing to gaining control when starting a new game.


Ensure PerfHistory is reset when starting a new game.

Ensure stale perf history data, to ensure the data is useful and the perf graph widget displays useful information.

  • Remove stale data from the previous game when starting a new game. This avoids the graph showing values from the previous game when a new game starts.
  • Remove data that was collected during loading. This avoids displaying data points that were collected whilst the loading screen was visible. Data collected whilst loading is not relevant to the in-game performance graph.

The performance graph when starting a new game will now display accurate information from the first tick of the game, whereas previously it displayed some stale information as well.


Play game started audio notifications just as the game starts.

Previously the StartGameNotification and MusicPlaylist traits used the IWorldLoaded interface to play an audio notification and begin music when the game started. However this interface is used by many traits to perform initial loading whilst the load screen was visible, and this loading can take time. Since the traits could run in any order, then audio notification might fire before another trait with a long loading time. This is not ideal as we want the time between the audio notification occurring and the player being able to interact to be as short and reliable as possible.

Now, we introduce a new IPostWorldLoaded which runs after all other loading activity, and we switch StartGameNotification and MusicPlaylist to use it. This allows timing sensitive traits that want to run right at the end of loading to fire reliably and with minimal delay. The player perception of hearing the notification and being able to interact is now much snappier.

Ensure stale perf history data, to ensure the data is useful and the perf graph widget displays useful information.
- Remove stale data from the previous game when starting a new game. This avoids the graph showing values from the previous game when a new game starts.
- Remove data that was collected during loading. This avoids displaying data points that were collected whilst the loading screen was visible. Data collected whilst loading is not relevant to the in-game performance graph.

The performance graph when starting a new game will now display accurate information from the first tick of the game, whereas previously it displayed some stale information as well.
Previously the StartGameNotification and MusicPlaylist traits used the IWorldLoaded interface to play an audio notification and begin music when the game started. However this interface is used by many traits to perform initial loading whilst the load screen was visible, and this loading can take time. Since the traits could run in any order, then audio notification might fire before another trait with a long loading time. This is not ideal as we want the time between the audio notification occurring and the player being able to interact to be as short and reliable as possible.

Now, we introduce a new IPostWorldLoaded which runs after all other loading activity, and we switch StartGameNotification and MusicPlaylist to use it. This allows timing sensitive traits that want to run right at the end of loading to fire reliably and with minimal delay. The player perception of hearing the notification and being able to interact is now much snappier.
@PunkPun

PunkPun commented Nov 12, 2023

Copy link
Copy Markdown
Member

Could you also fix #17445

This PR:

Screen.Recording.2023-11-12.at.19.24.48.mov

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PunkPun
PunkPun merged commit 31c3766 into OpenRA:bleed Nov 12, 2023
@PunkPun

PunkPun commented Nov 12, 2023

Copy link
Copy Markdown
Member

Changelog

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.

2 participants