Skip to content

feat: add server browser map previews - #31

Merged
RoflikBEST merged 1 commit into
BestProjectTeam:mainfrom
XJle6uIIIeK:map-preview
Sep 21, 2026
Merged

RoflikBEST merged 1 commit into
BestProjectTeam:mainfrom
XJle6uIIIeK:map-preview

Conversation

@XJle6uIIIeK

@XJle6uIIIeK XJle6uIIIeK commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Adds generated map previews to the server browser, shown after hovering a server entry.

What changed

  • Adds a background map preview manager with download, generation, cache loading and prioritization.
  • Prioritizes the map currently being hovered while continuing background processing for other maps.
  • Uses map URL, SHA-256 and size metadata from the server list when available.
  • Supports DDNet SHA-256 downloaded-map filenames and community map URLs.
  • Generates previews directly from downloaded map files.
  • Renders original embedded/external map textures instead of a placeholder representation.
  • Preserves map background/parallax zoom when generating the preview.
  • Caches generated PNG previews so subsequent hovers do not regenerate the map.
  • Shows preview/status UI in the server browser without changing gameplay or map physics.

Validation

  • git diff --check passes.
  • The same generated source revision was built successfully as the Windows x64 game-client in CI before moving it into this fork.
  • The final PR branch is based directly on BestProjectTeam/BestClient@909b4aafe1b4a82e5e559e06ea419b9c9fa53479.

Checklist

  • Tested the change ingame
  • Provided screenshots if it is a visual change
  • Tested in combination with possibly related configuration options
  • Written a unit test (especially base/) or added coverage to integration test
  • Considered possible null pointers and out of bounds array indexing
  • Changed no physics that affect existing maps
  • Tested the change with ASan+UBSan or valgrind's memcheck (optional)
  • I didn't use generative AI to generate more than single-line completions

@XJle6uIIIeK

Copy link
Copy Markdown
Contributor Author
image image

@RoflikBEST

Copy link
Copy Markdown
Contributor

yo, I've been wanting to implement such a feature for a long time, thank you

@RoflikBEST

Copy link
Copy Markdown
Contributor

I will accept the request and then reverse it, because I am currently working on 3.0, I will transfer the implementation there.

@RoflikBEST
RoflikBEST merged commit 6469de1 into BestProjectTeam:main Sep 21, 2026
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