Skip to content

Commit

Permalink
party: switch to protobuf
Browse files Browse the repository at this point in the history
This switches party and member ids to also be 64bit ints. This uses
considerably less data and cpu due to being able to use binary websocket
frames, and the server can avoid json deserialization completely.

Also hold member ids instead of party member references in the party
plugin, since the members can be reset if connection is lost, causing it
hold refs to old party members.

Encode location update points into a single int, since the updates are
so frequent.
  • Loading branch information
Adam- committed Jun 20, 2022
1 parent d89a645 commit 2c8cbfd
Show file tree
Hide file tree
Showing 29 changed files with 3,087 additions and 281 deletions.
6 changes: 6 additions & 0 deletions runelite-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
<version>23.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-javalite</artifactId>
<version>3.21.1</version>
</dependency>

<!-- JOGL -->
<dependency>
Expand Down Expand Up @@ -488,6 +493,7 @@
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/RuntimeTypeAdapterFactory.java</exclude>
<exclude>net/runelite/client/party/Party.java</exclude>
</excludes>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@
*/
package net.runelite.client.events;

import java.util.UUID;
import lombok.Value;

@Value
public class PartyChanged
{
/**
* The passphrase used to derive the party id
*/
private final String passphrase;
private final UUID partyId;
/**
* The new party id, or null if no party
*/
private final Long partyId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
package net.runelite.client.events;

import java.awt.image.BufferedImage;
import java.util.UUID;
import lombok.Value;

@Value
public class PartyMemberAvatar
{
private final UUID memberId;
private final long memberId;
private final BufferedImage image;
}
Loading

0 comments on commit 2c8cbfd

Please sign in to comment.