Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a map to show player positions #10

Open
Istador opened this issue May 5, 2024 · 5 comments
Open

Add a map to show player positions #10

Istador opened this issue May 5, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Istador
Copy link
Owner

Istador commented May 5, 2024

It would be nice if the players dialog would show the in-game map with the positions of the players.

The data is available via the JSON API and is already passed to the browser from https://api.smoo.it/ so the only thing missing is using that that data in the website software.

Leaflet is very likely the library to use. I already have experience from the Pine Interactive Map, and the prototype map from speyejack also uses Leaflet.

The main thing missing currently is the map graphics. For copyright reasons the maps from the game should not be used. Instead what is needed are royalty-free open maps, preferable as scalable vector graphics (SVG).

The in-game coordinates should not be calculated into map / image coordinates. Instead the Leaflet coordinate system should equal the in-game coordinate system. The map images need to be mapped/transformed to the in-game coordinate system.

@Istador Istador added enhancement New feature or request help wanted Extra attention is needed labels May 5, 2024
@Istador Istador added this to SMOO May 5, 2024
@Istador Istador moved this to Todo in SMOO May 5, 2024
@theFra985
Copy link

Could I help with this or is it already something you are working on?
Additionally I think this feature could compromise the gameplay during H&S rounds as it would show player locations to anyone so I think there should be a way to toggle the feature during rounds (maybe through a discord bot?).

@LunaBroeke
Copy link
Contributor

The website is already able to detect if players are in H&S mode whereas the toggle for showing a map could still be based on whether the server is passing on the Status/Players/Position variable

What we'd need first and foremost is map images

@speyejack
Copy link
Collaborator

speyejack commented Jan 6, 2025

The map will be largely optional, but we can always have it implement a protection to avoid spoiling H&S. Originally it was implemented as an interesting thing to be recorded on the side for a video or something.

Having the maps would be really good, but the code mostly works its just janky. Hoping to have a better implementation later.

@theFra985
Copy link

IGN's interactive maps could be a good resource for the map images, but I honestly can't find any information about licensing. They are using leaflet as well, so the maps would already be correctly cut up for correct zoom level handling.

@Istador
Copy link
Owner Author

Istador commented Jan 10, 2025

Map images are still something missing and why this issue has the help wanted label.

Every server onboarded via the JSON API can decide via it's token permissions if it wants to spoil the coordinates of the players to the website or not (this is already working and fully functional). E.g. it could be disabled on a public H&S server but enabled on a Co-Op server. The current refresh rate on the website is every 1-3 minutes for onboarded servers (those with the player status).

I could think of once a working component is developed with images for all kingdoms, it could be modularized out of this repository to use in other scopes than on this website. E.g. on a local web server running with a faster refresh rate (seconds instead of minutes) which could then be used as a browser source for streams.

If the IGN images are shown without a license it means that we can't just use the images without a written permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

4 participants