暫無描述

Kirk Trombley a3e17eb2bd Whoops - name collision 5 年之前
client 5289d5c7f1 Rewriting Game Panel to use hooks 5 年之前
docker 355a5080a0 Dockerfile fixes and cleanup 5 年之前
server a3e17eb2bd Whoops - name collision 5 年之前
.dockerignore 34eb2cd10b Big swath of reorganizing now that the deployment path is clear 5 年之前
.gitignore 7ca163d654 Putting an API key that is only for the static streetview api in the back-end, removing unneeded api endpoint 5 年之前
README.md 1a18c722f4 Refactoring the back-end a little 5 年之前

README.md

Geoguessr Self-Hosted Reimplementation

Build Docker Image Tarball

./docker/build.sh

API

API Endpoints
GET /
    Returns {
        "version": string,
        "status": string
    }
PUT /game
    Header Authorization: Name string
    Accepts {
        "timer": number
    }
    Returns {
        "gameId": string
    }
GET /game/{ID}
    Returns {
        "gameId": string,
        "creator": 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
    Header Authorization: Name string
    Returns 201 vs 401
GET /game/{ID}/guesses
    Header Authorization: Name string
    Returns {
        "currentRound": string || null,
        "guesses": {
            "1": {
                "lat": number,
                "lng": number,
                "score": number
            }, ...
        }
    }
POST /game/{ID}/guesses/{round}
    Header Authorization: Name string
    Accepts {
        "lat": number,
        "lng": number
    } OR {
        "timeout": boolean
    }
    Returns 400 vs 201 and {
        "score": number,
        "totalScore": number,
        "distance": number || null,
    }

Next Steps

  • Refactor round tracking in database logic
  • Improve MapCrunch logic to distribute countries
  • Genericize number of rounds
  • Genericize round timer in UI
  • Finalize scoring formula
  • Track name via tokens
  • Error handling in UI
  • Navigate directly to summary page
  • Navigate directly to joining a game
  • Re-join a game you did not finish
  • Show current best on round summary
  • Round summary should use dynamic map
  • Styling and layout improvements
  • Optimize docker file or set up compose structure
  • Override google controls in streetview, make custom divs