GithubHelp home page GithubHelp logo

sonjafeitsch / city-knowledge-contest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fafeitsch/city-knowledge-contest

0.0 0.0 0.0 1.76 MB

A PvP online game to get to know your city better.

License: MIT License

Shell 0.38% JavaScript 0.21% Go 42.21% TypeScript 24.52% CSS 1.06% HTML 0.33% Dockerfile 0.48% SCSS 3.27% Svelte 27.55%

city-knowledge-contest's Introduction

City Knowledge Contest

Who knows finds the streets first? A PvP online game to get to know your city better.

The Game

Set up a room with your friends and find the required street first in the map of your city! Answer fast – get more points!

The game is currently in beta version.

Requirements

In order to play, you need meet three non-technical requirements:

  1. One or more list of streets. They must be provided in the following JSON format:

    {
        "country": "Germany",
        "city": "Würzburg",
        "name": "Würzburg",
        "map": {
            "center": {
              "lng": 9.931641,
              "lat": 49.793621
            },
            "boundingBox": {
              "minLat": 49.752880,
              "maxLat": 49.839865,
              "minLng": 9.837742,
              "maxLng": 10.051975
            },
            "minZoom": 14,
            "maxZoom": 18
        },
        "streets":["Ingolstadter Hof","Bahnhofstraße",]
    }

    The name property donates the name of the list as shown in the game setup.

    The streets array contains the list of streets that might be asked in game: Upon every round, the app will randomly choose a street and and query Nominatim for the solution. It will use country and city to refine the query.

    The map object contains:

    • the center of the map: all players start playing there
    • an optional boundingBox: players may only move within the bounding box. It prevents others from using the game's backend as tile server.
    • minZoom and maxZoom: self-explanatory. The initial zoom is the average from both values.
  2. Access to a Nominatim server. We recommend hosting your own Nominatim server. The Nominatim server is used to get the solution for the randomly chosen street, as well as for checking the players' answers.

  3. Access to an Openstreet Map Tile server. Per default, the app uses the publicly available OSM tile servers, but you might run into quota limits here. We strongly recommend using your own OSM tile server or buy an API quota on one of the available public servers.

Starting the server

The easiest way to start the server quickly is to use the Dockerfile to build an image:

build.sh and then start the server:

docker run -p 8081:23123 -it -v /path/to/streetlists:/streetlists city-contest

As shown above, you have to specify the streetlists directory. You can pass the flag --help to the docker container, which will print the list of available options (e.g. how to set your own Nominatim and OSM tile servers).

The server is then available in the browser at http://localhost:8081

Contributing

We are happy for contributions. You can either send a pull request for an idea of yours, or you can browse the open issues for a suitable task.

License

MIT License

city-knowledge-contest's People

Contributors

fafeitsch avatar sonjafeitsch avatar johnwalkerx avatar eduardhuck avatar hanniofhyrule avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.