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

How to generate state maps? #95

Open
fiatjaf opened this issue Jun 21, 2020 · 1 comment
Open

How to generate state maps? #95

fiatjaf opened this issue Jun 21, 2020 · 1 comment

Comments

@fiatjaf
Copy link

fiatjaf commented Jun 21, 2020

Hello and thank you for this awesome project.

I'm trying to understand exactly what this library does. I've managed to get the basic adjudication functionality from the examples and reading the code at /gae and that alone is very useful.

However I see that there are maps involved in the codebase and I don't understand their function. Are they there because you extract variant movement possibilities from the maps themselves by reading each SVG and determining which province touches each other and what is sea/land etc.? Or are the maps there so the library can print maps for a given described state? Or both?

In that case, how should one proceed to generate a map? (I'm trying to write a game client that would generate static images of each state/season.)

@zond
Copy link
Owner

zond commented Jun 21, 2020

The maps are there as a convenience for services using this adjudicator - it's very hard to make a useful service with only the adjudicator and no maps, so godip provides both.

If you look at the only service I know of that uses this adjudicator, https://github.com/zond/diplicity, you can find e.g. https://github.com/zond/diplicity/blob/master/static/js/dippymap.js that helps client applications use these maps to render game states. You can also look at https://github.com/zond/dipact/blob/master/resources/js/dip_map.js that is the map-drawing class of the current production client for that service, and see how it draws the maps.

@Wulfheart Wulfheart mentioned this issue Dec 4, 2023
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

No branches or pull requests

2 participants