legacyclonk / LegacyClonk

The LegacyClonk engine and the c4group command line tool.
https://clonkspot.org/lc-en
Other
83 stars 18 forks source link

Display thumbnails on network overview #32

Open Somebodyisnobody opened 4 years ago

Somebodyisnobody commented 4 years ago

clonkspot.org has a thumbnail database. It would be nice to have these previews in the network menu. LC could get the images from clonkspot.org every call but that would increase loading times. There's also an option to add the images to the system.c4g for example and distribute it via update.

Fulgen301 commented 4 years ago

The thumbnail database consists of uploaded scenario title graphics which got uploaded with Quit's tool - basically just a title image display. However, as a separate image, they'd just occupy precious space - and downloading them from Clonkspot requires downloading title images just for showing the network list, which is overkill at best.

There's also an option to add the images to the system.c4g for example and distribute it via update.

System.c4g isn't for graphics, that'd be Graphics.c4g. And apart from dramatically increasing group sizes, there isn't even a good reason to do that - they're title images, they can change whenever the scenario designer decides do.

ckanibal commented 4 years ago

I do like the idea. Since you are not usually playing Clonk over a metered connection (e.g. 3G/LTE), the traffic shouldn't be that much of a problem. The pictures are also transferred when you open the masterserver overview on clonkspot in your browser.

Might be worth caching them as long as the engine is running though.

Somebodyisnobody commented 4 years ago

I tought about it the last days: The caching option would be a good solution: LC checks before downloading if the thumbnail-hash is equal. If it's not, the "updated" image is being downloaded. The images are cached in the user directory (e.g. "%appdata%\Clonk Rage") and being identified by c4s-hash. This concept sould solve all technical problems exept Fulgen's high-speed LTE connection :)

My opinions about the comments:

However, as a separate image, they'd just occupy precious space

better than these generic icons... Let's give LC a new look. A blue lightning doesn't say anything about the scenario.

they can change whenever the scenario designer decides do.

Then Quit's uploader is broken by design.

Fulgen301 commented 4 years ago

Let's give LC a new look.

I actually had the idea of displaying the title image a while ago (a year minimum). I wanted them to be displayed as a gradient with the right point as alpha = 0, making them fully visible on the left and transparent on the right. The problem was: CStdDDraw didn't support that, and I didn't have any clue of OpenGL programming. Nowadays, this might actually be a lot easier...

Then Quit's uploader is broken by design.

I don't see why Quit's uploader is to blame if a scenario designer updates his scenario. It's a tool you have to run manually, after all. (Basically, it's just a POST request with the title file to the right path.)