virtualenv env
env/bin/activate
pip install -r requirements.txt
python main.py gen-map GENRATORNAME
python main.py gen-map dummy
Client Server
join->
<-init
key_press->
<-update
key_press->
<-update
# player disconnect
type: init
data:
self:
coords: (0, 0)
color: 254
map:
- - (0, 0)
- 'wall'
- true, true # seen, is_visible
- - (3, 1)
- 'floor'
- true, false # seen, is_visible
...
players:
uid123:
coords: (0, 0)
color: 254
uid234:
coords: (0, 0)
color: 254
creatures:
uid345:
type: blob
coords: (0, 0)
is_visible: true,
color: 254
same as init, but only changes
type: update
data: ...
since update just sends the updates, and a non-existing player would not be part od the update, we need to remove them explicitly
type: remove_players
data:
- uid1
- uid2
...
type: remove_creatures
data:
- uid42