A (much) better Web interface for the community Xonotic Map Repository
I'm playing Xonotic and I liked it. So that I want more maps.
Seeking around, I've found a community repo: http://xonotic.fps.gratis. (Note: the page loads a lot of data)
Great work! A large amount of maps are collected, but the browsing experience isn't satisfying. Let me try to make one.
In contrast to the Original frontend, this one have:
- Xonotic-like style/theme, cool
- Grid or Compact view, no more horizontal scrolling
- Loading, Search, Sort & Filter, all being quick
- Share a link of your filter configuration to your friends
And technically more:
- No tons of "libraries" bloating the page
- Only load about 2.0 MiB compact binary data (for ~15,000 maps), no more 8.9 MiB json (it may be used if required)
Enabling HTTP gz/lzma compression will reduce it even more - I18n support available, though needs community effort
Besides that, a Go program is available to convert the json data (used in Original frontend/backend) to binary format.
Please note that, for it's early, some potential inconsistency needs to be solved. See notes and todo. Expecting your feedback!
The Easy route: well, wait for this to be hosted somewhere
The Dev's route:
- Clone this repository,
cd
to it - Fetch the
maps.json
from Upstream: https://xonotic.fps.gratis/maps.json
Put to this directory - With Golang installed, run
go build
in terminal - Run the built executable to convert json to binary format:
./xonotic-map-repo conv maps.json
- You will get 3 files,
maps-meta.json
,maps-data1.bin
,maps-data2.bin
.
Move them towww/
- Start a server with:
./xonotic-map-repo serve 8080
,
or use any static server you like, root atwww/
- Go to
http://127.0.0.1:8080
and enjoy
(Note that it will use the Upstream for Mapshots and Downloads. Configurable inwww/config.json
)
This project as a whole is licensed under MIT/Expat License, as in LICENSE
.
For individual JavaScript files, see www/jslicense.html
.
In www/fonts/
, the Xolonium font is released under GPL-2-or-later with embedding exception, and the icomoon.ttf
is from the Original frontend repo without modification in MIT/Expat License.
- @-z- for his work on a community repository, and keep hosting it
- Every map makers & game contributors, and the awesome game
- The spirit of Software Freedom and Software Minimalism