summaryrefslogtreecommitdiff
path: root/net.txt
blob: d9d113ff51d653b6f8cd05f206ad0ab2c9346902 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
c2s:
ppos {x,y}
	this player has moved to position x,y

settile {q,r,tile}
	set tile at H(q,r) to tile (currently boolean)

reqchunk {u,v} 
	request chunk data for chunk at chunkpos u,v

chat {msg}
	send chat message msg 

handshake {username}
	sent on join

s2c:
playerinfopart:: {id,x,y,color:[r,g,b]}

join {pl=playerinfopart}
 a player has joined. also sent on connection for each existing player

you {pl=playerinfopart}
	sent on connection to tell client about its own player

leave {id}
	player with id id has left

move {id,x,y}
	player with id id has moved to (x,y)

chunk {tiles=[array of 128*128 tiles],u,v}
	chunk at chunkpos u,v has tile data tiles

settile {q,r,tile} 
	tile at H(q,r) was set to tile

chat {msg}
	recieve chat message msg

give {tile}
	gain 1x tile in your inventory