Spore-Community / ModBrowser

A tool for browsing and downloading Spore mods from GitHub
https://mods.sporecommunity.com/
MIT License
7 stars 1 forks source link

Mod images #9

Open Kade-N opened 3 years ago

Kade-N commented 3 years ago

Add a system for pulling images from the github repo, to provide a preview

This image could be displayed to the left of the buttons, and just wrap the description narrower (this would probably be cleanest, since not all mods will have images)

cpoftea commented 3 years ago

What aspect-ratio would have the image (lets call it thumbnail) if it would be pulled from the mod repo? And what about resolution? Without some rules there may occur some performance downgrades and expensive traffic, while loading some 2K screenshot because mod author didn't know Maybe thumbnails even should be optimized and cached

Splitwirez commented 3 years ago

Mod Identity presently includes support for logos (shown in mods' configurators), and icons are presently on the roadmap. Currently, only PNG logos are supported, but I do hope to look into allowing for SVG logos/icons as well.

I'm open to any Spore Mod Browser-related considerations anyone feels are worth sharing, though I make no promises.

Kade-N commented 3 years ago

I think the best option would be to encourage a screenshot of the mod in action, since this would be both easy for the mod developer to do (at least for mods with visible changes), and clear to a potential user. For example a parts mod might show a creature in the editor that uses the mod, a UI mod would have a picture of the UI, a custom galaxy layout would have a screenshot of it...

So likely 16x9 and 4x3 aspect ratios recommended. Of course, there's nothing forcing mod authors to use a screenshot, they could also make a custom logo at this aspect ratio.

Smaller (presumably square/circle) icons could work too, they could maybe appear on the left, next to the title. If no icon is set, maybe default to a category-specific icon?

Caching images is not really an option, since it doesn't actually run on a server (one of my main goals, both to keep costs at 0, and allow it to work indefinitely, even if not maintained), it's entirely running inside the browser. The images would likely come from the same place as the ModInfo.xml which currently is just the github repo, so github would be the CDN.

I think it would be possible to get the filesize of the image, if it's too large, refuse to display it.

cpoftea commented 3 years ago

Some tests of image placement based on @KyleNanakdewa description with different heading length and image aspect-ratios