Sem descrição

Kirk Trombley 791d94649b Modifying API to not accept a player name at game creation há 5 anos atrás
client 791d94649b Modifying API to not accept a player name at game creation há 5 anos atrás
docker 0ea38a36cd Changing the nginx conf to allow subpath routing for future use há 5 anos atrás
server 791d94649b Modifying API to not accept a player name at game creation há 5 anos atrás
.dockerignore 34eb2cd10b Big swath of reorganizing now that the deployment path is clear há 5 anos atrás
.gitignore 7ca163d654 Putting an API key that is only for the static streetview api in the back-end, removing unneeded api endpoint há 5 anos atrás
README.md 791d94649b Modifying API to not accept a player name at game creation há 5 anos atrás

README.md

Geoguessr Self-Hosted Reimplementation

Build Docker Image Tarball

./docker/build.sh

API

API Endpoints
GET /
    Returns {
        "version": string,
        "status": string
    }
PUT /game
    Accepts {
        "timer": number
    }
    Returns {
        "gameId": string
    }
GET /game/{ID}
    Returns {
        "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
    Header Authorization: Name string
    Returns 201 vs 401
GET /game/{ID}/current
    Header Authorization: Name string
    Returns {
        "currentRound": string || null,
        "coord": {
            "lat": number,
            "lng": number,
        } || null,
        "timer": 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

  • Improve scoring math
  • Improve MapCrunch logic to distribute countries
  • Asynchronously generate locations, allowing game creation to appear faster
  • Update UI to create game without providing a name
  • Genericize number of rounds in API
  • Change UI to allow round number setting
  • Change join API to take player name as body argument and return ID
  • Use player ID "auth" in API instead of name
  • 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