Readit News logoReadit News
kriper commented on SpacetimeDB   spacetimedb.com/... · Posted by u/matthewfcarlson
janderland · 5 months ago
Forgive my ignorance, but why would you implement physics and animations on the server? I feel like you can get away with basic positional data and do the rest of that on the clients.
kriper · 5 months ago
You need physics in order to make movement server authoritative. Otherwise player will be able to fly around and ignore collusions. You might need animation state in server if you are making a fps shooter and want to calculate raycasts properly.
kriper commented on SpacetimeDB   spacetimedb.com/... · Posted by u/matthewfcarlson
cloutiertyler · 5 months ago
Just to copy in my response from there too:

I'm Tyler (guy in the video). In BitCraft we currently implement client-side prediction outside of SpacetimeDB.

However, we DO plan to add automatic client-side prediction as a feature for SpacetimeDB in the near-ish future! Because all your server-side logic is in Wasm modules, we plan to run an embedded version of SpacetimeDB to execute the server logic on the client. As long as the server and client agree on the changes to the data we can reconcile the transactions, otherwise we'll rollback. Notably, we can do this with only partial state on the client!

We can also do deterministic simulation if you have total knowledge of the game state with this solution as well.

kriper · 5 months ago
How would you simulate physics, pathfinding, animation state on the server using this tech? Do you have to ditch your engine (do I have to reimplement what unity/unreal gives me for free?) ?
kriper commented on SpacetimeDB   spacetimedb.com/... · Posted by u/matthewfcarlson
kriper · 5 months ago
I don't really understand how you would write a game server using this tech. Lets say you need to simulate physics, pathfinding, animation etc on server. How one would integrate all of this? In regular world you just use unreal/unity headless mode that includes all of this but using spacetimedb requires ditching the game engine and reimplementing everything from scratch?
kriper commented on Show HN: SpacetimeDB 1.0 Is Here   github.com/clockworklabs/... · Posted by u/cloutiertyler
kriper · 6 months ago
Does it mean that if I have a physics engine written in c++ and want to use it on the server I have to compile it to web assembly?
kriper commented on Properly testing concurrent data structures   matklad.github.io/2024/07... · Posted by u/asicsp
skybrian · a year ago
It looks like you need to use conditional compilation to use Loom, which probably works okay for testing one library, but is pretty intrusive:

    #[cfg(loom)]
    pub(crate) use loom::sync::atomic::AtomicUsize;

    #[cfg(not(loom))]
    pub(crate) use std::sync::atomic::AtomicUsize;
I wonder if there are any languages that do a better job of letting you use your own scheduler?

kriper · a year ago
in C# it's basically automatic https://github.com/microsoft/coyote/

u/kriper

KarmaCake day23January 18, 2024View Original