More fleshing out of networking

This commit is contained in:
2020-05-09 09:56:03 -05:00
parent bae6a6a332
commit e94f2582f9
7 changed files with 61 additions and 25 deletions

View File

@@ -1,7 +1,6 @@
class IMICFPS
module Networking
module Protocol
MAX_CLIENTS = 32
MAX_PACKET_SIZE = 1024
PROTOCOL_VERSION = 0 # int
HEARTBEAT_INTERVAL = 250 # ms
@@ -22,11 +21,13 @@ class IMICFPS
heartbeat
# game data packets
client_connected
client_disconnected
entity_move
snapshot
player_joined
player_left
play_sound_effect
create_particle
create_entity
remove_entity
}
# emulate c-like enum