Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network playing #118

Open
bog-dan-ro opened this issue Sep 4, 2016 · 3 comments
Open

Network playing #118

bog-dan-ro opened this issue Sep 4, 2016 · 3 comments
Milestone

Comments

@bog-dan-ro
Copy link
Owner

bog-dan-ro commented Sep 4, 2016

Network playing is useful to play games like Xeno (http://www.worldofspectrum.org/infoseekid.cgi?id=0005787) with your friends.
Currently I see two ways to do it:
I. the game will run only on host, the host sends the screen updates to the client and the client will send only the keys/joystick events. Using some kind of fast compression it might be enough to play the games smoothly.

  • pro:
    • easier to implement
    • we can connect to any host/client even behind the gateways using UDP hole punching
  • con:
    • if the client's packages are lost, then the client's input events are lost too, this might lead to problems.
    • it requires a bigger bandwidth than the next solution.

II. the host sends a snapshot to the client which is used by the client to start from the same position, then all the input events are synchronized between host <--> client.

  • pro:
    • all the events will be in sync
    • it will be much less data to send between client <--> host
  • con:
    • harder to implement
    • in order to be sure all the events are received by the parties we'll need to use TCP, therefore the server must have a public IP or the client & the server must be in the same network.

Personally I'd like to go with the first option ...

@bog-dan-ro bog-dan-ro added this to the 4.0 milestone Sep 4, 2016
@hickoki
Copy link

hickoki commented Sep 12, 2016

Do you mean network over the internet?
Take a look at this opensource p2p library: http://www.naalaa.com/forum/index.php?topic=395.0

@bog-dan-ro
Copy link
Owner Author

Yep, also over the internet

@hickoki
Copy link

hickoki commented Sep 28, 2016

Great!! Btw the above Naalaa code is C and may give you some inspiration.
Looking forward to this feature. I don't think there are emulators out there with internet multiplayer..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants