[Feature] Incremental State Sync
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
首先阅读实验性的 partysync 模块和 Durable Objects 集成。使用 issue 中链接的 Colyseus schema 和 state 文档作为协议参考,然后在实现之前定义压缩增量 delta、服务器到客户端的状态复制以及客户端监听器的范围。
由索引模型根据 Issue 内容生成。
描述
Hi everyone! I saw the experimental partysync module and was wondering if it could support an incremental state sync protocol.
I'm imagining something similar to https://github.com/colyseus/schema. It's a library that basically automatically syncs JS classes to client listeners. It's very optimized, serializing and emitting only compressed binary deltas of any changes of state.
For example you can have a class like the following server side, which would sync the player object to all clients whenever a property changes:
export class Player extends Schema {
@type("string") name: string;
@type("number") x: number;
@type("number") y: number;
}
const player = new Player()
This makes the developer experience of making realtime multiplayer games really seamless, as all your state can be replicated on both the server and client with minimal overhead.
There are some great docs going into more detail here: https://docs.colyseus.io/state.
However, Colyseus schema doesn't have an integration with Durable Objects yet. So having sync functionality like this built into partykit/partysync with a tight integration to Durable Objects would be great to enable apps like realtime multiplayer video games!
- 主要语言
- TypeScript
- 星标
- 1.3k
- 派生
- 84
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudflare/partykit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
cloudflare/partykit#425 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
cloudflare/partykit#424 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
cloudflare/partykit#423 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
cloudflare/partykit#419 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
cloudflare/partykit#411 ·
查看 cloudflare/partykit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
excaliburjs/Excalibur#3895 ·
维护者通常 3 天内回复
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected可能已有人在做 @Steve-20-ai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp可能已有人在做 @Gurkaran18 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
joinmarket-webui/jam#1588 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
mihaip/infinite-mac#475 ·