v0.1.3 alpha
yes
Guess
is the classic mode where you get a random location and goes on forever.
Daily
is a mode where you get 5 new locations every day and can compete against others
Both modes have a real time cooperation capabilities. It works by having a session id in the url. If you share the url with someone else, you will be in the same session.
Daily mode has a extra feature where you can compete against your friends. A group is automatically created when you start a new daily session. You can share the group id with your friends and they can join the group. You can then see how you are doing against each other.
I created some diagrams early on to somewhat explain how the whole thing works. It might or might not make sense.
No. Pointguessr is greatly inspired by Timeguessr. This is somewhat a clone, but was not meant to be finished or released. The motivation was to create a similar game more focused on cooperation and team play while exploring the Elixir/OTP ecosystem and Phoenix framework.
You can use the github-repo and create an issue or an discussion
You can toy around with the scoring parameters here:
Pointguessr Score Tuner
. I would love feedback on the scoring parameters, I just winged it.
This is the scoring code:
defmodule Pointguessr.Score do
@year_decay 20
@distance_decay 969
@base_score 5000
@doc """
Calculate the score for a given distance and year difference.
## Parameters
* `:distance` - The distance in meters
* `:year` - The difference in years
"""
def calculate(:year, year_difference) do
calculate(:year, year_difference, @year_decay)
end
def calculate(:distance, distance) do
calculate(:distance, distance, @distance_decay)
end
def calculate(:distance, distance, decay_factor) do
# From meters to kilometers
distance = distance / 1000
(@base_score * :math.exp(-distance / decay_factor)) |> max(0) |> round()
end
def calculate(:year, year_difference, decay_factor) do
year_difference = abs(year_difference)
max_difference = 50
if year_difference <= max_difference do
(@base_score * :math.exp(-year_difference / decay_factor)) |> round()
else
0
end
end
end