No Description

Kirk Trombley e5f1f6e23c README update 5 years ago
client 50228856bc Turning HomePage back into a nicely split up component 5 years ago
docker 0ea38a36cd Changing the nginx conf to allow subpath routing for future use 5 years ago
server 510e81cbca Finally making some improvements to scoring 5 years ago
.dockerignore 34eb2cd10b Big swath of reorganizing now that the deployment path is clear 5 years ago
.gitignore 7ca163d654 Putting an API key that is only for the static streetview api in the back-end, removing unneeded api endpoint 5 years ago
README.md e5f1f6e23c README update 5 years ago

README.md

Geoguessr Self-Hosted Reimplementation

Build Docker Image Tarball

./docker/build.sh

API

API Endpoints
GET /
    Returns 200 and {
        "version": string,
        "status": string
    }
PUT /game
    Accepts {
        "timer": number
        "rounds": number
    }
    Returns 200 and {
        "gameId": string
    }
GET /game/{ID}
    Returns 404 vs 200 and {
        "gameId": string,
        "timer": number,
        "coords": {
            "1": {
                "lat": number,
                "lng": number,
            }, ...
        },
        "players": [
            {
                "name": string,
                "currentRound": string || null,
                "totalScore": number,
                "guesses": {
                    "1": {
                        "lat": number,
                        "lng": number,
                        "score": number
                    }, ...
                }
            }, ...
        ]
    }
POST /game/{ID}/join
    Accepts {
        "playerName": string
    }
    Returns (401, 404, 409) vs 201 and {
        "playerId": string
    }
GET /game/{ID}/current
    Header Authorization: Player string
    Returns (400, 404) vs 200 and {
        "currentRound": string || null,
        "coord": {
            "lat": number,
            "lng": number,
        } || null,
        "timer": number
    }
POST /game/{ID}/guesses/{round}
    Header Authorization: Player string
    Accepts {
        "lat": number,
        "lng": number
    } OR {
        "timeout": boolean
    }
    Returns (400, 401, 404, 409) vs 201 and {
        "score": number,
        "totalScore": number,
        "distance": number || null,
    }

Next Steps

  • Improve MapCrunch logic to distribute countries
  • Asynchronously generate locations, allowing game creation to appear faster
  • Improve error handling in UI
  • Re-join a game you did not finish
  • Optimize docker file or set up compose structure
  • Override google controls in streetview, make custom divs
  • Join link should appear before you log in
  • Ivan's idea of launching a new lobby right from the end screen and updating all the other viewers
    • Add a "next game" field to game in db
    • Embed the game creation form in the summary page
  • Fix bug on UI drawing timeout flags offscreen
  • Modify scoring to linear interp in the middle