clockworklabs / clockworklabs/SpacetimeDB

Client-side prediction

Open
#2,453 4 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

For better feeling on the local machine, almost every game implements some sort of local prediction about actions sent up to the server. Is there a current approach for doing that with SpacetimeDb? Or are there plans?

It seems to me that the code for most reducers would be fine to include in the client. Then the client sdk could run the reducer against the local view of the db to predict how the db would change in response to that reducer call.

It has some complexity, but solving this well would make this the defacto choice for multiplayer games. It's feasible to build that infrastructure myself, but I think it could be supported natively, probably better than a wrapping framework.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by reviewing the client SDK and reducer execution model to determine whether local reducer prediction already exists, then document the current approach or define the native support needed for predicted database changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
database, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.