Solved

What is the best way to design a multiplayer game syncronization for 2 to 4 players?

Posted on 2007-11-21
6
357 Views
Last Modified: 2010-04-07
What is the best way to design a multiplayer game syncronization for 2 to 4 players?

I am develoving a 2d game, and i  need to developed the multyplayer system and i dont have idea tabout how to create the game syncronization for 2-4 players.

what is the best method to create a server-clients syncronization system?

any help with describinb the steps with only using winsockets.?
0
Comment
Question by:becoolnike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 11

Expert Comment

by:jgordos
ID: 20361912
You don't really give any background.

Do you know how these four players will play the game?

Is it a fat client? Browser based?  Network?  Internet?

Do you know how to send and receive messages over the internet? Over the LAN?

Is it real-time?  Is it turn based?  

These things all matter.

-john
0
 

Author Comment

by:becoolnike
ID: 20365468
I have tcp and udp knowloge. i have coded app using winsocks.
it is a fat client.
it is over lan.
it is a 2d fighting game.
it is real time but all happens in the same screee.

i dont have expericence about syncronization events.


0
 

Author Comment

by:becoolnike
ID: 20365539
I was thinking a system where the server proccess all the events and physics and onlly send all the screen modications to the clients. the clients will only send the input data and recieve the screen updates but they wont procece any physics or events.

But i dont know if this is the best method.

0
 
LVL 11

Accepted Solution

by:
jgordos earned 500 total points
ID: 20367363
that's about your only choice, really.

and, when you ask about sync, the really important part is that you have only one source of key information, such as the score, or the health of each player.

That information can be sent out periodically, on a heartbeat.

And, if you're keying the animation so it plays "right" between the two players, then you need to include a few timers... time for animation, time for the "fight clock", time since you last heard from each client... etc.

But yes, you're thinking the right way.

If you're on a lan, just use UDP .. it's faster, and if you do miss a packet for some reason, you'll just pick it up again on the next heartbeat.

-j
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20658033
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DirectXFramework 5 114
mfc + Opengl - i am getting error 1282 13 934
Is draftkings.com only for people in gambling states? 1 79
Trigonometry for game star field help 1 132
What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question