Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions proto/decentraland/sdk/components/network_entity.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
option (common.ecs_component_id) = 1098;

/**
* NetworkEntity marks an entity for network synchronization.

* When receiving network messages, to find which local entity they refer to,
* we look for an entity that has both the same networkId and entityId as the message.
*/
message PBNetworkEntity {
// The enumId or local entity ID
uint32 entity_id = 1;

// - 0 for fixed entities (created with enumId at initialization)
// - User's address hash for dynamic entities (created at runtime)
uint64 network_id = 2;
}
31 changes: 31 additions & 0 deletions proto/decentraland/sdk/components/synced_clock.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
option (common.ecs_component_id) = 1099;

// PBTimeComponent provides synchronized time information based on NTP server data
// This component can be used to maintain consistent time across all clients
message PBSyncedClock {
// The current synchronized time (in milliseconds since epoch)
uint64 synced_timestamp = 1;

// The synchronization status
SyncStatus status = 7;
}

// Status of time synchronization
enum SyncStatus {
// The component is not yet synchronized with the NTP server
SS_UNINITIALIZED = 0;

// The component is currently attempting to synchronize with the NTP server
SS_SYNCHRONIZING = 1;

// The component is successfully synchronized with the NTP server
SS_SYNCHRONIZED = 2;

// The component failed to synchronize with the NTP server
SS_ERROR = 3;
}
1 change: 1 addition & 0 deletions proto/decentraland/sdk/components/tween.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ message PBTween {

optional bool playing = 6; // default true (pause or running)
optional float current_time = 7; // between 0 and 1
optional uint64 start_synced_timestamp = 9; // timestamp (in milliseconds) when the tween started, allows synchronization across clients
}

message Move {
Expand Down
Loading