Skip to content

Point system

Coder Gautam edited this page Dec 14, 2024 · 1 revision

Calculating points correctly is highly important to ensure a fun and balanced game. We adopt GeoGuessr's 5000 point approach, based on the maximum distance possible and an exponential decay function.

image

Implementation

In WorldGuessr, points are implemented in components/calcPoints.js

https://github.com/codergautam/worldguessr/blob/master/components/calcPoints.js

Parameter Type Description
lat Number Latitude of the actual location.
lon Number Longitude of the actual location.
guessLat Number Latitude of the guessed location.
guessLon Number Longitude of the guessed location.
usedHint Boolean Indicates if a hint was used during the guess.
maxDist Number Maximum distance of any 2 points in the chosen map (in km). Pass in 20000 when playing the World map

Hint

Hints are allowed only in singleplayer, mainly to help new players gain intuition for the game. It draws a circle containing the correct answer (make sure to not put the correct answer in the center as it makes it obvious!)

It affects their points by a scale factor of 0.5 (divides their points by 2)

For the specific implementation of the hint system on the map, refer to components/Map

WorldGuessr Wiki

Clone this wiki locally