-
Notifications
You must be signed in to change notification settings - Fork 0
Multiplayer
ImTallone edited this page Apr 1, 2019
·
2 revisions
Multiplayer in PowerHigh is both storage and packet based which allow, for example, sending a particle packet, and receiving value of "server.timestamp". But advanced games will mostly use packets since it is more customizable. Anyway, first of all, you need a server, where port is the port you might want your server to be on.
A PackageServer, obtained via PackageSystem.createServer(port)
, need a ServerHandler to handle all requests. A ServerHandler should have methods putValue(name, value)
, getValue(name)
, onPacket(type, data)
.