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

Online multiplayer question #214

Open
mrbotnft opened this issue Jan 24, 2023 · 3 comments
Open

Online multiplayer question #214

mrbotnft opened this issue Jan 24, 2023 · 3 comments

Comments

@mrbotnft
Copy link

Hi!

First of all I just want to congratulate you all for this amazing work. This codebase is huge and I am learning a lot by hopping around the code and playing the game.

I saw that the online multiplayer is implemented in P2P where the user is the server itself. This can lead (if I am not mistaken) to security problems that users could exploit to fake the results of the fights. Do you guys think that could be possible to extract this logic to a dedicated server? And if so, How hard could it be?

Keep the good work! Thanks in advance!

@kidagine
Copy link
Owner

Hey, thanks for the kind words, glad to hear some people can be helped from all of this :).

As for security concerns, there's definitely security issues when running a strictly P2P. GGPO which is the network solution used works only with P2P, to secure it better you would need to abstract the network layer to instead maybe use Steam networking or EOS etc, that way your IP is hidden behind an ID and people connect to a proxy, though doing something like that isn't a priority yet, so I can't speak on specifics, but it would definitely not be really easy, also note doing that adds latency, so there's always a balance between latency and security.
Also note in this case every user is authoritative, if someone tries to cheat it will cause a desync, and if there's a desync detection you can stop the match(Currently don't have desync detection).

I'll leave this issue open and whenever we get back at this I will respond again with a more specific solution, take what was said with a grain of salt, definitely more research is needed on this aspect.

@solcandy
Copy link

Hello kidagine!

Your game is awesome but when I install in WebGL and try to play online it appears a message of "Unavailable on Web"
Is there any way to fix it? Thanks

@kidagine
Copy link
Owner

Hi! thanks for the feedback. Currently online doesn't work in WebGL because of GGPO being a C++ library and WebGL doesn't like the way that's handled so I disabled the online feature in WebGL so that it doesn't crash the game.
I want to make it work for WebGL at some point, but the priority now is to make the base online functional.

(Also this should have probably been in a separate issue but oh well)

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

No branches or pull requests

3 participants