pond3r / ggpo

Good Game, Peace Out Rollback Network SDK
MIT License
3.11k stars 360 forks source link

Secure P2P Without Dedicated Server #76

Open JacKAsterisK opened 7 months ago

JacKAsterisK commented 7 months ago

I was wondering if there was a way to securely use GGPO without dedicated servers. If I'm not mistaken, games like Brawlhalla use dedicated servers to connect via IP/port. I'm no networking expert, but using NAT traversal techniques like STUN to get an IP and plug that in isn't recommended right?

I was thinking about using Steam P2P so it's not exposing the client IPs but it seems like it'd be a lot of work. If that's been done before, there's a better method, or if I could have some pointers on the best way to implement it I'd be very grateful!

austinh1 commented 7 months ago

I'm actually looking to do the exact same thing, so I'd also love to know if anyone's done this before.

If there isn't and you'd be interested in collaborating, let me know! It'd be awesome to have an open source version of GGPO that works with Steam's NAT punchthrough.

JacKAsterisK commented 7 months ago

@austinh1 Glad to hear I'm not alone! I'll do some research and testing on it and let you know if I come up with anything useful. Would definitely be great to have an open source solution, but if it fights me too much I might just continue with my own custom rollback solution for my UE5 game since I already have that (mostly) working. Either way I wouldn't mind sharing my solution.

austinh1 commented 7 months ago

@JacKAsterisK Are you by any chance in the GGPO discord? I know of one other person that would also be interested in having GGPO work with Steam's networking, maybe we could get a group chat going to talk about it.

But yeah, sounds good! I think most people these days are going with custom solutions, so that makes a lot of sense. Still surprises me that no one hasn't written this code yet though 😆 I'm going to try my hand at writing it, but yeah I would love to know anything you find out!