Skip to content

Kryonet & Networking

guidota edited this page Feb 7, 2020 · 1 revision

Kryonet

This library wraps Kryo functionality and basically allow us to use it in both sides (client and server) so we can send Java Objects. Read more about Kryonet

Networking

If we understand how ECS works, we can say that the Server will have the real World and clients will see a portion of that same World. The reason is simple: to make it more efficient A client will be interested on things that it should know, for example, if a user is in map 1, same user doesn't care what's happening in other maps and even what happens on other far away parts of the map. The solution is to keep relations between near entities, let say what entities are around X tiles (X = 30 TBD).

How it works

With EntityUpdate and RemoveEntity classes, we can do all what we want and is very intuitive. Client will be in charge of send user input (Requests), so Server can process that input and notify corresponding near users with (EntityUpdate, RemoveEntity and Responses).

Get Starting

Requirements

Source Code

Reference

run

Graphics

balance

external documentation

Clone this wiki locally