-
Notifications
You must be signed in to change notification settings - Fork 8
Server structure
clonejo edited this page Mar 13, 2012
·
5 revisions
This is not a final state, but a merely a proposal.
- one process listening for new connections
- per client:
- one process for receiving packets, notifies chunk and entity manager of position updates
- one process for managing chunks
- knows which chunks each client has loaded
- sends chunks to client / unloads chunks from client according to position updates
- one process for managing entities
- knows which entities each client has loaded
- informs clients about entities near, unloads entities from clients if necessary, according to position updates
- ets table for storing a list of clients (player name, receiving process id, socket for sending packets)
- chunks
- socket ids to send packets to a client from any process
- player list
- one process enough for several points?
- receive packets
- send packets (needed? is gen_tcp:send/2 an atomic operation?)
- entity simulation -> players, animals, mobs, pickups
- split up because of different sight ranges?
- send chunks to clients when necessary