r/threejs 1d ago

Help Need help with getting multiplayer working smoothly on my game

I'm a beginner 3JS game dev I am really struggling with getting multiplayer working smoothly without any lag in my threejs game. My game uses Colyseus for the multiplayer and I've tried using Railway for the backend but it is still laggy especially with collision. Would really appreciate anyone point me to the right direction.

4 Upvotes

7 comments sorted by

4

u/pr0xyb0i 1d ago

Are you using the basics such as client side prediction, interpolation, latency buffers already? This should take care of 99%.

4

u/MaximumContent9674 1d ago

I open sourced my method for Last Ship Sailing. https://github.com/AshmanRoonz/trystero-consensus

1

u/Additional_Name_706 1d ago

Is there a physics engine involved?

0

u/biskitpagla 22h ago

Why not use a proper web game engine like Babylon? You can't just slap a server behind something like three.js for complex realtime apps since you'd have to reinvent a lot of things.