Jump to content

Questions about multiplayer


Arska134
 Share

Recommended Posts

Hello!

 

As somebody already knows i'am programming multiplayer FPS game. I have some questions.

 

1. When syncing multiplayer game, it's necessaey make packets to get "old". What i mean is that new players who joining to server late won't be receiving these packages. (Gunshots, chat messages, etc...) Currently i use server time to determine which packages are way too old to be happened now, but it has little problem... When server time reaches maximum value of "int", server crashes. What would be better way to do this?

 

2. Next question is about syncing physics. How it's done in most of multiplayer games? Who calculates physics? Server or clients?

If server calculates all physics for clients, what is best way to determine if physics entity was hit? Server side physic calculated would increase bandwidth, but it's accurate. There would be some laggy moving objects without network smoothing.

If clients will calculate physics it can be very inaccurate, but bandwidth would be lower.

For example if i choose to use client side calculations, how i can tell every player that something was hit, and then make it accurate as possible?

 

So how it's best way to be done?

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Link to comment
Share on other sites

I would make multiplayer game so that it's mostly based on client, and only very rare server communication happens, and even then in another thread so it doesn't lag the client. Lagging the client is worst thing you can do. You can always sync clients via the server every 1 minute or so, and it's fun to see the chaos. There is chaos anyway, so better make it fun.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...