- removed protocol.Event: CNPeers now send protocol.PacketEvents
- peer uData is held in CNPeer, use SetUserData() and UserData() to
set/read it
- Service.PacketHandler calback has changed, removed uData:
switched calls to peer.SetUserData() and peer.UserData() where appropriate
- service.Service lots of tidying up, removed dependence on old
protocol.Event.
- service.Service && protocol.CNPeer now accept a cancelable context.
hooray graceful shutdowns and unit tests!
- general cleanup
started out as me making a service abstraction..
- db.Player exists again, and entity.Player uses it as an embedded struct
- chunk.ForEachEntity() lets you add/remove entities during iteration now
- removed account related fields from CNPeer
- protocol/pool has been merged with protocol.
use protocol.GetBuffer() and protocol.PutBuffer().
- new protocol/internal/service!
service.Service is an abstraction layer to handle multiple CNPeer*
connections and allows you to associate each with an interface{} uData.
In the future it might also handle a task queue for jobs that
modify/interact with the player's uData, called from service.handleEvents()
- PacketHandler callback type has a new param! uData is passed as well now
- much of loginserver/shardserver is now handled by the shared service
abstraction
- SHARD: NPC_ENTER packets are now sent on player loading complete
rather than on enter.
you should be able to view other players and jump around together,
although while testing locally one of the clients would always trigger
the "Some irregularities have been found with your connection to the
server, so your game will be closed" speed check for some reason ???
really not sure, might just be my machine
chunking uhhh works ? kind of, not tested for more than a few seconds
before one of the clients disconnects
- loginMetadata is passed to shards through redis now
- shards announce they're alive via redis.AnnounceShard() which just
populates a hashset keyed 'shards'
- login servers grab the 'shards' hashset and randomly picks a shard to
pass the player to (for now)
- ./service shard && ./service login
- Many new environment variables, check config/config.go for more info.
or for a tl;dr just read the Dockerfile for the required ones
- Shard and login services now run in different processes ! (and
containers?? wooaaah)