-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhathora.yml
More file actions
30 lines (27 loc) · 838 Bytes
/
hathora.yml
File metadata and controls
30 lines (27 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
types:
# Location is a 2d coordinate
Location:
x: float
y: float
# Player has a userId and a location
Player:
id: UserId
location: Location
# GameState has an array of players and a flag indicating whether or not the this user is the imposter
GameState:
players: Player[]
methods:
# joinGame will let players join the lobby until the game starts
joinGame:
# we'll call moveTo when the user clicks on the map to set their target location
moveTo:
location: Location
# use anonymous authentication to keep things simple for now
auth:
anonymous: {}
# tell the server to send the value of GameState to all clients (and keep it updated as state changes)
userState: GameState
# set the error type to string
error: string
# configure the server tick to run every 50ms (20 times a second)
tick: 50