Hacker News new | ask | show | jobs
by manas96 429 days ago
Then again looking at the FAQ for Bitcraft, we have this:

"What engine does BitCraft use? The BitCraft client is developed using the Unity game engine. For the server, we have developed a sophisticated distributed system called SpacetimeDB, which hosts the entirety of BitCraft’s server architecture. "

Correct me if wrong, but this suggests the physics engine is Unity's, and not something implemented in SpacetimeDB.

2 comments

I didn't truly know and I didn't want to just throw out a guess so I just asked. They mentioned they have a basic hand rolled system for their physics. So not using unity physics.

I guess making the claim that is was more complicated might have not been right for me to do, but it would be hard to believe that they did the degenerate case of O(n^2).

Speculation: I have only written a physics engine once during college (so please excuse my ignorance), but I think for a basic mmo a simple chunk and AABB approach would work. It would be easy to query for the surrounding chunks and just run the collision on that subset. I know one of the team members was working on porting a minecraft 1.7.3 server at one point, but I don't know if they got up to the point of moving collision off of the server and into the database.

https://www.youtube.com/watch?v=YYMEUk-tnWs

Thank you for asking and forwarding the answer. I appreciate your comments.

Speculation as well: Looking at the trailer for Bitcraft, it looks like they have articulated characters and cloth physics. This raises more questions for me.

I am contributing to a project by a SpacetimeDB community member to get Rapier running within Unity. Instead of trying to get Unity PhyX running on the server, we just use a deterministic Rust physics engine on both client and server. It is a mostly complete drop in replacement as it stands and is deterministic (Unity's PhyX is not). We'll keep improving it!

https://github.com/Daxode/rapier4unity

That's great, especially the deterministic part. Did you run into determinism problems with two different CPU architectures for server and client?
We rely on the guarantees of Rapier's determinism. I haven't done extensive testing on the determinism claim yet, but it has held up so far. https://rapier.rs/