Skip to content

Connection screen improvements

Ashnal requested to merge bird/Kart-Public:conenction-screen-improvements into next

This makes significant changes to the Connection Screen Ticker.

It adjusts the control flow of CL_ServerConnectionTicker down to CL_ServerConnectionSearchTicker, CL_FinishedFileList, CL_CheckFiles and CL_LoadServerFiles. It also updates CL_DrawConnectionStatus to be more informative.

The main goal of these is to inform users the progress of the connection process, especially when it takes longer with highly modded servers. It also prevents the game from going unresponsive while doing file operations, which was particularly bad for users with poor performing storage. It does this by limiting file searches and file loads to one per tic. This is accomplished by allowing CL_CheckFiles and CL_LoadServerFiles to return after every file operation, and be called multiple times over multiple tics.

kart0027

File status now has a new enum value, FS_NOTCHECKED to assist with this tracking. It differentiates between a file that hasn't been searched for on disk, and one that has been, but wasn't found. FS_NOTCHECKED is now the default initial file status. There is a new client state, CL_LOADFILES, which handles the loop for file loading and the status drawing.

When downloading, the connection screen now sports a two progress bar look. The upper is the same as the previous bar, showing the current file download progress, while the lower bar shows the overall X/X files to download. Very nice to have when you potentially have to download up to 119 files.

After all files are present on disk, previously, the game would lock up as it full loops loading files. This has been changed to allow the ticker to run between each file loaded, to prevent windows (or other OS window managers) from assuming the program is unresponsive (and informing the user of that). It also now sports a progress bar to show how many files the game has loaded, out of how many total it needs to load to join the server.

Should eliminate people from coming into #tech-support claiming the game crashed, when it was actually loading files off of a slow disk.

There shouldn't be much difference when joining vanilla servers. The improvements are readily apparent when joining servers like my own Casual Army, or PPPP, which have a lot of files.

UPDATE: Overall progress bar now displays total size of downloads and number of files simultaneously, and the progress bar updates based on total size. improvedoverallprogress

New download confirm screens notfulldownload

Allows downloads even when the server is full fulldownload

Client will wait on connection screen for a slot if the server is full, for up to 5 minutes. waittojoin

Edited by Ashnal

Merge request reports

Loading