Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature] Incremental State Sync

未关闭
#229 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudflare/partykit 的其他 Issue

查看 cloudflare/partykit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。