triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.3k stars 387 forks source link

Progress Bars of "Download Maps" Change Directly from 0 to 100% (2.6.14732) #12563

Open Cernelius opened 2 months ago

Cernelius commented 2 months ago

The progress bars which you get upon downloading maps remain at 0% until the map is downloaded, changing to 100% at that point. It used to work as anyone would assume a progress bar should work in the past, and I think it would be a serious problem for heavy maps especially when you are waiting for someone else to download the map (especially in multi-player games with inexperienced players). Moreover, users may just assume that the downloading is not happening at all (especially if it takes a long time to turn to 100%).

DanVanAtta commented 2 months ago

This is a bit of a known problem. The way this works is being re-designed and would be fixed if we can get the maps-server running properly. The issue is the client software (TripleA) in this request sends a web request for the download file size. (I can't quite recall whether this is an HTTP HEAD request or if it is a web-services request to github-API). Regardless, this request fails pretty frequently. Without knowing the total size of the download, we get the observed behavior.

Maps server will fix this as the payload that drives the data in the download screen would include a pre-computed file size that is computed by the maps-server.

Cernelius commented 2 months ago

So I suppose this is for after the 2.6 is released.

Can something be added to tell the 2.6 users to be patient while their maps are at 0% download progress? I think it is obvious one will assume they are not progressing at all by being shown a fixed 0% in the bar.

DanVanAtta commented 2 months ago

Ah, I did not realize this is an all-the-time issue rather than some of the time.

Cernelius commented 2 months ago

I've tested with the latest and am not seeing any difference in the behaviour.

Cernelius commented 2 months ago

In 2.5, you don't have the 0 to 100% thing, but it shows the already downloaded MB while the download is in progress. That is hardly helpful in the moment you don't know the total MB for the map, but at least it gives the information that the download is proceeding.

Cernelius commented 2 months ago

If the 0~100% concept has issues, how about going back showing the MB already downloaded while in progress (as per 2.5) but also telling the total MB for the map somewhere (so the user himself/herself can figure it out)?

Cernelius commented 2 months ago

I'm reclosing this as "not planned" because I'm not seeing how the new behaviour actually fixes what I've described, but let me know if I'm missing something.

DanVanAtta commented 2 months ago

@Cernelius - thanks. I was seeing something a bit different, the progress bar showed 100% but kept "spinning". I think the related fix only helped that.

how about going back showing the MB already downloaded while in progress (as per 2.5)

I think this is the right suggestion. Though, given limited time, I'm more inclined to leave as-is & proceed with efforts for the 'map-server'

but also telling the total MB for the map somewhere (so the user himself/herself can figure it out)?

Yeah, the system has the same problem as the user! The download bar also does not know how long the download is in total. The way it works is measuring how much has been written to disk. We had a previous solution to send an HTTP HEAD request to get the download size, but that often failed to the extent it did not work. Maps server is a solution again here as it downloads every revision of every map and stores in a database how large the download is.

Cernelius commented 2 months ago

I would say let's not have a confusing display in Downloaded Maps for the next release (especially in the moment TripleA comes with none of them) if something like what at the current release can be brought back with little time and effort.

(Every map-maker can add the information on the dimension of his/her map in the description.)

Cernelius commented 2 months ago

Let's not forget that it is possible to have maps which are (almost) 1 GB. Imagine someone with slow connection downloading a 1 GB map with the progress bar dead at 0% for a very long time and no information about how heavy the map is. I surmise that most users would just interrupt the download after some time assuming that it is not working.

Cernelius commented 1 month ago

Maybe this issue should be re-opened.

Anyway, with reference to

https://forums.triplea-game.org/topic/888/middle-earth-battle-for-arda-official-thread/531

it may be that sometimes the downloader shows 100% while the map is still downloading, so, if you go for the game right away, it won't be there. However, I'm not sure that there is actually this problem.

Cernelius commented 1 month ago

But I confirm that this thing looks bad user-wise (staring at a fixed 0% instead of at least at something showing that the download is in progress), so I'd argue that this is still an issue and subjectively a behavioural downgrade from 2.5, so I re-open it.

Cernelius commented 2 weeks ago

Downloading "Elemental Forces" reminded me how bad it is to wait before a 0% bar not even letting you know if the download is proceeding at all.

Is there any other developer available for just getting back to the better 2.5 behaviour?

Cernelius commented 2 days ago

It's even worse than that at least sometimes.

I've just downloaded "1941 Global Command Decision".

The first time it hit 100%, and I closed shortly after getting that value, yet the game was nowhere to be found.

Then I downloaded again from start, and again the game had not been downloaded upon showing 100%, so I waited, and it went back to 0% and then again to 100%, and at this point (or shortly thereafter) the game was actually downloaded successfully.

Something like what I described had already been reported somewhere by somebody if I recall correctly.