Noita-Together / noita-together

Play alone together
MIT License
52 stars 17 forks source link

Go back to protobuf.js; implement compact movement messages #140

Closed myndzi closed 10 months ago

myndzi commented 11 months ago

While previous work migrated to protobuf-es, I later learned that it was particularly slow to decode/encode protobuf messages (at least with the message structure we are using).

This PR goes back to protobuf.js and makes the necessary changes to how encoding messages and processing the decoded messages works.

In addition, it implements a new message type that represents movement data much more compactly.

The generated protobuf code and various functions (including transforming movement frames to/from the compact format) has been extracted to a new library/repository, shared by both this repository and noita-together/lobby-server.

Some bug reports from test plays have been addressed in this branch as well, in particular room flag handling (which includes the lobby seed).

Requires https://github.com/Noita-Together/lobby-server/pull/1

SkyeOfBreeze commented 10 months ago

oops forgot to squash it