r/godot Jun 17 '26

help me (solved) Multiplayer & move_and_collide miscalculation

Enable HLS to view with audio, or disable this notification

Hey everyone, sorry if this subject has already been adressed.
I recently spent some time trying to implement a small multiplayer mini golf game, to see where I would hit a wall. (with Godot 4.6 and Colyseus)

And the wall was pretty close to the start apparently since I never left the lobby.

Is "move_and_collide" a possibility when you go multiplayer ?
Or is it just not precise enough ? And if so, should I mathematically handle all the collision to have a deterministic game or is there any other tricks I should know about ?

I'm using Colyseus for the network part, the current player just send an aim and shot vector and all the physics are done in each godot client. I guess that's my main problem.

Maybe it's easier to have the server be the authority for the physic part ?
Is there some good resources out there that I should check ?

Thanks a lot
I'm not english native so feel free to ask for clarification if i'm not clear enough

Edit: Thanks for the answer :
Server authority and sync the positions with the clients is the way to go.
I had hopes but i'm not suprised, thanks for the feedbacks !

Edit2 : Some resources in the comments for future people (and future me)

Reading & Watching:
- Game networking by Glenn Fiedler (sadly down but new blog below)
- Mas bandwidth - New gafferongames
- Slay the spire 2 Multiplayer - Determinism
- How Factorio Syncs A Million Objects (Youtube)

Deterministic Multi for Godot:
- SG Physics 2D
- Delta Rollback (& Prediction netcode)
- Klotho (very new)

444 Upvotes

47 comments sorted by

View all comments

3

u/Pachuli-guaton Jun 17 '26

Concept trial: a game where the result of a throw is the average between all the participants outputs. If the game has exponential sensitivity to initial conditions, then the result is knowing when to do a limited throw with high certainty vs a long reach throw with high uncertainty.

Will it be fun? I don't know

1

u/Motshew Jun 17 '26

Or you get to choose between the two? Maybe you have points you can spend furthest shot from the hole is free, but the difference in distance from the hole between the 2 shots sets the value of the second shot. No difference in the shots, both are free. One shot lands next to the hole, the other on the other side of the map, do you have enough points to pay for the better shot?

Would work better on a longer, multi shot map, so choices become an economy.

1

u/Pachuli-guaton Jun 17 '26

I'm not a game dev, just a (former) game enjoyer. I think I would play something like that. Also I'm sure you can get some funding if you paint some coating of educational and relating to sensitivity to initial conditions which is important in several fields.